v1

latestOpenAPI 3.0.12026-07-242871595.3 MB
INVENTORY

Create a Subcategory

Creates a new subcategory within a specified parent category. A subcategory inherits the parent category's hex color code when defined. For more information, see Manage Subcategories.

post/v3/merchants/{mId}/categories/{categoryId}/sub_categories

Path parameters

mIdstring required

Merchant identifier.

categoryIdstring required

Unique identifier of the parent category.

Headers

User-Agentstring required

Identifies the application, operating system, vendor, and/or version of the requesting user agent. Format: <AppName>/<Version> <Comment>

Request body

namestring required

Subcategory name as it displays in the Register app.

colorCodestring

Hex code of the color assigned to the subcategory and its items. Format: #fff, #ffffff, or #ffffffff.

Example request

{
  "name": "Greek Salad",
  "colorCode": "#ffffff"
}

Response

Successful response. Subcategory created.

idstring required

Unique identifier of the subcategory.

namestring required

Subcategory name as it displays in the Register app.

sortOrderinteger required

Ascending or descending sort order of the subcategory.

colorCodestring

Hex code of the color assigned to the subcategory and its items. Format: #fff, #ffffff, or #ffffffff.

deletedboolean required

Indicates whether the subcategory can be deleted.

Example response

{
  "id": "string",
  "name": "Greek Salad",
  "colorCode": "#ffffff",
  "parentCategory": {
    "id": "string"
  }
}