# Organization API: Org Staff Coupons

> Every Organization API operation tagged Org Staff Coupons.

Source: https://docs.coritan.com/api/reference/organizations/org-staff-coupons/

Base URL: `https://api.coritan.com/api/v1`. Paths below are complete.

To try these requests in the browser, open the [interactive Organization API reference](https://api.coritan.com/docs/org).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/staff/coupons`](#op-get-api-v1-orgs-org-slug-staff-coupons) | Staff list coupons |
| POST | [`/api/v1/orgs/{org_slug}/staff/coupons`](#op-post-api-v1-orgs-org-slug-staff-coupons) | Staff create coupon |
| POST | [`/api/v1/orgs/{org_slug}/staff/coupons/feature`](#op-post-api-v1-orgs-org-slug-staff-coupons-feature) | Turn coupons on or off for the brand |
| PATCH | [`/api/v1/orgs/{org_slug}/staff/coupons/{coupon_id}`](#op-patch-api-v1-orgs-org-slug-staff-coupons-coupon-id) | Staff patch coupon |
| GET | [`/api/v1/orgs/{org_slug}/staff/coupons/{coupon_id}/redemptions`](#op-get-api-v1-orgs-org-slug-staff-coupons-coupon-id-redemptions) | Staff coupon redemptions |

### Staff list coupons {#op-get-api-v1-orgs-org-slug-staff-coupons}

`GET /api/v1/orgs/{org_slug}/staff/coupons`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |
| `status` | query | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff create coupon {#op-post-api-v1-orgs-org-slug-staff-coupons}

`POST /api/v1/orgs/{org_slug}/staff/coupons`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `code` | string | yes |
| `description` | string or null | no |
| `kind` | string | no |
| `value` | number or string | yes |
| `currency` | string or null | no |
| `applies_to` | array of integer or null | no |
| `first_invoice_only` | boolean | no |
| `max_redemptions` | integer or null | no |
| `per_customer_limit` | integer | no |
| `starts_at` | string (date-time) or null | no |
| `ends_at` | string (date-time) or null | no |
| `status` | string | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `201` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Turn coupons on or off for the brand {#op-post-api-v1-orgs-org-slug-staff-coupons-feature}

`POST /api/v1/orgs/{org_slug}/staff/coupons/feature`

Turn coupons on or off for the brand. Off means the checkout shows no
code field and every code is refused, whatever its status.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `enabled` | boolean | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff patch coupon {#op-patch-api-v1-orgs-org-slug-staff-coupons-coupon-id}

`PATCH /api/v1/orgs/{org_slug}/staff/coupons/{coupon_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `coupon_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `description` | string or null | no |
| `value` | number or string or null | no |
| `applies_to` | array of integer or null | no |
| `clear_applies_to` | boolean | no |
| `max_redemptions` | integer or null | no |
| `clear_max_redemptions` | boolean | no |
| `per_customer_limit` | integer or null | no |
| `starts_at` | string (date-time) or null | no |
| `ends_at` | string (date-time) or null | no |
| `clear_ends_at` | boolean | no |
| `status` | string or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Staff coupon redemptions {#op-get-api-v1-orgs-org-slug-staff-coupons-coupon-id-redemptions}

`GET /api/v1/orgs/{org_slug}/staff/coupons/{coupon_id}/redemptions`

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `coupon_id` | path | integer | yes |  |
| `org_slug` | path | string | yes |  |
| `limit` | query | integer | no | Default: `100`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
