跳至內容
ShopentlyLearn

接收預定入庫

接收既有庫存單位,無須再次匯入兌換碼或檔案。

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

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/receive \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: c5b4d095-b59c-5d18-b8f4-fcbb49a4e0ec' \
  --header 'Content-Type: application/json' \
  --data-raw '{"expected_delivery_version":1,"expected_version":3}'

回應

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

所需權限

身份驗證
存取權杖
最低方案
STANDARD
所需權限
管理可用代碼和檔案inventory.digital_unit:write建立庫存配送inventory.stock_delivery:create

特定欄位所需的附加權限

如果 publish_for_sale 為 true,請加入此權限:

  • 變更銷售限額inventory.stock:update_sales_limit