> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shoply.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Reseller API and delivery URLs

> For a store's resellers: sell on your own shop with a delivery URL, or read and buy from your own code with an API key

This page is for a store's [resellers](https://docs.shoply.gg/guides/resellers.md). Both are on your panel's **API & Delivery** page: delivery URLs for the account's owner and members with **Manage Delivery URLs**, API keys for those with **Manage API Keys**.

## Delivery URLs

A delivery URL sells one product from your panel on your own shop. Paste it into your shop's dynamic delivery for that product. On every sale there, your shop calls the URL, which buys the product from your balance at your price and answers with the keys.

1. On **API & Delivery**, press **Add Delivery URL** and choose the product.
2. Optionally give it a **Daily Cap**, the most it delivers in a day (UTC), and a **Signing Secret** (below).
3. Copy the URL and paste it into your shop's dynamic delivery for that product.

Anyone who has a delivery URL can buy with your balance, so the page shows only the last characters of each. The eye beside it shows the whole URL, and the copy button always copies all of it.

The URL works on your panel's own domain and on your store's `myshoply.gg` address alike. It sells keys and made-on-demand products, which is everything the panel sells.

### What it answers

| Your shop | What it is answered |
| - | - |
| A Shoply store | `{"items": ["KEY-1", "KEY-2"]}`, one entry a key, as Shoply's dynamic delivery reads it |
| SellAuth | The keys as plain text, one a line |
| Any other | The keys as plain text, one a line |

The quantity is read from the call: a Shoply store's `quantity`, SellAuth's `item.quantity`, and otherwise `quantity` in a JSON body or in the address (`?quantity=3`). One call buys from 1 to 1,000.

### The same sale, called again

If your shop calls again for a sale it already called about, the URL answers with the same keys and buys nothing more. A sale is told apart by a Shoply store's delivery ID, by SellAuth's `Idempotency-Key`, and by an `Idempotency-Key` header from any other shop. A call with none of these buys every time.

### Signing secret

With a signing secret, the URL refuses any call your shop didn't sign. Paste your shop's own webhook secret:

* **A Shoply store**: its dynamic delivery's signing secret. `X-Shoply-Signature` is checked, and refused when its timestamp is more than five minutes old.
* **SellAuth and others**: the secret they sign with. `X-Signature`, the HMAC-SHA256 of the request's body, is checked.

### When it can't deliver

Your shop's buyer is told only `This item could not be delivered right now. Please contact the seller.` The reason is under the URL's product on **API & Delivery**: your balance was too low, it reached its daily cap, the call wasn't signed, and the like. Top up, and a call made again for the same sale goes through.

## API keys

An API key lets your own code read your balance, the panel's products and your orders, and buy. It reads and buys as the member who made it, with that member's permissions, and stops working when they are taken off the team or lose **Manage API Keys**. A request their permissions don't cover is refused with `403` and the code `reseller_permission`, and `needs` lists the permissions any one of which would allow it: `GET /api/resellers/v1/balance` wants `balance.view`, the products `products.view`, buying `products.buy`, the orders `orders.view`, and an order's keys `orders.keys` (without it, an order is read without its keys).

On **API & Delivery**, press **Add API Key** and name it. The key, `shoply_rk_` followed by 48 characters, is shown once: copy it then.

Send it in each request:

```bash theme={null}
curl https://your-store.myshoply.gg/api/resellers/v1/products \
  -H "Authorization: Bearer shoply_rk_..."
```

Use your panel's own address: your store's `myshoply.gg` address, or your panel's own domain. Every answer is `{"success": true, "data": ...}`, and a refusal `{"success": false, "message": "...", "code": "..."}` with its HTTP status.

| Endpoint | What it does |
| - | - |
| `GET /api/resellers/v1/me` | Who the key is, your business, your balance and the panel |
| `GET /api/resellers/v1/balance` | Your balance, top-ups waiting for payment, and its history |
| `GET /api/resellers/v1/products` | What the panel sells, at your price, with its stock |
| `POST /api/resellers/v1/orders` | Buys `quantity` of `variantId` from your balance, or several in one order with `lines` |
| `GET /api/resellers/v1/orders` | Your orders, newest first, 25 a page (`?page=`, `?q=`, `?via=panel`, `api` or `url`) |
| `GET /api/resellers/v1/orders/{id}` | One order, with its keys where the key's member may see keys |

