Post Promotion for Product ID
Post Promotion for Product ID
POST /promotion/{product_id}
Headers
| Name | Description | Type |
|---|---|---|
| tenantId* | string (header) | string |
| userId* | string (header) | string |
Path Parameters
| Name | Description | Type |
|---|---|---|
| product_id | Product ID | string |
Request Body
{
"name": "string",
"discountType": "FIXED",
"amount": 0,
"percentage": 0,
"endDate": "string"
}
Responses
200 OK
Description: Successful operation
Example Request
{
"message": "string",
"data": {
"id": "string",
"name": "string",
"description": "string",
"discountType": "FIXED",
"amount": 0,
"percentage": 0,
"endDate": "2024-07-17T17:24:27.299Z",
"isActive": true
},
"meta": {
"currentPage": 0,
"from": 0,
"to": 0,
"perPage": 0,
"total": 0,
"lastPage": 0
}
}