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

{
  "message": "No query results for model [App\\Models\\Shop] 1"
}

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 0.

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.

disable_if_volume_discountRequiredboolean
itemsarray<integer>

This field is required when global is false.

Path Parameters

shopIdRequiredinteger
curl -X POST "https://api.sellauth.com/v1/shops/{shopId}/coupons" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "vero",
    "global": true,
    "discount": 35,
    "type": "fixed",
    "max_uses": 18,
    "max_uses_per_customer": 1,
    "min_invoice_price": 14,
    "start_date": "2031-10-09",
    "expiration_date": "2027-01-27",
    "allowed_emails": [
      "jayden.treutel@example.com"
    ],
    "disable_if_volume_discount": false,
    "items": [
      "aliquid"
    ]
  }'

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
couponIdRequiredstring
curl -X GET "https://api.sellauth.com/v1/shops/{shopId}/coupons/omnis" \
  -H "Authorization: Bearer <token>"

{
  "message": "No query results for model [App\\Models\\Shop] 1"
}

Get Coupon

Retrieves 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
couponIdRequiredstring
curl -X DELETE "https://api.sellauth.com/v1/shops/{shopId}/coupons/omnis" \
  -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
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 0.

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.

disable_if_volume_discountRequiredboolean
itemsarray<integer>

This field is required when global is false.

Path Parameters

shopIdRequiredinteger
couponIdRequiredstring
curl -X PUT "https://api.sellauth.com/v1/shops/{shopId}/coupons/non/update" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "aut",
    "global": false,
    "discount": 63,
    "type": "percentage",
    "max_uses": 13,
    "max_uses_per_customer": 10,
    "min_invoice_price": 12,
    "start_date": "2008-07-01",
    "expiration_date": "2013-12-25",
    "allowed_emails": [
      "hailey13@example.org"
    ],
    "disable_if_volume_discount": false,
    "items": [
      "omnis"
    ]
  }'