### Buying

```bash theme={null}
curl -X POST https://your-store.myshoply.gg/api/resellers/v1/orders \
  -H "Authorization: Bearer shoply_rk_..." \
  -H "Content-Type: application/json" \
  -d '{"variantId": "8fcde167-5fc0-46a6-a585-a89c6b1d90b7", "quantity": 2}'
```

```json theme={null}
{ "success": true, "data": { "orderId": "8c8b5h0p1y8-82d79c35f74-1027671", "balance": 212.85 } }
```

To buy several things in one order, send `lines` in place of `variantId` and `quantity`: up to 50 of them, and 1,000 at the most in all. Every line is bought or none is: a line that can't be bought is refused with its error under `lines.<n>.quantity`, counted from 0, and nothing is taken from your balance. The same `variantId` twice is one line.

```bash theme={null}
curl -X POST https://your-store.myshoply.gg/api/resellers/v1/orders \
  -H "Authorization: Bearer shoply_rk_..." \
  -H "Content-Type: application/json" \
  -d '{"lines": [{"variantId": "8fcde167-5fc0-46a6-a585-a89c6b1d90b7", "quantity": 2}, {"variantId": "b9a7476a-7e93-4b6c-ad81-639310f26a6f", "quantity": 1}]}'
```

Then read the order for its keys:

```json theme={null}
{
  "success": true,
  "data": {
    "id": "8c8b5h0p1y8-82d79c35f74-1027671",
    "status": "completed",
    "via": "api",
    "boughtBy": "you",
    "currency": "USD",
    "total": 93.6,
    "profit": 23.4,
    "balanceAfter": 212.85,
    "createdAt": "2026-11-06T18:12:00Z",
    "keysShown": true,
    "lines": [
      { "productName": "Pixel Studio Pro", "variantName": "Lifetime", "unitPrice": 46.8, "quantity": 2, "keys": ["KEY-1", "KEY-2"], "items": [], "waiting": false, "instructions": "" }
    ]
  }
}
```

`boughtBy` is who bought it, as the key's member sees it: `you`, `owner` or `member` (a team member), never an email. `profit` is what the order would have cost at the panel's list prices, less what you paid. `waiting` is `true` while a product made on demand is still being fetched.

`GET /api/resellers/v1/orders` lists each order with the first option it bought, its `lines` (how many options it bought), its `total` and its `profit`. Beside the list, `counts` has how many orders were bought each way, and `figures` has the `orders`, `spent`, `units` and `profit` of what the search and `via` show.

A product's `variantId`, your `price`, its `stock` (keys left, or `null` for one made on demand), `minQty` and `leftToday` come from `GET /api/resellers/v1/products`.

Beside its `products`, a line for each option, that answer has `catalogue`: each product in the panel's order, with its `productId`, `name`, `category` (its first category, or `""`), `badges` (its status and labels on the panel, which the store sets for it there: `{"label", "color", "kind"}`, `kind` being `status` for at most one of them), `images` (its pictures' addresses, in the store's order), `features` (the store's feature list for it: `{"type": "feature", "name"}`, or `{"type": "category", "name", "features": [names]}`) and `variantIds`, its options in `products`. And `guideUrl`, the store's setup guide, or `""` where it has none. Each line of `products` names its product's `productId`.

## Limits

| | Starter | Business | Scale |
| - | - | - | - |
| **Delivery URLs a reseller** | 5 | 25 | 100 |
| **API keys a reseller** | 1 | 2 | 10 |

* A delivery URL takes 120 calls a minute, and a reseller's URLs 600 between them.
* An API key makes 120 requests a minute.
* Past either, the answer is `429`. A shop's calls are never counted by its address: the shops that call share servers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.