Promo Codes
add promo code
Creates a new promo code
For custom components:
RaiselyComponents.api.all('promo_codes').post(data = {}, params = {}, headers = {}) => Promise<{result}>
:fa-gears: See Restie Response Data for a more detailed overview of responses through the client wrapper
post/promo_codes
Headers
Authorizationstring
A valid HTTP Bearer token, required to access private records.
Request body
Example request
{
"data": {
"code": "10OFF",
"discountAmount": 10,
"discountType": "PERCENTAGE",
"endDate": "2022-12-01T00:00:00.000Z",
"maxUses": 100,
"startDate": "2022-12-01T00:00:00.000Z",
"uses": 50
}
}Response
The created Promo Code record
Example response
{
"data": {
"code": "10OFF",
"discountAmount": 10,
"discountType": "PERCENTAGE",
"endDate": "2022-12-01T00:00:00.000Z",
"maxUses": 100,
"startDate": "2022-12-01T00:00:00.000Z",
"uses": 50,
"uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
}
}