Skip to content

Modify the available and unavailable status(in batch)

Request

  1. Product data that can be transmitted in one batch should not exceed 200. If there are more products, please create them in batches.
  2. The interface supports partial synchronization success and partial synchronization failure. However, if there is a parameter format error, all will fail.
  3. If there is no available product in a ShopCategory, the ShopCategory will disapear at user APP.
  4. If needLinkage=1, this API will also modify the status linked to the ChoiceGroupSkus (the same name with Spu). But if the ChoiceGroupSku status violates the rule of ChoiceGroup, it wouldn't be modified.

Rate limit: 10 QPS by appId dimension.

Bodyapplication/jsonrequired
shopIdinteger, (int64)required

store id in KeeTa

Example:25381
spuIdListArray of integers, (int64)required

Spu id list

Example:
[ 1, 2, 3 ]
statusintegerrequired

1 - available 0 - unavailable

Example:1
needLinkageinteger

1 - need linkage modification else - no need

Default:0
Example:1
POST
/product/spustatus/batchupdate
curl -i -X POST \
  https://open.mykeeta.com/api/open/product/spustatus/batchupdate \
  -H 'Content-Type: application/json' \
  -d '{
    "shopId": 25381,
    "spuIdList": [
      1,
      2,
      3
    ],
    "status": 1,
    "needLinkage": 1
  }'

Responses

Batch status 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": [ {} ] }