Pereiti prie turinio
ShopentlyLearn

Akcijos · Sukurti

Kurti akcijas.

POST/api/v1/discounts/promotions

cURL užklausa

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

Atsakymas

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

Būtinos teisės

Tapatybės patvirtinimas
Prieigos žetonas
Prieinama nuo plano
STANDARD
Rakto teisė
Kurti akcijasdiscounts.promotions:create