Organization API: Org Staff Coupons
Every Organization API operation tagged 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.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/staff/coupons |
The brand's coupons, newest first, with what each has cost and earned |
| POST | /api/v1/orgs/{org_slug}/staff/coupons |
Staff create coupon |
| 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} |
Staff patch coupon |
| GET | /api/v1/orgs/{org_slug}/staff/coupons/{coupon_id}/redemptions |
Staff coupon redemptions |
The brand's coupons, newest first, with what each has cost and earned
Section titled The brand's coupons, newest first, with what each has cost and earnedGET /api/v1/orgs/{org_slug}/staff/coupons
The brand's coupons, newest first, with what each has cost and earned.
Each coupon carries total_discounted (everything it has taken off,
ever) and performance over the last 90 days: orders (redemptions),
net_revenue (paid on the invoices that used it), discount_cost,
new_customers (redeeming customers who signed up in the window),
currency and window_days. Money is in the currency most of the
redemptions were in; by_currency lists every currency when there are
several. Needs Tier 3 support or above.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
status |
query | string or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff create coupon
Section titled Staff create couponPOST /api/v1/orgs/{org_slug}/staff/coupons
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
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 | |
campaign |
string or null | no | The marketing campaign the code belongs to, such as summer-launch. Orders that use the code carry it. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Turn coupons on or off for the brand
Section titled Turn coupons on or off for the brandPOST /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
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
enabled |
boolean | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff patch coupon
Section titled Staff patch couponPATCH /api/v1/orgs/{org_slug}/staff/coupons/{coupon_id}
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
coupon_id |
path | integer | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
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 | |
campaign |
string or null | no | The marketing campaign the code belongs to. An empty string clears it. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Staff coupon redemptions
Section titled Staff coupon redemptionsGET /api/v1/orgs/{org_slug}/staff/coupons/{coupon_id}/redemptions
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
coupon_id |
path | integer | yes | |
org_slug |
path | string | yes | |
limit |
query | integer | no | Default: 100. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |