跳至內容
ShopentlyLearn

撤回入庫

僅撤回可用單位。已預留及已分配單位仍與訂單連結。

POST/api/v1/inventory/products/{product_id}/digital-imports/{import_id}/withdrawal

cURL 請求

curl --disable --globoff --fail-with-body --silent --show-error \
  --proto '=https' --connect-timeout 5 --max-time 30 \
  --request POST \
  --url https://shop.onshopently.com/api/v1/inventory/products/example/digital-imports/00000000-0000-4000-8000-000000000001/withdrawal \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: a941dbf7-c57f-5f38-85e2-7d058ce28935' \
  --header 'Content-Type: application/json' \
  --data-raw '{"expected_delivery_version":1,"expected_order_version":1,"expected_version":3,"reason":"Withdraw a revoked license"}'

回應

{
  "data": {
    "deleted": false,
    "id": "00000000-0000-4000-8000-000000000001",
    "version": 2
  },
  "meta": {
    "request_id": "example-request"
  }
}

所需權限

身份驗證
存取權杖
最低方案
STANDARD
金鑰權限
撤下尚未交付的代碼和檔案inventory.digital_unit:delete