API · OverviewDocs navigation

Shoplio REST API

The API has 20 endpoints under one base URL. A key belongs to one shop and carries only the scopes you tick.

On this page

Base URL

Base URL
https://api.shopl.io/api/v1

Every path in this reference sits under that base. The API is not served on shopl.io: a request there answers 404 with a JSON hint that names the right host.

Your first request

  1. Create a key under Developer in the dashboard. See API keys and scopes.
  2. Send it as a bearer token on every request.
Request
curl -H "Authorization: Bearer YOUR_KEY" \
  https://api.shopl.io/api/v1/shop
200 OK
{
  "success": true,
  "data": {
    "id": "3f2a9c1b-7d44-4e0a-9a3c-1f5b8e2d6c70",
    "name": "North Keys",
    "slug": "north-keys",
    "description": "Game keys and software licences",
    "is_active": true,
    "created_at": "2026-04-01T12:00:00Z"
  }
}

The same idea from Node, reading paid orders:

Node
const url = 'https://api.shopl.io/api/v1/orders?status=paid&limit=100';
const res = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.SHOPLIO_KEY}` },
});
if (!res.ok) throw new Error(`Shoplio API answered ${res.status}`);
const { data } = await res.json();
for (const order of data.orders) {
  console.log(order.id, order.status, order.amount);
}

The response envelope

Every endpoint answers in one shape. success is true and the result is in data, or success is false and error holds a message.

Success
{ "success": true, "data": { "id": "3f2a9c1b-7d44-4e0a-9a3c-1f5b8e2d6c70" } }
Error
{ "success": false, "error": "Product not found" }

Pagination

The product, order and customer lists take page and limit.

ParameterDefaultRule
page1Counts from 1. A value below 1 is read as 1
limit20Maximum 100. A larger value is lowered to 100

Each of those lists returns total, page and limit next to the items. The stock list is not paginated.

Ids, timestamps and amounts

  • Ids are UUIDs.
  • Timestamps are RFC 3339 strings.
  • Amounts are JSON numbers unless a field table says otherwise. Order amounts are in USD and balances are in the coin.
  • The samples are abridged. A response can carry more keys than a sample or a field table shows, so ignore the ones you do not use.

What the API does not do

  • Nothing is pushed to you. Poll GET /orders for new and changed orders.
  • It does not create orders or invoices.
  • It does not delete products or variants. That stays in the dashboard.
  • It takes no file uploads. A product image is a URL you already host.
  • It does not refund an order, withdraw a balance or change shop settings.

All endpoints

EndpointWhat it doesScope
GET /shopGet the shopread_products
GET /balanceGet the balanceread_analytics
GET /productsList productsread_products
GET /products/:idGet a productread_products
POST /productsCreate a productwrite_products
PATCH /products/:idUpdate a productwrite_products
POST /products/:id/variantsAdd a variantwrite_products
PATCH /products/:id/variants/:vidUpdate a variantwrite_products
GET /products/:id/stockList unsold stockread_stock
POST /products/:id/stockAdd stockwrite_stock
PATCH /products/:id/stock/:sidEdit a stock itemedit_stock
DELETE /products/:id/stock/:sidDelete a stock itemdelete_stock
POST /products/:id/stock/deleteDelete stock in bulkdelete_stock
GET /ordersList ordersread_orders
GET /orders/:idGet an orderread_orders
POST /orders/:id/deliverDeliver an orderfulfill_orders
GET /customersList customersread_orders
GET /customers/:idGet a customerread_orders
POST /customers/:id/balance/addAdd store balancewrite_orders
POST /customers/:id/balance/subtractSubtract store balancewrite_orders

If the docs do not cover it, ask on Telegram or use the contact form.