---
title: "POST /admin/affiliates/{id}/coupons"
method: POST
path: "/admin/affiliates/{id}/coupons"
tags: ["affiliate"]
---

# POST /admin/affiliates/{id}/coupons

`POST /admin/affiliates/{id}/coupons`

Adds a coupon code to the affiliate's account

## Request body

- union
  - object
    - `coupon` object — Adds the coupon to the affiliate's account
      - `code` string
      - `discount_type` 'percentage' | 'fixed_amount' | 'free_shipping'
      - `discount_value` number
  - object — Creates the discount code as per the automatic coupons setting of the store
    - `coupon` string

## Response `200`

- object
  - `coupons` object[]
    - `code` string
    - `discount_type` 'percentage' | 'fixed_amount' | 'free_shipping'
    - `discount_value` number

## Other responses

- `403` — Not authenticated

---

[API](https://skmtc.dev/goaffpro/apis/goaffpro-api.md) · [All operations](https://skmtc.dev/goaffpro/apis/goaffpro-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/goaffpro/goaffpro-api/revisions/832de9c7d0ae/schema)
