Create a discount
Body Required
-
code string
-
label string
-
percentage integer
-
amount integer
-
start_date string(date-time)
-
expire_date string(date-time)
-
allows_multiple_usages boolean
-
users array[string]
POST /discounts
curl \
-X POST localhost:8080/discounts \
-H "Content-Type: application/json" \
-d '{"code":"string","label":"string","percentage":42,"amount":42,"start_date":"2023-05-04T09:42:00+00:00","expire_date":"2023-05-04T09:42:00+00:00","allows_multiple_usages":true,"users":["string"]}'
Request example
{
"code": "string",
"label": "string",
"percentage": 42,
"amount": 42,
"start_date": "2023-05-04T09:42:00+00:00",
"expire_date": "2023-05-04T09:42:00+00:00",
"allows_multiple_usages": true,
"users": [
"string"
]
}
Request examples
{
"code": "string",
"label": "string",
"percentage": 42,
"amount": 42,
"start_date": "2024-05-04T09:42:00+00:00",
"expire_date": "2024-05-04T09:42:00+00:00",
"allows_multiple_usages": true,
"users": [
"string"
]
}