Skip to content
Wazapin
Esc
navigateopen⌘Jpreview

POST /v1/commerce/promotions

POST/v1/commerce/promotions
Authorization
bearerAuthbearerAuthrequired
or
apiKeyAuthapiKeyAuthrequired
Request body
requiredapplication/json
auto_applyboolean
bundle_product_idsstring[] | null
category_idsstring[] | null
codestringrequired
collection_idsstring[] | null
discount_typestringrequired
Allowed:percentfixed_amount
discount_valueinteger<int64>required
min 1
ends_atstring
max_usesinteger<int64>
min_subtotal_amountinteger<int64>
namestringrequired
product_idsstring[] | null
starts_atstring
Responses
201Created
auto_applyboolean
bundle_product_idsstring[] | null
category_idsstring[] | null
codestring
collection_idsstring[] | null
discount_typestringrequired
discount_valueinteger<int64>required
ends_atstring<date-time>
idstringrequired
max_usesinteger<int64>
min_subtotal_amountinteger<int64>
namestring
product_idsstring[] | null
starts_atstring<date-time>
defaultError
errorErrorBodyrequired
Show properties
codestringrequired
detailsErrorDetail[] | null
Show properties
Array of ErrorDetail
codestring
fieldstring
locationstring
messagestringrequired
messagestringrequired
request_idstring
Request
curl -X POST "/v1/commerce/promotions" \
  -H "Content-Type: application/json" \
  -d '{
  "auto_apply": true,
  "bundle_product_ids": [
    "string"
  ],
  "category_ids": [
    "string"
  ],
  "code": "string",
  "collection_ids": [
    "string"
  ],
  "discount_type": "percent",
  "discount_value": 0,
  "ends_at": "string",
  "max_uses": 0,
  "min_subtotal_amount": 0,
  "name": "string",
  "product_ids": [
    "string"
  ],
  "starts_at": "string"
}'
Response
{
  "auto_apply": true,
  "bundle_product_ids": [
    "string"
  ],
  "category_ids": [
    "string"
  ],
  "code": "string",
  "collection_ids": [
    "string"
  ],
  "discount_type": "string",
  "discount_value": 0,
  "ends_at": "2024-01-01T00:00:00Z",
  "id": "string",
  "max_uses": 0,
  "min_subtotal_amount": 0,
  "name": "string",
  "product_ids": [
    "string"
  ],
  "starts_at": "2024-01-01T00:00:00Z"
}