get promotion detail (public)
Developing
GET
products/promotions/<int:promotion_id>
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'products/promotions/<int:promotion_id>' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NjA5NDI5OSwianRpIjoiOWM1MzYzMzQtMWMxMy00MzQzLWI5YWItNjlmMWJmMDE2ZmQyIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjEiLCJuYmYiOjE3NDYwOTQyOTksImNzcmYiOiJkNjQ5ZGNmNy04Yzg3LTQ3NjgtYTFjYi1iNjc0OWEyZWE4YTEiLCJ1c2VybmFtZSI6ImVjb19idXllciIsImVtYWlsIjoiYnV5ZXJAZXhhbXBsZS5jb20ifQ.lDrwv2wp3a0jp7Yd9K90rrwPEA27cyZC4q7GIrCiH30' \
--header 'Content-Type: application/json' \
--data-raw '{}'
Response Response Example
{
"message": "Promotion fetched successfully",
"promotion": {
"created_at": "Fri, 02 May 2025 12:22:34 GMT",
"description": "20% off all eco-friendly products updated",
"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, 5, 6]",
"promo_code": "SUMMER20updated",
"promotion_type": "fixed_discount",
"start_date": "Thu, 01 Jun 2023 00:00:00 GMT",
"title": "Summer Sale updated",
"updated_at": "Fri, 02 May 2025 13:18:18 GMT",
"usage_limit": 1
},
"success": true
}
Request
Header Params
Authorization
string
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTc0NjA5NDI5OSwianRpIjoiOWM1MzYzMzQtMWMxMy00MzQzLWI5YWItNjlmMWJmMDE2ZmQyIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6IjEiLCJuYmYiOjE3NDYwOTQyOTksImNzcmYiOiJkNjQ5ZGNmNy04Yzg3LTQ3NjgtYTFjYi1iNjc0OWEyZWE4YTEiLCJ1c2VybmFtZSI6ImVjb19idXllciIsImVtYWlsIjoiYnV5ZXJAZXhhbXBsZS5jb20ifQ.lDrwv2wp3a0jp7Yd9K90rrwPEA27cyZC4q7GIrCiH30
Body Params application/json
Responses
Modified at 2025-05-02 16:50:38