跳至内容
ShopentlyLearn

移除空闲单元

说明原因后移除未售出的兑换码或文件。已预留或已分配单元会被拒绝。

POST/api/v1/inventory/products/{product_id}/digital-units/{unit_id}/content-deletion

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-units/00000000-0000-4000-8000-000000000003/content-deletion \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: 2c2219ee-ab71-5090-896d-c2a0f2f33f69' \
  --header 'Content-Type: application/json' \
  --data-raw '{"expected_version":1,"reason":"Withdraw a revoked license"}'

响应

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

所需权限

身份验证
访问令牌
最低套餐
STANDARD
密钥权限
撤下尚未交付的代码和文件inventory.digital_unit:delete