Promotion Codes
Create Promotion Code
tolt.js
Guides / How To
Customers
Clicks
Commissions
Transactions
Promotion Codes
Create Promotion Code
This endpoint creates a promotion code.
POST
/
v1
/
promotion-codes
curl -X POST 'https://api.tolt.com/v1/promotion-codes' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"code": "SUMMER2024",
"type": "percentage",
"value": 20,
"partner_id": "part_s7mbzRGn46BhVgNFHD6fDgXW"
}'
{
"success": true,
"data": [
{
"id": "prc_dK9bzRGn46BhVgNFHD6fDgXW",
"active": true,
"entity_type": null,
"code": "SUMMER2024",
"value": 20,
"type": "percentage",
"program_id": "prg_YRsbPDAKhWfdqJbFACheh",
"group_id": null,
"organization_id": "org_JE3mfYNL9ci7sFaJazAv2",
"partner_id": "part_s7mbzRGn46BhVgNFHD6fDgXW",
"created_at": "2025-01-15T14:30:00.000Z",
"updated_at": "2025-01-15T14:30:00.000Z"
}
]
}
Base URL https://api.tolt.com
Body Parameters
The promotion code value (e.g., ‘SUMMER2024’)
The type of discount. Valid values are: ‘fixed’ or ‘percentage’
The discount value. For fixed type, amount in cents. For percentage type, value between 0 and 100
The ID of the partner who owns this promotion code
Response
Whether the request was successful
Unique identifier for the promotion code, prefixed with prc_
The promotion code value
The type of discount
Entity type of the code
The discount value
If the code is active
ID of the partner who owns the code
ID of the group
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update
Program ID the promotion code belongs to
Organization ID
curl -X POST 'https://api.tolt.com/v1/promotion-codes' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"code": "SUMMER2024",
"type": "percentage",
"value": 20,
"partner_id": "part_s7mbzRGn46BhVgNFHD6fDgXW"
}'
{
"success": true,
"data": [
{
"id": "prc_dK9bzRGn46BhVgNFHD6fDgXW",
"active": true,
"entity_type": null,
"code": "SUMMER2024",
"value": 20,
"type": "percentage",
"program_id": "prg_YRsbPDAKhWfdqJbFACheh",
"group_id": null,
"organization_id": "org_JE3mfYNL9ci7sFaJazAv2",
"partner_id": "part_s7mbzRGn46BhVgNFHD6fDgXW",
"created_at": "2025-01-15T14:30:00.000Z",
"updated_at": "2025-01-15T14:30:00.000Z"
}
]
}
curl -X POST 'https://api.tolt.com/v1/promotion-codes' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"code": "SUMMER2024",
"type": "percentage",
"value": 20,
"partner_id": "part_s7mbzRGn46BhVgNFHD6fDgXW"
}'
{
"success": true,
"data": [
{
"id": "prc_dK9bzRGn46BhVgNFHD6fDgXW",
"active": true,
"entity_type": null,
"code": "SUMMER2024",
"value": 20,
"type": "percentage",
"program_id": "prg_YRsbPDAKhWfdqJbFACheh",
"group_id": null,
"organization_id": "org_JE3mfYNL9ci7sFaJazAv2",
"partner_id": "part_s7mbzRGn46BhVgNFHD6fDgXW",
"created_at": "2025-01-15T14:30:00.000Z",
"updated_at": "2025-01-15T14:30:00.000Z"
}
]
}