curl -X PUT 'https://api.tolt.com/v1/promotion-codes/prc_dK9bzRGn46BhVgNFHD6fDgXW' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"type": "fixed",
"value": 2500
}'
{
"success": true,
"data": [
{
"id": "prc_dK9bzRGn4BhVgNFHD6fDgXW",
"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_s7mbzRjGn46BhVgNFHD6fDgXW",
"created_at": "2025-01-15T14:30:00.000Z",
"updated_at": "2025-01-15T14:30:00.000Z"
}
]
}
Promotion Codes
Update Promotion Code
This endpoint updates a promotion code.
PUT
/
v1
/
promotion-codes
/
:id
curl -X PUT 'https://api.tolt.com/v1/promotion-codes/prc_dK9bzRGn46BhVgNFHD6fDgXW' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"type": "fixed",
"value": 2500
}'
{
"success": true,
"data": [
{
"id": "prc_dK9bzRGn4BhVgNFHD6fDgXW",
"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_s7mbzRjGn46BhVgNFHD6fDgXW",
"created_at": "2025-01-15T14:30:00.000Z",
"updated_at": "2025-01-15T14:30:00.000Z"
}
]
}
Base URL https://api.tolt.com
Body Parameters
string - optional
The type of discount. Valid values are: ‘fixed’ or ‘percentage’
number - optional
The discount value. For fixed type, amount in cents. For percentage type,
value between 0 and 100
Response
boolean
Whether the request was successful
array[object]
Hide properties
Hide properties
string
Unique identifier for the promotion code, prefixed with
prc_string
The promotion code value
string
The type of discount
string | null
Entity type of the code
number
The discount value
boolean
If the code is active
string
ID of the partner who owns the code
string | null
ID of the group
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last update
string
Program ID the promotion code belongs to
string
Organization ID
curl -X PUT 'https://api.tolt.com/v1/promotion-codes/prc_dK9bzRGn46BhVgNFHD6fDgXW' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"type": "fixed",
"value": 2500
}'
{
"success": true,
"data": [
{
"id": "prc_dK9bzRGn4BhVgNFHD6fDgXW",
"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_s7mbzRjGn46BhVgNFHD6fDgXW",
"created_at": "2025-01-15T14:30:00.000Z",
"updated_at": "2025-01-15T14:30:00.000Z"
}
]
}
⌘I

