Get a promotion
Returns a single promotion by ID.
GET
/promotions/{id}Authorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idintegerrequiredID of the promotion to retrieve.
Responses
200Promotion details
404Promotion not found
Request
curl -X GET "https://api.onbolder.com/v2/promotions/20" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.onbolder.com/v2/promotions/20", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://api.onbolder.com/v2/promotions/20",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"id": 20,
"name": "Summer Sale",
"code": "SUMMER20",
"discount_type": "percentage",
"discount": 20,
"status": "active",
"starts_at": "2024-06-01T00:00:00Z",
"expires_at": "2024-08-31T23:59:59Z",
"usage_count": 0,
"_links": {
"self": {
"href": "https://api.onbolder.com/v2/promotions/20"
}
}
}Promotion not found