---
title: "1. 이벤트용 매직 쿠폰을 발행합니다."
method: POST
path: "/bapi/v2/coupons/magic/register"
tags: ["Coupon"]
---

# 1. 이벤트용 매직 쿠폰을 발행합니다.

`POST /bapi/v2/coupons/magic/register`

호출하면 `event*` 필드들로 이벤트를 생성한 후, 나머지 필드들로 매직쿠폰을 생성합니다.<br>`eventId`는 아무 값이나 쓰면 되고, `eventName, eventDescription`은 윈클로부터 받습니다.<br>매직쿠폰은 모든 이벤트 참여자가 공용으로 사용하는 단일쿠폰입니다.<br>`magicCouponCode, productId`는 윈클에서 정해서 알려주어야 합니다.<br>`senderUserId`는 상품을 벌크구매한 윈클 대표 가입자ID이고 `creditId`는 윈클의 구매ID로 둘 다 내부에서 알 수 있습니다.<br>`productId`는 상품ID 입니다. (예: 캄보이아 = 1676884519406W4iqG0qk2W)<br>지급 금액 (`amount`)은 윈클에서 결정하는 각 이벤트 참여자에게 지급할 배출권 양(톤)입니다.

## Request body

- RegisterMagicCouponRequest
  - `amount` number — 참자가에게 지급할 배출권 양 (톤)
  - `creditId` string
  - `eventDescription` string
  - `eventId` string
  - `eventName` string
  - `magicCouponCode` string
  - `productId` string
  - `senderUserId` string

## Response `200`

OK

- WinclResponseDataWinclCoupon
  - `code` string
  - `data` WinclCoupon
    - `amount` number
    - `consumedAt` string, date-time
    - `couponCode` string
    - `couponStatus` 'ENABLED' | 'UNUSED' | 'USED' | 'USING'
    - `couponType` 'INDIVIDUAL' | 'MAGIC'
    - `creditId` string
    - `eventId` string
    - `id` string
    - `productId` string
    - `userId` string
  - `message` string

## Other responses

- `201` — Created
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/wincl/apis/wincl-api.md) · [All operations](https://skmtc.net/wincl/apis/wincl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wincl/wincl-api/revisions/662edcbbf2b3/schema)
