SellAuth

Coupons

Get Coupons

Retrieves the coupons.

GET
/v1/shops/{shopId}/coupons

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Path Parameters

shopIdRequiredinteger

The shop ID.

curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/coupons" \
  -H "Authorization: Bearer <token>"

{
  "current_page": 1,
  "data": [
    {
      "id": 301,
      "shop_id": 38,
      "code": "My Coupon",
      "global": true,
      "discount": "10.00",
      "uses": 1,
      "max_uses": null,
      "max_uses_per_customer": null,
      "min_invoice_price": null,
      "allowed_emails": null,
      "disable_if_volume_discount": false,
      "type": "percentage",
      "start_date": null,
      "expiration_date": null,
      "items": []
    },
    {
      "id": 302,
      "shop_id": 38,
      "code": "My Coupon 2",
      "global": true,
      "discount": "5.00",
      "uses": 0,
      "max_uses": 1,
      "max_uses_per_customer": null,
      "min_invoice_price": null,
      "allowed_emails": null,
      "disable_if_volume_discount": false,
      "type": "fixed",
      "start_date": null,
      "expiration_date": null,
      "items": []
    }
  ],
  "first_page_url": "https://api.sellauth.com/v1/shops/38/coupons?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "https://api.sellauth.com/v1/shops/38/coupons?page=1",
  "links": [
    {
      "url": null,
      "label": "&laquo; Previous",
      "active": false
    },
    {
      "url": "https://api.sellauth.com/v1/shops/38/coupons?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next &raquo;",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "https://api.sellauth.com/v1/shops/38/coupons",
  "per_page": 20,
  "prev_page_url": null,
  "to": 2,
  "total": 2
}

Create Coupon

Creates a new coupon.

POST
/v1/shops/{shopId}/coupons

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonRequired
codeRequiredstring
globalRequiredboolean
discountRequirednumber

Must be at least -999999. Must not be greater than 999999.

typeRequiredstring
Value in: "percentage" | "fixed"
max_usesnumber

Must not be greater than 999999.

max_uses_per_customernumber

Must not be greater than 999999.

min_invoice_pricenumber

Must be at least 0. Must not be greater than 999999.

start_datestring

Must be a valid date. Must be a date before 2038-01-19.

expiration_datestring

Must be a valid date. Must be a date after today. Must be a date before 2038-01-19.

allowed_emailsarray<string>

Must be a valid email address.

payment_method_idsarray<string>
disable_if_volume_discountRequiredboolean
itemsarray<string>

This field is required when global is false.

Path Parameters

shopIdRequiredinteger

The shop ID.

curl -X POST "https://api.sellauth.com/v1/shops/{shopId}/coupons" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "culpa",
    "global": false,
    "discount": 19,
    "type": "percentage",
    "max_uses": 25,
    "max_uses_per_customer": 22,
    "min_invoice_price": 18,
    "start_date": "2020-05-24",
    "expiration_date": "2020-05-24",
    "allowed_emails": [
      "reichel.zetta@example.net"
    ],
    "payment_method_ids": null,
    "disable_if_volume_discount": false,
    "items": [
      "culpa"
    ]
  }'

Get Coupon

Retrieves a specific coupon.

GET
/v1/shops/{shopId}/coupons/{couponId}

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Path Parameters

shopIdRequiredinteger

The shop ID.

couponIdRequiredinteger

The coupon ID.

curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/coupons/{couponId}" \
  -H "Authorization: Bearer <token>"

{
  "id": 301,
  "code": "My Coupon",
  "salt": "7baefec544e1d",
  "global": true,
  "discount": "10.00",
  "uses": 1,
  "max_uses": null,
  "max_uses_per_customer": null,
  "min_invoice_price": null,
  "allowed_emails": null,
  "payment_method_ids": null,
  "disable_if_volume_discount": false,
  "type": "percentage",
  "start_date": null,
  "expiration_date": null,
  "shop_id": 38,
  "created_at": "2025-07-27T18:02:25.000000Z",
  "updated_at": "2025-07-27T18:03:40.000000Z",
  "items": []
}

Delete Coupon

Deletes a specific coupon.

DELETE
/v1/shops/{shopId}/coupons/{couponId}

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Path Parameters

shopIdRequiredinteger

The shop ID.

couponIdRequiredinteger

The coupon ID.

curl -X DELETE "https://api.sellauth.com/v1/shops/{shopId}/coupons/{couponId}" \
  -H "Authorization: Bearer <token>"

Delete Used Coupons

Deletes all used coupons.

DELETE
/v1/shops/{shopId}/coupons/used

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Path Parameters

shopIdRequiredinteger

The shop ID.

curl -X DELETE "https://api.sellauth.com/v1/shops/{shopId}/coupons/used" \
  -H "Authorization: Bearer <token>"

Update Coupon

Updates a specific coupon.

PUT
/v1/shops/{shopId}/coupons/{couponId}/update

Authorization

AuthorizationRequiredBearer <token>

You can retrieve your API key by visiting your dashboard and clicking Account > API.

In: header

Request Body

application/jsonRequired
codeRequiredstring
globalRequiredboolean
discountRequirednumber

Must be at least -999999. Must not be greater than 999999.

typeRequiredstring
Value in: "percentage" | "fixed"
max_usesnumber

Must not be greater than 999999.

max_uses_per_customernumber

Must not be greater than 999999.

min_invoice_pricenumber

Must be at least 0. Must not be greater than 999999.

start_datestring

Must be a valid date. Must be a date before 2038-01-19.

expiration_datestring

Must be a valid date. Must be a date after today. Must be a date before 2038-01-19.

allowed_emailsarray<string>

Must be a valid email address.

payment_method_idsarray<string>
disable_if_volume_discountRequiredboolean
itemsarray<string>

This field is required when global is false.

Path Parameters

shopIdRequiredinteger

The shop ID.

couponIdRequiredinteger
curl -X PUT "https://api.sellauth.com/v1/shops/{shopId}/coupons/{couponId}/update" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "culpa",
    "global": false,
    "discount": 19,
    "type": "percentage",
    "max_uses": 25,
    "max_uses_per_customer": 22,
    "min_invoice_price": 18,
    "start_date": "2020-05-24",
    "expiration_date": "2020-05-24",
    "allowed_emails": [
      "reichel.zetta@example.net"
    ],
    "payment_method_ids": null,
    "disable_if_volume_discount": false,
    "items": [
      "culpa"
    ]
  }'