curl --request POST \
--url https://api.sprucecollective.co.uk/discount-codes/bulk-generate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"code_length": 18,
"count": 5000,
"discount_brand_id": "<string>",
"points_required": 1,
"title": "<string>",
"active": true,
"allow_multiple_claims": true,
"alphanumeric": true,
"category": "<string>",
"description": "<string>",
"discount_percentage": 50,
"featured": true,
"max_uses": 123,
"partner_logo": "<string>",
"partner_url": "<string>",
"prefix": "<string>",
"site_id": "<string>",
"tag_ids": [
"<string>"
],
"terms": "<string>",
"third_party_id": "<string>",
"thumbnail": "<string>",
"valid_from": "<string>",
"valid_until": "<string>"
}
'{}Generate a single discount code that can be claimed multiple times with unique codes (admin only)
curl --request POST \
--url https://api.sprucecollective.co.uk/discount-codes/bulk-generate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"code_length": 18,
"count": 5000,
"discount_brand_id": "<string>",
"points_required": 1,
"title": "<string>",
"active": true,
"allow_multiple_claims": true,
"alphanumeric": true,
"category": "<string>",
"description": "<string>",
"discount_percentage": 50,
"featured": true,
"max_uses": 123,
"partner_logo": "<string>",
"partner_url": "<string>",
"prefix": "<string>",
"site_id": "<string>",
"tag_ids": [
"<string>"
],
"terms": "<string>",
"third_party_id": "<string>",
"thumbnail": "<string>",
"valid_from": "<string>",
"valid_until": "<string>"
}
'{}Type "Bearer" followed by a space and JWT token.
Bulk generate discount codes
4 <= x <= 321 <= x <= 10000x >= 0Removed required, 0.0 is valid
0 <= x <= 100Array of tag IDs to associate
Link to external system
Created
The response is of type object.