Create a discount

POST /discounts
application/json

Body Required

Responses

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"
  ]
}