Skip to content

PR04 - Update a promotion

Request

Call Frequency
Maximum usage: Once per minute
Read More
Security
Operator-Bearer-Token or OAuth-2
Path
promotion_internal_idstringrequired

Promotion internal identifier

Query
shop_idinteger, (int64)required

Shop Identifier

Bodyapplication/json
application_to_cartArray of objects

If applicable, promo code associated to the promotion. Only editable if promotion is upcoming.

channel_codesArray of strings

Channels on which the promotion is applied. If none, promotion applied on all channels

customer_group_idsArray of strings

The customer groups on which the promotion is applied. If none, promotion applies to all customer groups.

customer_organization_idsArray of strings

The customer organizations on which the promotion is applied. If none, promotion applies to all customer organizations.

end_datestring, (date-time)

End date of the promotion period of activity

internal_descriptionstringrequired

Internal description of the promotion, set by the shop

public_descriptionsArray of objects

The public descriptions of the promotion, with the locales they apply to

rewardobjectrequired

Defines the reward applied when promotion is triggered

start_datestring, (date-time)required

Start date of the promotion period of activity. Only editable if promotion is upcoming.

triggerobjectrequired

Trigger of the promotion

curl -i -X PUT \
  'https://your-instance.mirakl.net/api/promotions/{promotion_internal_id}?shop_id=0' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "application_to_cart": [
      {
        "promo_code": "SUMMER20"
      }
    ],
    "channel_codes": [
      "US"
    ],
    "customer_group_ids": [
      "Group2"
    ],
    "customer_organization_ids": [
      "Org1"
    ],
    "end_date": "2023-08-30T22:00:00.000Z",
    "internal_description": "Summer sale event",
    "public_descriptions": [
      {
        "locale": "en_US",
        "value": "Summer promotions"
      },
      {
        "locale": "fr_FR",
        "value": "Promotions d'\''été"
      }
    ],
    "reward": {
      "selection": {
        "type": "BRAND",
        "values": [
          "Samsung",
          "Belkin"
        ]
      }
    },
    "start_date": "2023-04-03T16:18:59.922Z",
    "trigger": {
      "selection": {
        "type": "ALL"
      }
    }
  }'

Responses

OK