Market
Get Coupons List
Retrieve a paginated list of coupons with optional filtering by search term, type, and status
AuthorizationBearer <token>
Bearer token authentication
In: header
Query Parameters
per_page?integer
Number of coupons per page
Default
15Range
1 <= value <= 100search?string
Search term for coupon code or name
type?string
Filter by coupon type
Value in
"percentage" | "fixed_amount"status?string
Filter by coupon status
Value in
"active" | "inactive" | "expired"valid_from?string
Filter coupons valid from this date (not used in current implementation)
Format
datevalid_until?string
Filter coupons valid until this date (not used in current implementation)
Format
dateResponse Body
curl -X GET "https://api.example.com/api/application/coupons?per_page=15&search=string&type=percentage&status=active&valid_from=2019-08-24&valid_until=2019-08-24"{
"success": true,
"data": {
"current_page": 1,
"first_page_url": "https://api.example.com/api/application/products?page=1",
"from": 1,
"last_page": 10,
"last_page_url": "https://api.example.com/api/application/products?page=10",
"links": [
{
"url": "string",
"label": "string",
"active": true
}
],
"next_page_url": "https://api.example.com/api/application/products?page=2",
"path": "https://api.example.com/api/application/products",
"per_page": 15,
"prev_page_url": null,
"to": 15,
"total": 150,
"data": [
{
"id": 1,
"code": "SUMMER2024",
"name": "Summer Sale",
"description": "Special discount for summer season",
"type": "percentage",
"value": "10.00",
"usage_limit": null,
"used_count": 0,
"one_time_use": true,
"new_users_only": false,
"new_users_scope": "any",
"target_product_id": null,
"target_category_id": 1,
"is_lifetime": true,
"expires_at": null,
"status": "active",
"created_at": "2025-08-02T18:21:30.000000Z",
"updated_at": "2025-08-02T18:21:30.000000Z",
"coupon_uses_count": 0,
"target_product": {
"id": 1,
"name": "Premium Web Hosting",
"description": "High-performance web hosting with 99.9% uptime guarantee",
"stock": 10,
"image": "/images/products/hosting.jpg",
"category_id": 1,
"module": "LicenseService",
"module_config": {
"product_file": "products/1_1754152748_5_1753695926_Module.zip",
"is_downloadable_via_api": "1",
"is_downloadable_via_web": "1"
},
"duration_config": {
"weekly": {
"price": 0,
"enabled": false
},
"monthly": {
"price": 29.99,
"enabled": true
},
"quarterly": {
"price": 0,
"enabled": false
},
"yearly": {
"price": 299.99,
"enabled": true
},
"lifetime": {
"price": 0,
"enabled": false
}
},
"status": "active",
"position": 1,
"create_service_before_payment": true,
"created_at": "2025-08-02T16:39:06.000000Z",
"updated_at": "2025-08-02T16:40:13.000000Z",
"category": {
"id": 1,
"name": "Web Hosting"
}
},
"target_category": {
"id": 1,
"name": "Web Hosting"
}
}
]
}
}{
"success": false,
"message": "Unauthenticated"
}{
"success": false,
"message": "This action is unauthorized"
}{
"success": false,
"message": "Validation failed",
"errors": {
"field_name": [
"This field is required"
]
}
}