curl --request GET \
--url https://api.sprucecollective.co.uk/discount-codes{
"discount_codes": [
{
"active": true,
"allow_multiple_claims": true,
"alphanumeric": true,
"category": "<string>",
"claimed_by_user": true,
"claimed_codes": [
"<string>"
],
"code": "<string>",
"code_display": "<string>",
"code_length": 123,
"code_pattern": "<string>",
"code_required": true,
"created_at": "<string>",
"current_uses": 123,
"description": "<string>",
"discount_brand": {
"archived": true,
"collection_id": "<string>",
"created_at": "<string>",
"description": "<string>",
"discount_codes": [
{
"active": true,
"allow_multiple_claims": true,
"alphanumeric": true,
"category": "<string>",
"claimed_codes": [
"<string>"
],
"code": "<string>",
"code_display": "<string>",
"code_length": 123,
"code_pattern": "<string>",
"code_required": true,
"created_at": "<string>",
"current_uses": 123,
"description": "<string>",
"discount_brand": "<unknown>",
"discount_brand_id": "<string>",
"discount_percentage": 123,
"featured": true,
"has_claimed_code": true,
"id": "<string>",
"is_bulk_code": true,
"is_valid": true,
"max_uses": 123,
"partner_logo": "<string>",
"partner_url": "<string>",
"points_required": 123,
"site_id": "<string>",
"tags": [
{
"active": true,
"color": "<string>",
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"site_id": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"terms": "<string>",
"third_party_id": "<string>",
"thumbnail": "<string>",
"title": "<string>",
"updated_at": "<string>",
"valid_from": "<string>",
"valid_until": "<string>"
}
],
"draft": true,
"id": "<string>",
"item_id": "<string>",
"locale_id": "<string>",
"logo": "<string>",
"logo_black_and_white": "<string>",
"max_discount": "<string>",
"name": "<string>",
"published_on": "<string>",
"site_id": "<string>",
"slug": "<string>",
"thumbnail": "<string>",
"updated_at": "<string>"
},
"discount_brand_id": "<string>",
"discount_percentage": 123,
"featured": true,
"has_claimed_code": true,
"id": "<string>",
"is_bulk_code": true,
"is_valid": true,
"max_uses": 123,
"partner_logo": "<string>",
"partner_url": "<string>",
"points_required": 123,
"site_id": "<string>",
"tags": [
{
"active": true,
"color": "<string>",
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"site_id": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"terms": "<string>",
"third_party_id": "<string>",
"thumbnail": "<string>",
"title": "<string>",
"updated_at": "<string>",
"valid_from": "<string>",
"valid_until": "<string>"
}
],
"has_more": true,
"page": 123,
"page_size": 123,
"total": 123
}Get a list of available discount codes. By default, only active and valid (not expired) discount codes are returned. If the caller/user has already claimed a discount code, it will still be included in the results for that user, with status information (such as active, is_valid, claimed_by_user, etc.) always present in the response.
curl --request GET \
--url https://api.sprucecollective.co.uk/discount-codes{
"discount_codes": [
{
"active": true,
"allow_multiple_claims": true,
"alphanumeric": true,
"category": "<string>",
"claimed_by_user": true,
"claimed_codes": [
"<string>"
],
"code": "<string>",
"code_display": "<string>",
"code_length": 123,
"code_pattern": "<string>",
"code_required": true,
"created_at": "<string>",
"current_uses": 123,
"description": "<string>",
"discount_brand": {
"archived": true,
"collection_id": "<string>",
"created_at": "<string>",
"description": "<string>",
"discount_codes": [
{
"active": true,
"allow_multiple_claims": true,
"alphanumeric": true,
"category": "<string>",
"claimed_codes": [
"<string>"
],
"code": "<string>",
"code_display": "<string>",
"code_length": 123,
"code_pattern": "<string>",
"code_required": true,
"created_at": "<string>",
"current_uses": 123,
"description": "<string>",
"discount_brand": "<unknown>",
"discount_brand_id": "<string>",
"discount_percentage": 123,
"featured": true,
"has_claimed_code": true,
"id": "<string>",
"is_bulk_code": true,
"is_valid": true,
"max_uses": 123,
"partner_logo": "<string>",
"partner_url": "<string>",
"points_required": 123,
"site_id": "<string>",
"tags": [
{
"active": true,
"color": "<string>",
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"site_id": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"terms": "<string>",
"third_party_id": "<string>",
"thumbnail": "<string>",
"title": "<string>",
"updated_at": "<string>",
"valid_from": "<string>",
"valid_until": "<string>"
}
],
"draft": true,
"id": "<string>",
"item_id": "<string>",
"locale_id": "<string>",
"logo": "<string>",
"logo_black_and_white": "<string>",
"max_discount": "<string>",
"name": "<string>",
"published_on": "<string>",
"site_id": "<string>",
"slug": "<string>",
"thumbnail": "<string>",
"updated_at": "<string>"
},
"discount_brand_id": "<string>",
"discount_percentage": 123,
"featured": true,
"has_claimed_code": true,
"id": "<string>",
"is_bulk_code": true,
"is_valid": true,
"max_uses": 123,
"partner_logo": "<string>",
"partner_url": "<string>",
"points_required": 123,
"site_id": "<string>",
"tags": [
{
"active": true,
"color": "<string>",
"created_at": "<string>",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"site_id": "<string>",
"slug": "<string>",
"updated_at": "<string>"
}
],
"terms": "<string>",
"third_party_id": "<string>",
"thumbnail": "<string>",
"title": "<string>",
"updated_at": "<string>",
"valid_from": "<string>",
"valid_until": "<string>"
}
],
"has_more": true,
"page": 123,
"page_size": 123,
"total": 123
}Page number
Page size
Search term (code, title, category, description)
Sort by field (code, title, created_at, updated_at, discount_percentage, points_required, active, featured)
Sort order (asc or desc)
Status filter: 'all' to return all discount codes (admin only), otherwise only active and valid codes are returned by default
Comma-separated list of tag slugs to filter by
Comma-separated list of tag IDs to filter by
Filter by featured status (true or false)
OK
List of discount codes with claim status for the current user
Show child attributes
List of codes claimed by current user (for bulk codes)
Hidden until redeemed
New fields for code visibility
true
Show child attributes
Show child attributes
List of codes claimed by current user (for bulk codes)
Hidden until redeemed
New fields for code visibility
true
Whether current user has claimed this code
Associated tags
Show child attributes
Whether current user has claimed this code
Associated tags
Show child attributes