Skip to content
Get started

Creates or updates categories.

categories.create_categories(CategoryCreateCategoriesParams**kwargs) -> CategoryCreateCategoriesResponse
POST/api/v2/public/categories

Creates or updates categories.

ParametersExpand Collapse
flush: Optional[bool]

When true, removes existing categories before inserting.

categories: Optional[Iterable[Category]]

The list of category entries.

category_name: str

The category display name.

minLength1
is_adjust_min_max: bool

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

is_markdown: bool

Whether markdown pricing is enabled for this category.

category_code: Optional[str]

Unique category code identifier.

expiration_offset: Optional[int]

Number of days offset for product expiration within this category.

formatint32
friendly_category_name: Optional[str]

A user-friendly alternative name for the category.

markdown_percentages: Optional[str]

Comma-separated markdown percentage values.

parent_category_code: Optional[str]

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

receipt_offset: Optional[int]

Number of days offset for receipt processing within this category.

formatint32
ReturnsExpand Collapse
class CategoryCreateCategoriesResponse:

Standard success response returned by mutation endpoints.

data: Optional[str]

Optional data payload returned by the operation.

message: Optional[str]

Human-readable message describing the result.

success: Optional[bool]

Indicates whether the operation completed successfully.

Creates or updates categories.

import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.categories.create_categories()
print(response.data)
{
  "data": "12345",
  "message": "Record created successfully.",
  "success": true
}
Returns Examples
{
  "data": "12345",
  "message": "Record created successfully.",
  "success": true
}