curl --request POST \
--url https://api-next.ofauth.com/v2/access/promotions \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'x-connection-id: <api-key>' \
--data '
{
"discount": 50,
"message": "<string>",
"finishDays": 183,
"subscribeCounts": 2,
"subscribeDays": 183,
"type": [
"<string>"
]
}
'[
{
"id": 123,
"message": "<string>",
"rawMessage": "<string>",
"hasRelatedPromo": true,
"price": 123,
"type": "<string>",
"canClaim": true,
"claimsCount": 123,
"subscribeCounts": 123,
"subscribeDays": 123,
"createdAt": "<string>",
"finishedAt": "<string>",
"isFinished": true
}
]Create a new promotion
Permission Required: promotions:write
curl --request POST \
--url https://api-next.ofauth.com/v2/access/promotions \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'x-connection-id: <api-key>' \
--data '
{
"discount": 50,
"message": "<string>",
"finishDays": 183,
"subscribeCounts": 2,
"subscribeDays": 183,
"type": [
"<string>"
]
}
'[
{
"id": 123,
"message": "<string>",
"rawMessage": "<string>",
"hasRelatedPromo": true,
"price": 123,
"type": "<string>",
"canClaim": true,
"claimsCount": 123,
"subscribeCounts": 123,
"subscribeDays": 123,
"createdAt": "<string>",
"finishedAt": "<string>",
"isFinished": true
}
]Requires a connection via the x-connection-id header.
Discount percentage to offer
1 <= x <= 100Promotion message
1000Days until promotion ends
1 <= x <= 365Maximum subscribers
x >= 1Subscription duration in days
1 <= x <= 365Promotion types
1Successful response
Was this page helpful?