Brand
Discounts
Create Discount

Create Discount

POST endpoint for /brand/discounts/create-discount in brand category

Overview

  • Method: POST
  • Path: /brand/discounts/create-discount
  • Tags: brand

Parameters

No parameters required.

Request Body

  • Content Type: application/json
  • Required: Yes
  • Schema: Defined

Responses

200

Successful response

Content Type: application/json

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "value": {
      "type": "number"
    },
    "description": {
      "type": "string"
    },
    "usageLimit": {
      "type": "number"
    },
    "minimumAmount": {
      "type": "number"
    },
    "validFrom": {
      "type": "string"
    },
    "validUntil": {
      "type": "string"
    },
    "status": {
      "type": "object"
    },
    "usageCount": {
      "type": "number"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "code",
    "type",
    "value",
    "status",
    "usageCount",
    "created_at",
    "updated_at"
  ]
}

400

Bad Request

Content Type: application/json

{
  "$ref": "#/components/schemas/Error"
}

401

Unauthorized

404

Not Found

500

Internal Server Error

Example Usage

curl -X POST \
  http://localhost:9000/brand/discounts/create-discount \
  -H "Content-Type: application/json" \
  -d '{"example": "data"}'

Interactive Testing

You can test this endpoint interactively in the Swagger UI (opens in a new tab).