---
title: "Create Discount Code"
method: POST
path: "/event/create/discount-code/"
tags: ["event"]
---

# Create Discount Code

`POST /event/create/discount-code/`

## Request body

- CreateDiscountCode
  - `event_id` integer, nullable
  - `discount_code` string, nullable
  - `is_auto_apply` boolean, nullable
  - `usage_type` string, nullable
  - `usage_limit` integer, nullable
  - `discount_in_amount` union
    - number
    - string
  - `discount_in_percentage` union
    - number
    - string
  - `is_now_start` boolean, nullable
  - `is_scheduled_start` boolean, nullable
  - `start_date` string, nullable
  - `start_time` string, nullable
  - `is_ticket_sale_end_date` boolean, nullable
  - `is_scheduled_end` boolean, nullable
  - `end_date` string, nullable
  - `end_time` string, nullable
  - `description` string, nullable
  - `all_visible_tickets` boolean, nullable
  - `all_hidden_tickets` boolean, nullable
  - `is_select_menually` boolean, nullable
  - `ticket_names` string[], nullable
  - `add_on_uuids` string[], nullable
  - `auto_attach_with_ticket` boolean, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `404` — Not found
- `422` — Validation Error

---

[API](https://skmtc.dev/myticketpartner/apis/fastapi.md) · [All operations](https://skmtc.dev/myticketpartner/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/myticketpartner/fastapi/revisions/b574a0cabefe/schema)
