Skip to content

Modify products(in batch)

Request

  1. Mostly like 3.3.3.
  2. Through this interface, you can update Spu with its ID unchanged, this is very important for Promotion activities, which are based on Spu.id and Sku.id.
  3. As for Sku, if the Sku.id is filled, please make sure the Sku.id is belongs to this Spu. If Sku.id is not filled, we will treat it as a new one.

Rate limit: 10 QPS by appId dimension.

Bodyapplication/jsonrequired
shopIdinteger, (int64)required

store id in KeeTa

Example:25381
spuListArray of objects(SPU)required

Spu data model

curl -i -X POST \
  https://open.mykeeta.com/api/open/product/spu/batchupdate \
  -H 'Content-Type: application/json' \
  -d '{
    "shopId": 25381,
    "spuList": [
      {
        "id": 12345,
        "name": "Spicy Chicken Burger",
        "sourceLanguageType": "en",
        "nameTranslation": "辣雞腿漢堡",
        "targetLanguageType": "zh-HK",
        "nameTranslateType": 1,
        "status": 1,
        "description": "Spicy Chicken Burger description",
        "descSourceLanguageType": "en",
        "descriptionTranslation": "辣雞腿漢堡描述",
        "descTargetLanguageType": "zh-HK",
        "descriptionTranslateType": 1,
        "shopCategoryList": [
          {
            "id": 12345,
            "name": "Happy Meal",
            "sourceLanguageType": "en",
            "nameTranslation": "開心樂園餐",
            "targetLanguageType": "zh-HK",
            "nameTranslateType": 1,
            "type": 0,
            "description": "Happy Meal description",
            "descSourceLanguageType": "en",
            "descriptionTranslation": "開心樂園餐描述",
            "descTargetLanguageType": "zh-HK",
            "descriptionTranslateType": 1,
            "openItemCode": "SHOP_CATEGORY#10001",
            "availableTime": {
              "code": 0,
              "values": [
                "string"
              ],
              "available": [
                {}
              ]
            }
          }
        ],
        "pictureList": [
          {
            "url": "string"
          }
        ],
        "propertyList": [
          {
            "propertyId": 9999,
            "propertyType": 1,
            "customizable": 0,
            "propertyValueList": [
              {
                "valueId": 9999
              }
            ]
          }
        ],
        "skuList": [
          {
            "id": 12345,
            "spec": "Large",
            "sourceLanguageType": "en",
            "specTranslation": "大份",
            "targetLanguageType": "zh-HK",
            "specTranslateType": "1",
            "price": "28.0",
            "pickPrice": "28.0",
            "canteenPrice": "28.0",
            "currency": "HKD",
            "choiceGroupList": [
              {
                "id": 0,
                "name": "Sauces",
                "sourceLanguageType": "en",
                "nameTranslation": "選擇醬料",
                "targetLanguageType": "zh-HK",
                "nameTranslateType": 1,
                "minNumber": 0,
                "maxNumber": 3,
                "choiceGroupSkuList": [
                  null
                ],
                "openItemCode": "GROUP#10001",
                "repeatable": 0
              }
            ],
            "openItemCode": "SKU#10001",
            "choiceGroupOpenItemCodeList": [
              "string"
            ],
            "nutritionalInfo": {
              "property1": 0,
              "property2": 0
            },
            "allergens": [
              "string"
            ],
            "servingSize": 4,
            "caffeine": 0.39
          }
        ],
        "availableTime": {
          "code": 0,
          "values": [
            "string"
          ],
          "available": [
            {
              "startTimestamp": 1735660800000,
              "endTimestamp": 1736956799000
            }
          ]
        },
        "isSpecialty": 0,
        "openItemCode": "SPU#10001",
        "shopCategoryOpenItemCodeList": [
          "2$33419",
          "3$34747"
        ],
        "userGetModeList": [
          "delivery",
          "pickup"
        ]
      }
    ]
  }'

Responses

Batch update result.

Bodyapplication/json
codeintegerrequired

A numeric status identifier indicating the result of the interface call, used to determine whether the operation executed successfully.

Enum ValueDescription
0

The request was executed successfully.

Non-zero value

The request execution failed. Specific error details can be viewed in the message field.

Example:0
messagestringrequired

Text description corresponding to the status code, explaining the operation result or error cause to users.

Example:"Success"
dataArray of objects(SPU)

Successful Spu data model

errorListArray of objects(ErrorSpu)

failed Spu informations

Response
{ "code": 0, "message": "Success", "data": [ { … } ], "errorList": [ { … } ] }