Skip to content

Batch Update SPU Status

Request

This endpoint allows the bulk updating of product statuses using their SPU OpenItemCode.

Rate Limiting App-level throttling: QPS ≤ 10

Notes

  • The openItemCode field is mandatory with SPU entity-level uniqueness.

  • This endpoint supports partial successful updates when processing multiple SPUs in a single request. However, if the entire request contains fundamental structural errors the system will reject the complete batch with a fail response.

  • When the needLinkage parameter is set to 1, this endpoint facilitates the comprehensive synchronization of status changes not only for the specified SPUs but also for all associated ChoiceGroupSkus. This advanced functionality ensures cohesive inventory and product display management across related product options.

  • Each request cannot exceed 200 SPUs.

Bodyapplication/jsonrequired
shopIdinteger, (int64)required

Unique identifier of the Keeta store.

Example:12345
spuOpenItemCodeListArray of stringsrequired

A list of SPU OpenItemCode

Example:
[ "aCV", "2code" ]
statusintegerrequired

This field controls the visibility and availability of a SPU in the merchant storefront. Status = 0, this setting will immediately deactivate the specified SPU. Status = 1, this setting activates the SPU for public visibility and ordering.

Example:1
needLinkageinteger

This field determines whether the status change should propagate to related SKUs, with these behaviors: When needLinkage equals 0 the status update applies exclusively to the specified ChoiceGroupSku without affecting any related products. When needLinkage equals 1, the system will automatically identify and update all logically connected ChoiceGroupSkus based on existing mapping between ChoiceGroupSku names match SPU names

Example:1
curl -i -X POST \
  https://open.mykeeta.com/api/open/product/spustatus/batchupdatebycode \
  -H 'Content-Type: application/json' \
  -d '{
    "shopId": 12345,
    "spuOpenItemCodeList": [
      "aCV",
      "2code"
    ],
    "status": 1,
    "needLinkage": 1
  }'

Responses

Request executed successfully

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 strings

Contains a list of OpenItemCodes for all SPUs whose statuses were successfully changed.

errorListArray of objects(ErrorSpu)

Failed SPUs list includes OpenItemCode and Error Message.

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