Gå til innhold
ShopentlyLearn

Rabatter · Oppdater

Rediger rabatter.

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

cURL-forespørsel

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 \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN' \
  --header 'Idempotency-Key: learn-update_campaign_api_v1_discounts_coupons__identity__patch' \
  --header 'Content-Type: application/json' \
  --data-raw '{"code":"LEARN10","expected_version":1,"markets":[{"currency":"PLN","market_id":"poland","minor_units":2}],"name":"Autumn guide offer"}'

Svar

{
  "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"
  }
}

Nødvendige tilganger

Autentisering
Tilgangstoken
Tilgjengelig fra
STANDARD
Nøkkelens tillatelse
Rediger rabatterdiscounts.coupons:update