Skip to content
Get started

Creates or updates categories.

CategoryCreateCategoriesResponse Categories.CreateCategories(CategoryCreateCategoriesParams?parameters, CancellationTokencancellationToken = default)
POST/api/v2/public/categories

Creates or updates categories.

ParametersExpand Collapse
CategoryCreateCategoriesParams parameters
Boolean flush

Query param: When true, removes existing categories before inserting.

IReadOnlyList<Category>? categories

Body param: The list of category entries.

required string CategoryName

The category display name.

minLength1
required Boolean IsAdjustMinMax

Whether min/max stock levels should be automatically adjusted for products in this category.

required Boolean IsMarkdown

Whether markdown pricing is enabled for this category.

string? CategoryCode

Unique category code identifier.

Int? ExpirationOffset

Number of days offset for product expiration within this category.

formatint32
string? FriendlyCategoryName

A user-friendly alternative name for the category.

string? MarkdownPercentages

Comma-separated markdown percentage values.

string? ParentCategoryCode

The parent category code for hierarchy. Defaults to "0" (root) when not provided.

Int? ReceiptOffset

Number of days offset for receipt processing within this category.

formatint32
ReturnsExpand Collapse
class CategoryCreateCategoriesResponse:

Standard success response returned by mutation endpoints.

string? Data

Optional data payload returned by the operation.

string? Message

Human-readable message describing the result.

Boolean Success

Indicates whether the operation completed successfully.

Creates or updates categories.

CategoryCreateCategoriesParams parameters = new();

var response = await client.Categories.CreateCategories(parameters);

Console.WriteLine(response);
{
  "data": "12345",
  "message": "Record created successfully.",
  "success": true
}
Returns Examples
{
  "data": "12345",
  "message": "Record created successfully.",
  "success": true
}