get all promotions
Developing
GET
admin/promotions
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'admin/promotions' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NTU3MDkyMywianRpIjoiN2JmNWYzYWEtNjBiYS00MDcyLWIyY2MtYjcyMTdiOTEyNTExIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjMiLCJuYmYiOjE3NDU1NzA5MjMsImNzcmYiOiJlNjliZTVmNC03ODRmLTRmN2YtOWUzZC02NWZmYzE3YWM1YWMiLCJ1c2VybmFtZSI6InNlbGYiLCJlbWFpbCI6InNlbGZAZXhhbXBsZS5jb20iLCJpc192ZW5kb3IiOmZhbHNlfQ.OWOHjdvS-Epyv6Dimp_n53eiO1r2h3RoY8tDTa7yS9c' \
--header 'Content-Type: application/json' \
--data-raw '{}'
Response Response Example
{
"message": "Promotions fetched successfully",
"pagination": {
"current_page": 1,
"pages": 1,
"per_page": 20,
"total": 9
},
"promotions": [
{
"discount_value": 20.0,
"end_date": "Fri, 30 Jun 2023 23:59:59 GMT",
"id": 11,
"image_url": "https://example.com/image.jpg",
"is_active": false,
"max_discount": 50.0,
"products": "[2, 3, 1]",
"promo_code": "SUMMER20",
"promotion_type": "percentage_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale",
"usage_limit": 2
},
{
"discount_value": 60.0,
"end_date": "Fri, 30 Jun 2023 23:59:59 GMT",
"id": 13,
"image_url": "https://example.com/image.jpg",
"is_active": false,
"max_discount": 50.0,
"products": "[2, 3]",
"promo_code": "SUMMER60",
"promotion_type": "percentage_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale",
"usage_limit": 2
},
{
"discount_value": 20.0,
"end_date": "Fri, 30 Jun 2023 23:59:59 GMT",
"id": 17,
"image_url": "https://example.com/image.jpg",
"is_active": false,
"max_discount": 50.0,
"products": "[2, 3, 1]",
"promo_code": "HELP",
"promotion_type": "percentage_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale",
"usage_limit": 2
},
{
"discount_value": 20.0,
"end_date": "Fri, 30 Jun 2023 23:59:59 GMT",
"id": 18,
"image_url": "https://example.com/image.jpg",
"is_active": false,
"max_discount": 50.0,
"products": "[2, 3, 1]",
"promo_code": "HELPME",
"promotion_type": "percentage_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale",
"usage_limit": 2
},
{
"discount_value": 20.0,
"end_date": "Fri, 30 Jun 2023 23:59:59 GMT",
"id": 19,
"image_url": "https://example.com/image.jpg",
"is_active": false,
"max_discount": 50.0,
"products": "[2, 3, 1]",
"promo_code": "HELPMEPLS",
"promotion_type": "percentage_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale",
"usage_limit": 2
},
{
"discount_value": 30.0,
"end_date": "Tue, 30 Jun 2026 23:59:59 GMT",
"id": 2,
"image_url": "https://example.com/image-updated.jpg",
"is_active": true,
"max_discount": 40.0,
"products": "[4, 6, 5]",
"promo_code": "SUMMER20updated",
"promotion_type": "fixed_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale updated",
"usage_limit": 1
},
{
"discount_value": 70.0,
"end_date": "Tue, 30 Jun 2026 23:59:59 GMT",
"id": 15,
"image_url": "https://example.com/image-updated.jpg",
"is_active": true,
"max_discount": 40.0,
"products": "[6, 5]",
"promo_code": "SUMMER70updated",
"promotion_type": "percentage_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale updated",
"usage_limit": 5
},
{
"discount_value": 20.0,
"end_date": "Tue, 30 Jun 2043 23:59:59 GMT",
"id": 20,
"image_url": "https://example.com/image.jpg",
"is_active": true,
"max_discount": 50.0,
"products": "[2, 3, 1]",
"promo_code": "HELPMEPLS2",
"promotion_type": "percentage_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale",
"usage_limit": 2
},
{
"discount_value": 20.0,
"end_date": "Tue, 30 Jun 2043 23:59:59 GMT",
"id": 21,
"image_url": "https://example.com/image.jpg",
"is_active": true,
"max_discount": 500000.0,
"products": "[2, 3, 1]",
"promo_code": "HELPMEPLS3",
"promotion_type": "percentage_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale",
"usage_limit": 2
}
],
"success": true
}
Request
Header Params
Authorization
stringÂ
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NTU3MDkyMywianRpIjoiN2JmNWYzYWEtNjBiYS00MDcyLWIyY2MtYjcyMTdiOTEyNTExIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjMiLCJuYmYiOjE3NDU1NzA5MjMsImNzcmYiOiJlNjliZTVmNC03ODRmLTRmN2YtOWUzZC02NWZmYzE3YWM1YWMiLCJ1c2VybmFtZSI6InNlbGYiLCJlbWFpbCI6InNlbGZAZXhhbXBsZS5jb20iLCJpc192ZW5kb3IiOmZhbHNlfQ.OWOHjdvS-Epyv6Dimp_n53eiO1r2h3RoY8tDTa7yS9c
Body Params application/json
Responses
Modified at 2025-05-04 17:41:08