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

Orders

Creating and viewing orders

PreviousStoresNextProducts

Last updated 2 months ago

Was this helpful?

Get order by ID

get

Gets an order by the given ID in the store

Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store to get the order in

orderIdstring · uuidRequired

The ID of the order to get

Responses
200
The object was successfully returned.
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.
get
GET /stores/{storeId}/orders/{orderId} HTTP/1.1
Host: api.sellsn.io
Authorization: Bearer JWT
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "dateCreated": "2025-05-21T11:56:58.046Z",
  "products": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "dateCreated": "2025-05-21T11:56:58.046Z",
      "product": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "dateCreated": "2025-05-21T11:56:58.046Z",
        "name": "text",
        "slug": "text",
        "description": "text",
        "cost": 1,
        "amountSold": 1,
        "files": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "dateCreated": "2025-05-21T11:56:58.046Z",
            "friendlyName": "text"
          }
        ],
        "tags": [
          "text"
        ],
        "webhookUrl": "text",
        "visibility": 0,
        "isPinned": true,
        "isDynamic": true,
        "imageNames": [
          "text"
        ],
        "keyAuthOptions": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "dateCreated": "2025-05-21T11:56:58.046Z",
          "isEnabled": true,
          "mask": "text",
          "level": "text",
          "expiryDays": 1
        },
        "ignoreOutOfStock": true,
        "customValueKeys": [
          "text"
        ],
        "shouldBlockVirtualPrivateNetworks": true,
        "deliveryMessage": "text",
        "minimumQuantity": 1,
        "maximumQuantity": 1,
        "order": 1,
        "likes": 1,
        "isBestSeller": true,
        "blacklistedPaymentGateways": [
          "text"
        ],
        "additionalFees": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        },
        "metadata": "text",
        "category": "text",
        "discordServerId": 1,
        "discordRoleId": 1,
        "requireDiscordAuthorization": true,
        "type": 0,
        "subscriptionPeriod": "text",
        "listedUntil": "2025-05-21T11:56:58.046Z",
        "subscriptionId": "text",
        "buttonLabel": "text",
        "buttonLink": "text"
      },
      "quantity": 1
    }
  ],
  "deliveredItem": "text",
  "status": "text",
  "gateway": "text",
  "transactionId": "text",
  "countryCode": "text",
  "ipAddress": "text",
  "userAgent": "text",
  "customer": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "dateCreated": "2025-05-21T11:56:58.046Z",
    "emailAddress": "text",
    "ipAddress": "text",
    "subscriptions": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "dateCreated": "2025-05-21T11:56:58.046Z",
        "expirationDate": "2025-05-21T11:56:58.046Z",
        "startDate": "2025-05-21T11:56:58.046Z",
        "customerId": "123e4567-e89b-12d3-a456-426614174000",
        "storeId": "123e4567-e89b-12d3-a456-426614174000",
        "productId": "123e4567-e89b-12d3-a456-426614174000"
      }
    ]
  },
  "cost": 1,
  "amountPaid": 1,
  "gatewayFee": 1,
  "platformFee": 1,
  "cryptoPrice": 1,
  "customValues": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "dateCreated": "2025-05-21T11:56:58.046Z",
      "key": "text",
      "value": "text"
    }
  ],
  "cryptocurrencyAddress": "text",
  "hasWarranty": true,
  "isMarketplace": true,
  "coupon": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "dateCreated": "2025-05-21T11:56:58.046Z",
    "name": "text",
    "uses": 1,
    "maximumUses": 1,
    "percentageDecrease": 1,
    "isEnabled": true,
    "enabledProductIds": [
      "123e4567-e89b-12d3-a456-426614174000"
    ],
    "storeId": "123e4567-e89b-12d3-a456-426614174000"
  },
  "discordUserId": 1,
  "discordUserName": "text",
  "key": "text",
  "affiliateCustomerId": "123e4567-e89b-12d3-a456-426614174000"
}

Get orders

get

Gets all the orders associated with a store and returns them as a paginated response, there is no way to get all orders in one response. Requires the Scopes.ViewOrders permission

Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store to get the orders for

pageinteger · int32Required

The page to select when viewing the orders

Query parameters
countinteger · int32Optional

The amount of orders to display in one page

