# Create a ShopCategory

- Only for creating in-store ShopCategory.
- The names of ShopCategory in a store are not allowed to be repeated.
- The maximum "mandatory" ShopCategory number for each store is 1.
- When there is no product available for sale under the ShopCategory (including products offshelf), the ShopCategory will not be displayed on our user APP.
- The number of ShopCategory can not exceed 100.

**Rate limit:** 10 QPS by appId dimension.

Endpoint: POST /product/shopcategory/create
Version: v.1.0.0

## Request fields (application/json):

  - `shopId` (integer, required)
    store id in KeeTa
    Example: 25381

  - `shopCategory` (object, required)

  - `shopCategory.id` (integer)
    Keeta's menu category ID. Not required for OpenItemCode-based APIs. Required for updates in Keeta ID-based APIs.
    Example: 12345

  - `shopCategory.name` (string, required)
    Name of the category in a menu
    Example: Happy Meal

  - `shopCategory.sourceLanguageType` (string, required)
    Language type of the name field. Supported language enums can be found in Menu Integration Guide
    Example: en

  - `shopCategory.nameTranslation` (string)
    Translated text for the name field
    Example: 開心樂園餐

  - `shopCategory.targetLanguageType` (string)
    Language type of nameTranslation. Required when nameTranslation is provided.
    Example: zh-HK

  - `shopCategory.nameTranslateType` (integer)
    Source of name translation. When the value equals 1, it indicates that the name translation was provided by the merchant.
    Example: 1

  - `shopCategory.type` (integer, required)
    Indicates the menu category type:
    Example: 0

  - `shopCategory.description` (string)
    Brief description of the category in a menu
    Example: Happy Meal description

  - `shopCategory.descSourceLanguageType` (string)
    Language type of description. Required if description exists.
    Example: en

  - `shopCategory.descriptionTranslation` (string)
    Translated text for description
    Example: 開心樂園餐描述

  - `shopCategory.descTargetLanguageType` (string)
    Language type of descriptionTranslation. Required when descriptionTranslation exists.
    Example: zh-HK

  - `shopCategory.descriptionTranslateType` (integer)
    Source of description translation. When the value equals 1, it indicates that the description translation was provided by the merchant.
    Example: 1

  - `shopCategory.openItemCode` (string, required)
    Third-party category ID. Mandatory and must be unique in OpenItemCode-based APIs. Optional in Keeta ID-based APIs.
    Example: SHOP_CATEGORY#10001

  - `shopCategory.availableTime` (object)
    Selling time slots for this category. Categories are unavailable outside these times.

  - `shopCategory.availableTime.code` (integer, required)
    Selling time type indicator:
    Example: 0

  - `shopCategory.availableTime.values` (array)
    Required when code=1. Contains 7 strings representing daily time slots (from Monday to Sunday). To represent multiple time slots within a day, use comma to separate between each time slots. Empty string means unavailable.

  - `shopCategory.availableTime.available` (array)
    Defines specific date ranges and time windows. Required when code=2.

  - `shopCategory.availableTime.available.startTimestamp` (integer)
    Beginning timestamp (milliseconds). Required when using absolute date ranges. If set without endTimestamp, indicates perpetual availability after start date. Required when AvailableTime.code = 2
    Example: 1735660800000

  - `shopCategory.availableTime.available.endTimestamp` (integer)
    Ending timestamp (milliseconds). When omitted with startTimestamp, creates open-ended availability.
    Example: 1736956799000

## Response 200 fields (application/json):

  - `code` (integer, required)
    A numeric status identifier indicating the result of the interface call, used to determine whether the operation executed successfully.
    Example: 0

  - `message` (string, required)
    Text description corresponding to the status code, explaining the operation result or error cause to users.
    Example: Success

  - `data` (object)

  - `data.id` (integer)
    Keeta's menu category ID. Not required for OpenItemCode-based APIs. Required for updates in Keeta ID-based APIs.
    Example: 12345

  - `data.name` (string, required)
    Name of the category in a menu
    Example: Happy Meal

  - `data.sourceLanguageType` (string, required)
    Language type of the name field. Supported language enums can be found in Menu Integration Guide
    Example: en

  - `data.nameTranslation` (string)
    Translated text for the name field
    Example: 開心樂園餐

  - `data.targetLanguageType` (string)
    Language type of nameTranslation. Required when nameTranslation is provided.
    Example: zh-HK

  - `data.nameTranslateType` (integer)
    Source of name translation. When the value equals 1, it indicates that the name translation was provided by the merchant.
    Example: 1

  - `data.type` (integer, required)
    Indicates the menu category type:
    Example: 0

  - `data.description` (string)
    Brief description of the category in a menu
    Example: Happy Meal description

  - `data.descSourceLanguageType` (string)
    Language type of description. Required if description exists.
    Example: en

  - `data.descriptionTranslation` (string)
    Translated text for description
    Example: 開心樂園餐描述

  - `data.descTargetLanguageType` (string)
    Language type of descriptionTranslation. Required when descriptionTranslation exists.
    Example: zh-HK

  - `data.descriptionTranslateType` (integer)
    Source of description translation. When the value equals 1, it indicates that the description translation was provided by the merchant.
    Example: 1

  - `data.openItemCode` (string, required)
    Third-party category ID. Mandatory and must be unique in OpenItemCode-based APIs. Optional in Keeta ID-based APIs.
    Example: SHOP_CATEGORY#10001

  - `data.availableTime` (object)
    Selling time slots for this category. Categories are unavailable outside these times.

  - `data.availableTime.code` (integer, required)
    Selling time type indicator:
    Example: 0

  - `data.availableTime.values` (array)
    Required when code=1. Contains 7 strings representing daily time slots (from Monday to Sunday). To represent multiple time slots within a day, use comma to separate between each time slots. Empty string means unavailable.

  - `data.availableTime.available` (array)
    Defines specific date ranges and time windows. Required when code=2.

  - `data.availableTime.available.startTimestamp` (integer)
    Beginning timestamp (milliseconds). Required when using absolute date ranges. If set without endTimestamp, indicates perpetual availability after start date. Required when AvailableTime.code = 2
    Example: 1735660800000

  - `data.availableTime.available.endTimestamp` (integer)
    Ending timestamp (milliseconds). When omitted with startTimestamp, creates open-ended availability.
    Example: 1736956799000

