Преминете към съдържанието
ShopentlyLearn

Отстъпки · Статус

Активиране или деактивиране на отстъпки.

PATCH/api/v1/discounts/coupons/{identity}/status

cURL заявка

curl --disable --globoff --fail-with-body --silent --show-error \
  --proto '=https' --connect-timeout 5 --max-time 30 \
  --request PATCH \
  --url https://shop.onshopently.com/api/v1/discounts/coupons/example-campaign/status \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: learn-campaign_status_api_v1_discounts_coupons__identity__status_patch' \
  --header 'Content-Type: application/json' \
  --data-raw '{"enabled":false,"expected_version":1}'

Отговор

{
  "data": {
    "deleted": false,
    "id": "example-campaign",
    "version": null
  },
  "meta": {
    "locale": "example",
    "market_code": "example",
    "market_id": "poland",
    "pagination": {
      "has_more": false,
      "limit": 1,
      "next_cursor": null
    },
    "request_id": "learn-example-request"
  }
}

Необходими права

Удостоверяване
Токен за достъп
Достъпно от
STANDARD
Право на ключа
Активиране или деактивиране на отстъпкиdiscounts.coupons:change_status