get active promotions (public)
Developing
GET
/products/promotions
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/products/promotions?page=1&per_page=1' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NjA5NDI5OSwianRpIjoiOWM1MzYzMzQtMWMxMy00MzQzLWI5YWItNjlmMWJmMDE2ZmQyIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjEiLCJuYmYiOjE3NDYwOTQyOTksImNzcmYiOiJkNjQ5ZGNmNy04Yzg3LTQ3NjgtYTFjYi1iNjc0OWEyZWE4YTEiLCJ1c2VybmFtZSI6ImVjb19idXllciIsImVtYWlsIjoiYnV5ZXJAZXhhbXBsZS5jb20ifQ.lDrwv2wp3a0jp7Yd9K90rrwPEA27cyZC4q7GIrCiH30' \
--header 'Content-Type: application/json' \
--data-raw '{}'
Response Response Example
{
"message": "Promotions fetched successfully",
"pagination": {
"current_page": 1,
"pages": 2,
"per_page": 1,
"total": 2
},
"promotions": [
{
"end_date": "Tue, 30 Jun 2026 23:59:59 GMT",
"id": 2,
"image_url": "https://example.com/image-updated.jpg",
"is_active": true,
"products": "[4, 5, 6]",
"promo_code": "SUMMER20updated",
"promotion_type": "fixed_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale updated",
"usage_limit": 1
}
],
"success": true
}
Request
Query Params
page
string
required
Example:
1
per_page
string
required
Example:
1
Header Params
Authorization
string
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NjA5NDI5OSwianRpIjoiOWM1MzYzMzQtMWMxMy00MzQzLWI5YWItNjlmMWJmMDE2ZmQyIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjEiLCJuYmYiOjE3NDYwOTQyOTksImNzcmYiOiJkNjQ5ZGNmNy04Yzg3LTQ3NjgtYTFjYi1iNjc0OWEyZWE4YTEiLCJ1c2VybmFtZSI6ImVjb19idXllciIsImVtYWlsIjoiYnV5ZXJAZXhhbXBsZS5jb20ifQ.lDrwv2wp3a0jp7Yd9K90rrwPEA27cyZC4q7GIrCiH30
Body Params application/json
Responses
Modified at 2025-05-03 04:45:01