Responses
200
The object was successfully returned.
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.
get
GET /stores/{storeId}/orders/{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-21T11:56:58.046Z",
      "products": [
        {
          "product": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "dateCreated": "2025-05-21T11:56:58.046Z",
            "name": "text",
            "description": "text",
            "tags": [
              "text"
            ],
            "imageNames": [
              "text"
            ],
            "cost": 1,
            "type": 0,
            "subscriptionPeriod": "text",
            "stock": 1,
            "ignoreOutOfStock": true,
            "isDynamic": true,
            "rating": 1,
            "minimumQuantity": 1,
            "maximumQuantity": 1,
            "order": 1,
            "visibility": 0,
            "likes": 1,
            "customValueKeys": [
              "text"
            ],
            "store": "[Circular Reference]",
            "discordRoleId": 1,
            "requireDiscordAuthorization": true,
            "useDiscordIntegration": true,
            "deliveryMessage": "text",
            "slug": "text",
            "buttonLabel": "text",
            "buttonLink": "text"
          },
          "quantity": 1
        }
      ],
      "quantity": 1,
      "gateway": "text",
      "transactionId": "text",
      "cryptoAddress": "text",
      "customer": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "dateCreated": "2025-05-21T11:56:58.046Z",
        "emailAddress": "text",
        "linkedIntegrations": [
          "text"
        ]
      },
      "status": "text",
      "amountPaid": 1,
      "gatewayFee": 1,
      "hasWarranty": true,
      "isMarketplace": true,
      "customValues": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "cost": 1,
      "key": "text",
      "coupon": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "dateCreated": "2025-05-21T11:56:58.046Z",
        "name": "text",
        "percentageDecrease": 1
      },
      "deliveredItem": "text"
    }
  ]
}

Create order

post

Creates a new order and returns all the data. Requires the Scopes.CreateOrders permission

Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store to create the order for

Responses
200
The object was successfully returned.
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}/orders HTTP/1.1
Host: api.sellsn.io
Authorization: Bearer JWT
Accept: */*
{
  "success": true,
  "pages": 1,
  "data": [
    {
      "order": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "dateCreated": "2025-05-21T11:56:58.046Z",
        "products": [
          {
            "product": "[Circular Reference]",
            "quantity": 1
          }
        ],
        "quantity": 1,
        "gateway": "text",
        "transactionId": "text",
        "cryptoAddress": "text",
        "customer": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "dateCreated": "2025-05-21T11:56:58.046Z",
          "emailAddress": "text",
          "linkedIntegrations": [
            "text"
          ]
        },
        "status": "text",
        "amountPaid": 1,
        "gatewayFee": 1,
        "hasWarranty": true,
        "isMarketplace": true,
        "customValues": [
          {
            "key": "text",
            "value": "text"
          }
        ],
        "cost": 1,
        "key": "text",
        "coupon": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "dateCreated": "2025-05-21T11:56:58.046Z",
          "name": "text",
          "percentageDecrease": 1
        },
        "deliveredItem": "text"
      },
      "checkoutUrl": "text"
    }
  ]
}

Manually deliver order

put

Delivers the given order manually as if the customer purchased it through regular means, requires the Scopes.DeliverOrders permission. This will not do anything if the order has already been delivered

Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store the order belongs to

orderIdstring · uuidRequired

The ID of the order to deliver

Responses
200
The operation was successfully completed.
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}/orders/{orderId}/deliver HTTP/1.1
Host: api.sellsn.io
Authorization: Bearer JWT
Accept: */*
{
  "success": true,
  "message": "text",
  "data": null
}

Search for orders

get
Authorizations
Path parameters
storeIdstring · uuidRequired

The ID of the store to search for orders in

pageinteger · int32Required

The page to select when viewing the orders

querystringRequired

The query to search when looking for orders, you can use an exact ID and get the first element to find an order by the ID and search by customer email address

Responses
200
The object was successfully returned.
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.
get
GET /stores/{storeId}/orders/{page}/search/{query} 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-21T11:56:58.046Z",
      "products": [
        {
          "product": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "dateCreated": "2025-05-21T11:56:58.046Z",
            "name": "text",
            "description": "text",
            "tags": [
              "text"
            ],
            "imageNames": [
              "text"
            ],
            "cost": 1,
            "type": 0,
            "subscriptionPeriod": "text",
            "stock": 1,
            "ignoreOutOfStock": true,
            "isDynamic": true,
            "rating": 1,
            "minimumQuantity": 1,
            "maximumQuantity": 1,
            "order": 1,
            "visibility": 0,
            "likes": 1,
            "customValueKeys": [
              "text"
            ],
            "store": "[Circular Reference]",
            "discordRoleId": 1,
            "requireDiscordAuthorization": true,
            "useDiscordIntegration": true,
            "deliveryMessage": "text",
            "slug": "text",
            "buttonLabel": "text",
            "buttonLink": "text"
          },
          "quantity": 1
        }
      ],
      "quantity": 1,
      "gateway": "text",
      "transactionId": "text",
      "cryptoAddress": "text",
      "customer": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "dateCreated": "2025-05-21T11:56:58.046Z",
        "emailAddress": "text",
        "linkedIntegrations": [
          "text"
        ]
      },
      "status": "text",
      "amountPaid": 1,
      "gatewayFee": 1,
      "hasWarranty": true,
      "isMarketplace": true,
      "customValues": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "cost": 1,
      "key": "text",
      "coupon": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "dateCreated": "2025-05-21T11:56:58.046Z",
        "name": "text",
        "percentageDecrease": 1
      },
      "deliveredItem": "text"
    }
  ]
}
  • GETGet order by ID
  • GETGet orders
  • POSTCreate order
  • PUTManually deliver order
  • GETSearch for orders