SellSN API docs
HomeHelpStatus
  • Introduction
  • Embeds
  • Webhooks
  • API reference
    • Authorization
    • Users
    • Stores
    • Orders
    • Products
    • Product groups
    • Tickets
    • Coupons
    • Miscellaneous objects
  • OAuth2
    • Credentials
    • Permissions
    • Authorizing users
Powered by GitBook
On this page

Was this helpful?

  1. API reference

Coupons

Get yourself more purchases with a coupon, but maybe not more profit...

PreviousTicketsNextMiscellaneous objects

Last updated 1 year ago

Was this helpful?

Page cover image

Delete coupon

delete

Deletes an existing coupon from the store. Requires the Scopes.DeleteCoupons permission

Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store the coupon belongs to

couponIdstring · uuidRequired

The ID of the coupon to delete

Responses
200
The object was successfully deleted.
400
The provided form information is not valid, check that the provided data is valid. You can use the 'invalidFields' field to get the list of invalid fields or just use the 'message' field.
401
You are not authorized, check your API key and try again.
403
You are not authorized to access this endpoint, you may be missing an API key scope or be requesting a privileged endpoint.
404
One of the objects referenced by the ID given in the URL or form was not found, check the ID and try again.
delete
DELETE /stores/{storeId}/coupons/{couponId} HTTP/1.1
Host: api.sellsn.io
Authorization: Bearer JWT
Accept: */*
{
  "success": true,
  "message": "text",
  "data": null
}
  • GETGet coupons
  • POSTCreate coupon
  • PUTUpdate coupon
  • DELETEDelete coupon

Get coupons

get

Gets the coupons in the store. Requires the Scopes.ViewCoupons API key scope

Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store to get the coupons in

pageinteger · int32Required

The page to select when viewing the coupons

Query parameters
countinteger · int32Optional

The amount of coupons to display in one page

Responses
200
The object was successfully returned.
401
You are not authorized, check your API key and try again.
403
You are not authorized to access this endpoint, you may be missing an API key scope or be requesting a privileged endpoint.
404
One of the objects referenced by the ID given in the URL or form was not found, check the ID and try again.
get
GET /stores/{storeId}/coupons/{page} HTTP/1.1
Host: api.sellsn.io
Authorization: Bearer JWT
Accept: */*
{
  "success": true,
  "pages": 1,
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "dateCreated": "2025-05-21T13:11:05.752Z",
      "name": "text",
      "uses": 1,
      "maximumUses": 1,
      "percentageDecrease": 1,
      "isEnabled": true
    }
  ]
}

Create coupon

post

Creates a new coupon in the store. Requires the Scopes.CreateCoupons API key scope

Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store to create the coupon in

Body

The data-transfer object for a coupon, can be used for creating or updating a coupon and returned by the API when getting coupons

namestring · min: 3 · max: 25Required

The case-sensitive name the customer will enter to redeem the coupon

maximumUsagesinteger · int32Optional

The maximum amount of usages the coupon code has, -1 = infinite

percentageDecreasenumber · doubleOptional

The percentage that should be subtracted from the total order cost when used

isEnabledbooleanOptional

Whether the coupon code is enabled and can be used in checkout

Responses
200
The object was successfully created.
400
The provided form information is not valid, check that the provided data is valid. You can use the 'invalidFields' field to get the list of invalid fields or just use the 'message' field.
401
You are not authorized, check your API key and try again.
403
You are not authorized to access this endpoint, you may be missing an API key scope or be requesting a privileged endpoint.
404
One of the objects referenced by the ID given in the URL or form was not found, check the ID and try again.
post
POST /stores/{storeId}/coupons HTTP/1.1
Host: api.sellsn.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "name": "text",
  "maximumUsages": 1,
  "percentageDecrease": 1,
  "isEnabled": true
}
{
  "success": true,
  "message": "text",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "dateCreated": "2025-05-21T13:11:05.752Z",
    "name": "text",
    "uses": 1,
    "maximumUses": 1,
    "percentageDecrease": 1,
    "isEnabled": true
  }
}

Update coupon

put
Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store that the coupon belongs to

couponIdstring · uuidRequired

The ID of the coupon to update

Body

The data-transfer object for a coupon, can be used for creating or updating a coupon and returned by the API when getting coupons

namestring · min: 3 · max: 25Required

The case-sensitive name the customer will enter to redeem the coupon

maximumUsagesinteger · int32Optional

The maximum amount of usages the coupon code has, -1 = infinite

percentageDecreasenumber · doubleOptional

The percentage that should be subtracted from the total order cost when used

isEnabledbooleanOptional

Whether the coupon code is enabled and can be used in checkout

Responses
200
The object was successfully updated.
400
The provided form information is not valid, check that the provided data is valid. You can use the 'invalidFields' field to get the list of invalid fields or just use the 'message' field.
401
You are not authorized, check your API key and try again.
403
You are not authorized to access this endpoint, you may be missing an API key scope or be requesting a privileged endpoint.
404
One of the objects referenced by the ID given in the URL or form was not found, check the ID and try again.
put
PUT /stores/{storeId}/coupons/{couponId} HTTP/1.1
Host: api.sellsn.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "name": "text",
  "maximumUsages": 1,
  "percentageDecrease": 1,
  "isEnabled": true
}
{
  "success": true,
  "message": "text",
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "dateCreated": "2025-05-21T13:11:05.752Z",
    "name": "text",
    "uses": 1,
    "maximumUses": 1,
    "percentageDecrease": 1,
    "isEnabled": true
  }
}