curl -X GET "https://api.chariow.com/v1/discounts/dis_abc123" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"message": "success",
"data": {
"id": "dis_abc123",
"name": "Summer Sale",
"code": "SUMMER20",
"type": "percentage",
"status": "active",
"value_off": {
"raw": 20,
"formatted": "20%"
},
"products": [
{
"id": "prd_def456",
"name": "Premium Course",
"type": "course",
"pictures": {
"thumbnail": "https://cdn.chariow.com/thumb.jpg",
"cover": "https://cdn.chariow.com/cover.jpg"
},
"category": {
"value": "education",
"label": "Education"
},
"pricing": {
"type": "one_time",
"price": {
"value": 9999,
"formatted": "$99.99",
"short": "100",
"currency": "USD"
}
},
"bundle": null
}
],
"store": {
"id": "str_xyz789",
"name": "My Store"
},
"customer_email": null,
"usage_limit": 100,
"usage_count": 15,
"start_date": "2025-01-01T00:00:00+00:00",
"end_date": "2025-12-31T23:59:59+00:00",
"is_auto_generated": false,
"created_at": "2025-01-01T00:00:00+00:00",
"updated_at": "2025-01-15T10:30:00+00:00"
},
"errors": []
}
Discounts
Get Discount
Retrieve details of a specific discount code
curl -X GET "https://api.chariow.com/v1/discounts/dis_abc123" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"message": "success",
"data": {
"id": "dis_abc123",
"name": "Summer Sale",
"code": "SUMMER20",
"type": "percentage",
"status": "active",
"value_off": {
"raw": 20,
"formatted": "20%"
},
"products": [
{
"id": "prd_def456",
"name": "Premium Course",
"type": "course",
"pictures": {
"thumbnail": "https://cdn.chariow.com/thumb.jpg",
"cover": "https://cdn.chariow.com/cover.jpg"
},
"category": {
"value": "education",
"label": "Education"
},
"pricing": {
"type": "one_time",
"price": {
"value": 9999,
"formatted": "$99.99",
"short": "100",
"currency": "USD"
}
},
"bundle": null
}
],
"store": {
"id": "str_xyz789",
"name": "My Store"
},
"customer_email": null,
"usage_limit": 100,
"usage_count": 15,
"start_date": "2025-01-01T00:00:00+00:00",
"end_date": "2025-12-31T23:59:59+00:00",
"is_auto_generated": false,
"created_at": "2025-01-01T00:00:00+00:00",
"updated_at": "2025-01-15T10:30:00+00:00"
},
"errors": []
}
Retrieves detailed information about a specific discount code by its public ID, including type, value, usage statistics, validity period, and associated products.
Path Parameters
The unique discount identifier (e.g.,
dis_abc123)Response
Show properties
Show properties
Unique discount identifier (e.g.,
dis_abc123)Display name of the discount
The discount code customers use at checkout
Discount type (
percentage or fixed)Discount status (
active or expired)Array of products this discount applies to (empty if applies to all products)
Store information (simplified)
Email of customer this discount is restricted to (null if no restriction)
Maximum number of uses (null if unlimited)
Number of times the discount has been used
ISO 8601 timestamp when discount becomes active (null if no start restriction)
ISO 8601 timestamp when discount expires (null if no expiration)
Whether the discount was automatically generated by the system
ISO 8601 timestamp when discount was created
ISO 8601 timestamp when discount was last updated
curl -X GET "https://api.chariow.com/v1/discounts/dis_abc123" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"message": "success",
"data": {
"id": "dis_abc123",
"name": "Summer Sale",
"code": "SUMMER20",
"type": "percentage",
"status": "active",
"value_off": {
"raw": 20,
"formatted": "20%"
},
"products": [
{
"id": "prd_def456",
"name": "Premium Course",
"type": "course",
"pictures": {
"thumbnail": "https://cdn.chariow.com/thumb.jpg",
"cover": "https://cdn.chariow.com/cover.jpg"
},
"category": {
"value": "education",
"label": "Education"
},
"pricing": {
"type": "one_time",
"price": {
"value": 9999,
"formatted": "$99.99",
"short": "100",
"currency": "USD"
}
},
"bundle": null
}
],
"store": {
"id": "str_xyz789",
"name": "My Store"
},
"customer_email": null,
"usage_limit": 100,
"usage_count": 15,
"start_date": "2025-01-01T00:00:00+00:00",
"end_date": "2025-12-31T23:59:59+00:00",
"is_auto_generated": false,
"created_at": "2025-01-01T00:00:00+00:00",
"updated_at": "2025-01-15T10:30:00+00:00"
},
"errors": []
}
Was this page helpful?
⌘I