Category API (1.0.0)

Download OpenAPI specification:

Category trees and product assignments.

Categories

List categories

List all categories with pagination and filtering

Authorizations:
BearerAuth
query Parameters
page
integer
Default: 1

Page number

page_size
integer
Default: 20

Page size

search
string

Search term for code or name

category_tree_id
string

Filter by category tree ID

parent_id
string

Filter by parent ID

status
string

Filter by status (active, inactive)

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "pagination": {
    },
  • "success": true
}

Create a category

Create a new category within a category tree

Authorizations:
BearerAuth
Request Body schema: application/json
required

Category creation request

category_tree_id
required
string non-empty
code
required
string
description
string <= 1000 characters
image_asset_id
string
name
required
string <= 255 characters
parent_id
string non-empty

Responses

Request samples

Content type
application/json
{
  • "category_tree_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2",
  • "code": "electronics",
  • "description": "All electronic products",
  • "image_asset_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d4",
  • "name": "Electronics",
  • "parent_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d3"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Get a category

Retrieve a category by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1

Category ID

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Delete a category

Soft-delete a category by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1

Category ID

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ],
  • "message": "string",
  • "success": true
}

Update a category

Partially update a category by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1

Category ID

Request Body schema: application/json
required

Category update request

category_tree_id
string non-empty
description
string <= 1000 characters
image_asset_id
string
name
string <= 255 characters
parent_id
string non-empty

Responses

Request samples

Content type
application/json
{
  • "category_tree_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2",
  • "description": "Updated description",
  • "image_asset_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d4",
  • "name": "Electronics",
  • "parent_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d3"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Change category status

Change a category's status (activate or deactivate)

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1

Category ID

Request Body schema: application/json
required

Status change request

status
required
string
Enum: "active" "inactive"

Responses

Request samples

Content type
application/json
{
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Category Translations

Get all translations for a category

Retrieve all localized translations for a specific category

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1

Category ID

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Update category translations

PATCH: Update multiple translations for a category

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d1

Category ID

Request Body schema: application/json
required

Translations data

required
Array of objects (CategoryTranslationInput)

Responses

Request samples

Content type
application/json
{
  • "translations": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Category Trees

List category trees

List all category trees with pagination and filtering

Authorizations:
BearerAuth
query Parameters
page
integer
Default: 1

Page number

page_size
integer
Default: 20

Page size

search
string

Search term for code or name

status
string

Filter by status (active, inactive)

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "pagination": {
    },
  • "success": true
}

Create a category tree

Create a new category tree

Authorizations:
BearerAuth
Request Body schema: application/json
required

Category tree creation request

code
required
string
description
string <= 1000 characters
name
required
string <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "code": "ecommerce",
  • "description": "Category tree for online store",
  • "name": "E-Commerce Category Tree"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Get a category tree

Retrieve a category tree by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2

Category Tree ID

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Delete a category tree

Soft-delete a category tree by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2

Category Tree ID

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ],
  • "message": "string",
  • "success": true
}

Update a category tree

Partially update a category tree by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2

Category Tree ID

Request Body schema: application/json
required

Category tree update request

description
string <= 1000 characters
name
string <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "description": "Updated category tree description",
  • "name": "E-Commerce Category Tree"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Change category tree status

Change a category tree's status (activate or deactivate)

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2

Category Tree ID

Request Body schema: application/json
required

Status change request

status
required
string
Enum: "active" "inactive"

Responses

Request samples

Content type
application/json
{
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Category Tree Translations

Get all translations for a category tree

Retrieve all localized translations for a specific category tree

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2

Category Tree ID

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Update category tree translations

PATCH: Update multiple translations for a category tree

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2

Category Tree ID

Request Body schema: application/json
required

Translations data

required
Array of objects (CategoryTreeTranslationInput)

Responses

Request samples

Content type
application/json
{
  • "translations": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Channels

List channels

List all channels with pagination and filtering

Authorizations:
BearerAuth
query Parameters
page
integer
Default: 1

Page number

page_size
integer
Default: 20

Page size

search
string

Search term for code or name

status
string

Filter by status (active, inactive)

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "pagination": {
    },
  • "success": true
}

Create a channel

Create a new channel with optional locale assignments

Authorizations:
BearerAuth
Request Body schema: application/json
required

Channel creation request

category_tree_id
required
string non-empty
code
required
string
description
string <= 1000 characters
Array of objects (ChannelLocaleInput)
name
required
string <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "category_tree_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2",
  • "code": "web-store",
  • "description": "Online web store channel",
  • "locales": [
    ],
  • "name": "Web Store"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Get a channel

Retrieve a channel by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1

Channel ID

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Delete a channel

Soft-delete a channel by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1

Channel ID

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ],
  • "message": "string",
  • "success": true
}

Update a channel

Partially update a channel by its ID

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1

Channel ID

Request Body schema: application/json
required

Channel update request

category_tree_id
string non-empty
description
string <= 1000 characters
Array of objects (ChannelLocaleInput)
name
string <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "category_tree_id": "0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8d2",
  • "description": "Updated channel description",
  • "locales": [
    ],
  • "name": "Web Store"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Change channel status

Change a channel's status (activate or deactivate)

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1

Channel ID

Request Body schema: application/json
required

Status change request

status
required
string
Enum: "active" "inactive"

Responses

Request samples

Content type
application/json
{
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Channel Translations

Get all translations for a channel

Retrieve all localized translations for a specific channel

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1

Channel ID

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}

Update channel translations

PATCH: Update multiple translations for a channel

Authorizations:
BearerAuth
path Parameters
id
required
string
Example: 0193a5b6-e7c0-7df0-b4b1-c0a1f5e3a8c1

Channel ID

Request Body schema: application/json
required

Translations data

required
Array of objects (ChannelTranslationInput)

Responses

Request samples

Content type
application/json
{
  • "translations": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true
}