Base URL: https://api.apply.coupons/v1 | Authentication: HTTP Basic
username and account password as password. Example header: Authorization: Basic base64(username:password)
{
"success": true|false,
"data": {...} | [],
"message": "Human readable message"
}
/categories
GET /categories
{
"success": true,
"data": [
{"id":54,"title":"Brawl Stars"},
{"id":55,"title":"Clash of Clans"}
],
"message": "Product Categories retrieved successfully."
}
curl -u username:password https://api.apply.coupons/v1/categories
{
"success": false,
"message": "Product Categories not found."
}
/products?category_id=54
category_id: optional integer
category_id. GET /products?category_id=54
{
"success": true,
"data": [
{"id":35,"name":"Brawl Stars - 30 π","price":"1.78"},
{"id":36,"name":"Brawl Stars - 80 π","price":"4.45"}
],
"message": "Products retrieved successfully."
}
curl -u username:password "https://api.apply.coupons/v1/products?category_id=54"
{
"success": false,
"message": "Products not found."
}
/transactions?per_page=20&page=1
per_page: optional integer (default 20)
page: optional integer (default 1)
GET /transactions?per_page=20&page=1
{
"success": true,
"data": {
"current_page":1,
"data":[
{
"id":"XXXX-XXXX-XXXX",
"product_name":"Product Clash of Clans - 80 π",
"amount":"0.89 USD",
"quantity":100,
"total_amount":"89.00 USD",
"created_at":"2025-09-28 08:53:57 UTC"
}
],
"total":158
},
"message":"Transactions retrieved successfully."
}
curl -u username:password "https://api.apply.coupons/v1/transactions?per_page=20&page=1"
data: []. /transactions/{id}
id: required UUID of an existing transaction
GET /transactions/XXXX-XXXX-XXXX
{
"success": true,
"data": {
"id":"XXXX-XXXX-XXXX",
"product_name":"Product Brawl Stars - 30 π",
"amount":"1.78 USD",
"quantity":1,
"total_amount":"1.78 USD",
"voucher_codes":["XXXX-XXXX-XXXX"],
"created_at":"2025-09-27 17:12:01 UTC"
},
"message":"Transaction retrieved successfully."
}
curl -u username:password https://api.apply.coupons/v1/transactions/XXXX-XXXX-XXXX
{
"success": false,
"message": "Transaction not found."
}
/check-balance
GET /check-balance
{
"success": true,
"data": { "balance": 0.41, "currency": "USD" },
"message": "User balance retrieved successfully."
}
curl -u username:password https://api.apply.coupons/v1/check-balance
/check-voucher
voucher_code: required string
POST /check-voucher
{
"voucher_code":"XXXX-XXXX-XXXX"
}
{
"success": true,
"data": {
"is_redeemed": true,
"order_number": 113450,
"customer_email": "[email protected]",
"product_name": "Brawl Stars - Brawl Pass Plus",
"order_status": "completed",
"redeemed_at": "2025-09-27 12:07:32 UTC"
},
"message": "Voucher retrieved successfully."
}
curl -u username:password -X POST https://api.apply.coupons/v1/check-voucher \
-H "Content-Type: application/json" \
-d '{"voucher_code":"XXXX-XXXX-XXXX"}'
{
"success": false,
"message": "Validation Error.",
"data": { "voucher_code": ["The voucher code field is required."] }
} 404 β Voucher not found
{
"success": false,
"message": "Voucher not found."
} 429 β Too many attempts (rate limited)
{
"success": false,
"message": "You have been blocked by the system for logging in more than 5 times. Please try again after 300 seconds"
}
/create-voucher
product_id: required integer, must exist
quantity: required integer, min 1, max 100
PartnerTransaction with UUID. CustomerBalanceChangeEvent to update balance. POST /create-voucher
{
"product_id": 42,
"quantity": 1
}
{
"success": true,
"data": {
"product_name": "Clash of Clans - 80 π",
"transaction_id": "XXXX-XXXX-XXXX",
"voucher_codes": ["XXXX-XXXX-XXXX"]
},
"message": "Voucher created successfully."
}
curl -u username:password -X POST https://api.apply.coupons/v1/create-voucher \
-H "Content-Type: application/json" \
-d '{"product_id":42,"quantity":1}'
{ "success": false, "message": "Please top up your balance by 10.00 USD." } 404 β Product Not Found
{ "success": false, "message": "Product Not Found" } 404 β Partner Not Found (invalid partner status)
{ "success": false, "message": "Partner Not Found" }