Update Promotions

You can re-enable an expired promotion by updating the end date and setting it in the future, in doing so you will clear out any previously attached codes - this is part of the system that prevents duplicate promotion codes existing on different promotions.

put
Update a Promotion

https://api.moltin.com/v2/promotions/:id
Request
Response
Path Parameters
id
required
string
The unique promotion identifier
Headers
Authorization
required
string
Body Parameters
type
optional
string
"promotion"
id
optional
number
The unique promotion identifier
name
optional
string
The name of your promotion
description
optional
string
A description of your promotion
enabled
optional
boolean
true if enabled, false if not
promotion_type
optional
string
One of: fixed_discount or percent_discount
schema
optional
object
One of: fixed schema, percent schema
start
required
string
The start time of the promotion datetime (yyyy-mm-dd, yyyy-mm-ddThh:mm:ss+hh:mm). The simpler format will start the promotion at 00:00 UTC of the datetime specified. If time is not specified, it will default to the time at which the request was created.
end
required
string
The end time of the promotion datetime (yyyy-mm-dd, yyyy-mm-ddThh:mm:ss+hh:mm). The simpler format will start the promotion at 00:00 UTC of the datetime specified. If time is not specified, it will default to the time at which the request was created.
200: OK
cURL
{
"data": {
"type": "promotion",
"id": "7005b249-300b-4cf6-964e-e663278af218",
"name": "Promo #1",
"description": "Initial Promotion",
"enabled": true,
"promotion_type": "fixed_discount",
"schema": {
"currencies": [
{
"currency": "USD",
"amount": 900
},
{
"currency": "GBP",
"amount": 1100
}
]
},
"start": "2017-11-13T00:00:00Z",
"end": "2019-11-13T00:00:00Z",
"created_at": "2018-05-10T15:25:21.164Z",
"updated_at": "2018-05-10T15:26:18.203942092Z"
}
}
cURL
curl -X PUT https://api.moltin.com/v2/promotions/:id \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type":"promotion",
"id": "PROMOTION_ID",
"name": "Promo #1",
"description": "Initial Promotion",
"enabled": true,
"promotion_type": "fixed_discount",
"schema":{
"currencies":[
{"currency":"USD", "amount":900},
{"currency":"GBP", "amount":1100}
]
},
"start":"2017-11-13",
"end":"2019-11-13"
}
}