Sell Supplied products from your own store.
Send us your customers' orders. We pick, pack and ship them in your name, and tell you what happened. The API is your whole interface.
Introduction
For storefronts that sell Supplied products without holding stock. You send us your customers' orders; we pick, pack and ship them in your name, and tell you what happened. There is no portal to log in to: this API is the whole interface.
The basics
| Base URL | https://api.supplied.example/functions/v1/supplied-partner-api/v1Supplied gives you the host. Type it in the box at the top of this page and every example uses it. |
| Format | JSON in and out. Fields are snake_case. Amounts are integer cents (1800 is $18.00, always USD). Times are ISO 8601; the ones we generate are UTC. Read a timestamp that comes from the warehouse (shipped_at, delivered_at) with a standard ISO 8601 parser, as it may carry an offset. |
| Authentication | Your API key, as a bearer token. How keys and test mode work. |
| Server to server | Call the API from your server only. It refuses browsers (no CORS) so a key can never be used from a web page. |
| Request-Id | Every answer has a Request-Id header. Quote it if you contact Supplied. |
| Limits | Request bodies up to 256,000 bytes. Up to 200 lines per order. Up to 5 webhook endpoints per mode. |
How the pieces fit
Quickstart
Five steps from nothing to a delivered test order. Use a test key (sk_test_…): nothing reaches the warehouse and nothing is invoiced.
1. Get your keys
Supplied gives you a test key and a live key, and the API host. Keep them on your server, for example in an environment variable called SUPPLIED_API_KEY. The examples below read the key from there.
2. See your catalog
Your catalog is what you can order, at your prices, with live stock. Prices are in cents.
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/products" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/products', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/products",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "product",
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"description": "Research peptide, 10 mg vial",
"unit_price_cents": 1800,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 100,
"inventory_as_of": "2026-11-03T15:04:05Z",
"image_url": "https://api.supplied.example/storage/v1/object/public/supplied-product-photos/forms/v1/bare/vial.jpg"
},
{
"object": "product",
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"description": null,
"unit_price_cents": 2200,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 1,
"inventory_as_of": "2026-11-03T15:04:46Z",
"image_url": "https://api.supplied.example/storage/v1/object/public/supplied-product-photos/forms/v1/bare/vial.jpg"
},
{
"object": "product",
"sku": "PL-TB4-GLOW",
"name": "TB-500 5mg (Glow label)",
"description": null,
"unit_price_cents": 2600,
"currency": "USD",
"min_quantity": 5,
"price_tiers": [],
"available": 40,
"inventory_as_of": "2026-11-03T15:05:27Z",
"image_url": "https://api.supplied.example/storage/v1/object/public/supplied-product-photos/forms/v1/bare/vial.jpg"
}
]
}3. Place a test order
Send your own order number as external_id. It is how we recognise a retry, so sending the same order twice never creates two.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "TEST-RUN-1",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "TEST-RUN-1",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "TEST-RUN-1",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2,
},
],
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "TEST-1046-89FE",
"external_id": "TEST-RUN-1",
"livemode": false,
"status": "received",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:17:04Z",
"updated_at": "2026-11-03T15:17:04Z",
"shipping_cents": 5000
}4. Ship it, then deliver it
With a test key, two helpers play the warehouse. They move the order along and send the same webhooks a real shipment would.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS",
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "TEST-1046-89FE",
"external_id": "TEST-RUN-1",
"livemode": false,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:17:45Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:17:04Z",
"updated_at": "2026-11-03T15:17:45Z",
"shipping_cents": 5000
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/deliver" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/deliver', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/deliver",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "order",
"id": "TEST-1046-89FE",
"external_id": "TEST-RUN-1",
"livemode": false,
"status": "delivered",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:17:45Z",
"delivered_at": "2026-11-03T15:18:26Z",
"cancelled_at": null,
"created_at": "2026-11-03T15:17:04Z",
"updated_at": "2026-11-03T15:18:26Z",
"shipping_cents": 5000
}5. Get told when things change
Subscribe an HTTPS address on your server. We check it answers before we send anything, and the secret in the answer is how you verify every delivery. More on webhooks.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated"
],
"description": "production"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated"
],
"description": "production"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated",
],
"description": "production",
},
)
print(res.status_code, res.json()){
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"inventory.updated",
"order.delivered",
"order.shipped"
],
"description": "production",
"livemode": true,
"status": "active",
"secret": "whsec_5d2f7c1e9b0a4d38a6f1c2e7b9d04a83",
"health": {
"consecutive_failures": 0,
"pending": 0
},
"verified_at": "2026-11-03T15:09:33Z",
"created_at": "2026-11-03T15:08:52Z"
}The same, as one script
This script looks at the catalog, places an order and reads it back. It is the one our own test runs against the API, so it works as written.
// Your first order, end to end: look at the catalog, place an order, read it back.
// Run with a TEST key first: nothing reaches the warehouse and nothing is invoiced.
// SUPPLIED_API_BASE=https://<host>/functions/v1/supplied-partner-api/v1 SUPPLIED_API_KEY=sk_test_… node place-first-order.mjs
export async function placeFirstOrder({ baseUrl, apiKey, fetch = globalThis.fetch }) {
const call = async (method, path, body) => {
const res = await fetch(`${baseUrl}${path}`, {
method,
headers: { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
body: body === undefined ? undefined : JSON.stringify(body),
});
const json = await res.json();
if (!res.ok) throw new Error(`${json.error.code}: ${json.error.message} (Request-Id ${res.headers.get('Request-Id')})`);
return json;
};
// 1. What can I order?
const { data: products } = await call('GET', '/products');
const product = products.find((p) => p.available === null || p.available >= p.min_quantity);
if (!product) throw new Error('Nothing in your catalog is in stock right now.');
// 2. Place the order. external_id is YOUR order number: sending it again never creates a second order.
const order = await call('POST', '/orders', {
external_id: 'GLOW-1042',
ship_to: { name: 'Dana Consumer', line1: '9 Elm St', line2: 'Apt 4', city: 'Denver', state: 'CO', postal_code: '80202', country: 'US', phone: '555-0100' },
lines: [{ sku: product.sku, quantity: Math.max(2, product.min_quantity) }], // never below the product's minimum
});
// 3. Read it back by your own number.
return call('GET', `/orders/${encodeURIComponent(order.external_id)}`);
}
if (import.meta.url === `file://${process.argv[1]}`) {
placeFirstOrder({ baseUrl: process.env.SUPPLIED_API_BASE, apiKey: process.env.SUPPLIED_API_KEY }).then((o) => console.log(o.id, o.status));
}A real example: Glow Peptides
Glow Peptides runs an online store. It sells Supplied products under its own name and holds no stock: when a customer pays, Glow's server tells Supplied, Supplied ships the parcel, and Glow tells the customer. This is that whole story, with the code Glow runs. Every snippet here is run against the API by our automated tests.
POST /orders→Supplied ships it→Webhook: order.shipped→Glow emails the tracking numberSet up once
- Get your keys and your host from Supplied, and make sure your account is on net terms: orders are invoiced when they ship. Keep both keys in your server's configuration.
- Match your products to Supplied's. Read
GET /productsonce and store theskuof each product next to your own product page. Prices are yours, in cents;min_quantityis the least a customer may buy.image_url, when Supplied has turned photos on, is a photo to show on that page: copy it, since a new photo comes as a new URL withproduct.updated. - Run a webhook receiver and subscribe its address (below). Do this with the test key first.
1. A customer pays: send the order
Dana buys two vials of BPC-157. As soon as the payment clears, Glow's server sends the order, using its own order number as external_id. That one field makes the call safe to repeat: if Glow's server crashes or the connection drops after Supplied got the order, sending it again returns the same order and never a second shipment.
// What Glow Peptides' store runs when a customer pays: send the order to Supplied, safely.
// Your own order number is the external_id, so retrying can never create a second order.
// const result = await submitOrder({ baseUrl, apiKey, order });
// result.ok ? save(result.supplied.id) : flagForAStaffMember(result.error)
const toSupplied = (order) => ({
external_id: order.number, // "GLOW-1042": your order number
ship_to: { name: order.customer.name, line1: order.customer.address1, line2: order.customer.address2 ?? null, city: order.customer.city,
state: order.customer.state, postal_code: order.customer.zip, country: 'US', phone: order.customer.phone ?? null },
lines: order.items.map((i) => ({ sku: i.sku, quantity: i.quantity })), // no prices: they come from your catalog
notes: order.giftMessage ?? null,
});
export async function submitOrder({ baseUrl, apiKey, order, fetch = globalThis.fetch, sleep = (ms) => new Promise((r) => setTimeout(r, ms)), attempts = 4 }) {
for (let attempt = 1; ; attempt++) {
let res;
try {
res = await fetch(`${baseUrl}/orders`, {
method: 'POST', headers: { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify(toSupplied(order)),
});
} catch (networkError) {
if (attempt >= attempts) return { ok: false, retry: true, error: `no answer: ${networkError.message}` };
await sleep(1000 * 2 ** (attempt - 1)); continue; // a timeout: the order may or may not have arrived, so send the same one again
}
// A gateway can answer 502 with an HTML page: that is a failure to retry, not something to parse.
const body = await res.json().catch(() => ({ error: { code: `http_${res.status}`, message: 'The answer was not JSON.' } }));
if (res.ok) return { ok: true, replay: res.status === 200, supplied: body }; // 201 new, 200 we already had it
if (res.status >= 500) {
if (attempt >= attempts) return { ok: false, retry: true, error: `${body.error.code} (Request-Id ${res.headers.get('Request-Id')})` };
await sleep(1000 * 2 ** (attempt - 1)); continue;
}
// 4xx: the request itself is wrong or not allowed. Retrying the same thing never helps: show a person what to fix.
return { ok: false, retry: false, error: `${body.error.code}: ${body.error.message}`, field: body.error.param ?? null };
}
}What the function does with each answer:
| Answer | Glow's server |
|---|---|
201 | The order is Supplied's. Save supplied.id and show the customer "We're preparing your order". |
200 | We already had it (a retry). Treat exactly like 201. |
No answer, or 5xx | Send the same order again after a pause. Never invent a new order number for a retry. |
4xx | Something about the order is wrong (error.param says which field): an unknown SKU, a quantity under the minimum, an address field missing. Don't retry; put the order in a "needs attention" list for a person. |
{
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "processing",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:06:49Z",
"shipping_cents": 5000
}2. What the customer sees while they wait
Read an order any time with GET /orders/GLOW-1042 (your own number works), or keep your copy up to date from the webhooks below.
Supplied status | Say to the customer |
|---|---|
received, processing | "We're preparing your order." |
held | "Part of your order is on its way to our warehouse and will ship as soon as it arrives." (hold_reasons says which line is short.) You don't need to do anything; it goes out by itself. |
shipped, partially_shipped | "Shipped" with the carrier and tracking number from shipments. |
delivered | "Delivered". |
cancelled | "Cancelled", and refund your customer. |
3. The parcel ships: Supplied tells Glow
Glow subscribes the address of its receiver once. The receiver below answers the challenge, checks every delivery's signature, drops repeats, saves the event (your code, in onEvent) and then answers 200. If saving fails it answers 500, and Supplied sends the event again. The code that runs when an order ships is the part Glow edits: here it just logs the tracking number, but this is where Glow saves it and emails Dana.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated"
],
"description": "production"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated"
],
"description": "production"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated",
],
"description": "production",
},
)
print(res.status_code, res.json()){
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"inventory.updated",
"order.delivered",
"order.shipped"
],
"description": "production",
"livemode": true,
"status": "active",
"secret": "whsec_5d2f7c1e9b0a4d38a6f1c2e7b9d04a83",
"health": {
"consecutive_failures": 0,
"pending": 0
},
"verified_at": "2026-11-03T15:09:33Z",
"created_at": "2026-11-03T15:08:52Z"
}// A complete webhook receiver for Supplied events, with no dependencies: node webhook-receiver.mjs
// It answers the verification challenge, checks the signature on every delivery, drops duplicates and stale updates,
// and hands each new event to `onEvent` (where you update your own order, stock or catalog) before it answers 200.
// SUPPLIED_WEBHOOK_SECRET=whsec_… PORT=3000 node webhook-receiver.mjs
import { createServer } from 'node:http';
import { verifySignature } from './verify-webhook.mjs';
export function createReceiver({ secret, onEvent, seen = new Set(), versions = new Map() }) {
return async (req, res) => {
const chunks = [];
for await (const c of req) chunks.push(c);
const raw = Buffer.concat(chunks).toString('utf8'); // the raw body: verify it before parsing it
const reply = (status, body) => { res.writeHead(status, { 'Content-Type': 'application/json' }); res.end(JSON.stringify(body)); };
let event;
try { event = JSON.parse(raw); } catch { return reply(400, { error: 'not JSON' }); }
// 1. When you subscribe (or ask for it again) we send a challenge: answer with it. It is signed too, but the secret
// only reaches you in the answer to the subscribe call, so you can't check this first one yet. It carries no data;
// answering it only proves the address is yours.
if (event.type === 'webhook.verification') return reply(200, { challenge: event.challenge });
// Everything else is checked against the secret, on the raw body, before it is trusted.
if (!verifySignature(raw, String(req.headers['supplied-signature'] ?? ''), secret)) return reply(401, { error: 'bad signature' });
// 2. Delivery is at least once: drop an event you already handled.
if (seen.has(event.id)) return reply(200, { duplicate: true });
// 3. Drop an older state of a record you already hold a newer one of.
const key = `${event.resource.type}:${event.resource.id}`;
if ((versions.get(key) ?? 0) >= event.resource.version) return reply(200, { stale: true });
// 4. Do the work, then say so. onEvent should be quick (save to your database; queue anything slow) because we wait
// 10 seconds at most. If it throws, answer 500 and remember nothing: we send the event again.
try { await onEvent(event); } catch (error) { return reply(500, { error: 'not processed' }); }
seen.add(event.id);
versions.set(key, event.resource.version);
reply(200, { received: true });
};
}
if (import.meta.url === `file: N
createServer(createReceiver({
secret: process.env.SUPPLIED_WEBHOOK_SECRET,
onEvent: async (event) => {
if (event.type === 'order.shipped') {
const order = event.data; O
for (const s of order.shipments) console.log(`order ${order.external_id} shipped: ${s.carrier} ${s.tracking_number}`);
} else console.log(event.type, event.resource.id);
},
})).listen(Number(process.env.PORT ?? 3000));
}A delivery for Dana's order looks like this. data is the whole order as it is now, so Glow doesn't have to ask for anything more:
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1(your webhook address)" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"headers": {
"Content-Type": "application/json",
"Supplied-Delivery-Attempt": "1",
"Supplied-Event-Id": "evt_8813",
"Supplied-Event-Type": "order.shipped",
"Supplied-Signature": "t=1793718245,v1=5d2f7c1e9b0a4d38a6f1c2e7b9d04a83e1f06c92b7a45d3180e9fa26c4b7d531"
}
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1(your webhook address)', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"headers": {
"Content-Type": "application/json",
"Supplied-Delivery-Attempt": "1",
"Supplied-Event-Id": "evt_8813",
"Supplied-Event-Type": "order.shipped",
"Supplied-Signature": "t=1793718245,v1=5d2f7c1e9b0a4d38a6f1c2e7b9d04a83e1f06c92b7a45d3180e9fa26c4b7d531"
}
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1(your webhook address)",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"headers": {
"Content-Type": "application/json",
"Supplied-Delivery-Attempt": "1",
"Supplied-Event-Id": "evt_8813",
"Supplied-Event-Type": "order.shipped",
"Supplied-Signature": "t=1793718245,v1=5d2f7c1e9b0a4d38a6f1c2e7b9d04a83e1f06c92b7a45d3180e9fa26c4b7d531",
},
},
)
print(res.status_code, res.json()){
"object": "event",
"id": "evt_8813",
"sequence": 12,
"type": "order.shipped",
"livemode": true,
"resource": {
"id": "SUP-1042-7F3A",
"type": "order",
"version": 3
},
"data": {
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:12:17Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:12:58Z",
"shipping_cents": 5000
},
"created_at": "2026-11-03T15:13:39Z"
}4. When something goes wrong
- The product is out of stock. The order is accepted and
held; it ships by itself when stock arrives. If the customer changes their mind first, cancel it: while it is held that is immediate.
{
"object": "order",
"id": "SUP-1043-81EB",
"external_id": "GLOW-1043",
"livemode": true,
"status": "held",
"hold_reasons": [
{
"lines": [
{
"sku": "PL-GHK-GLOW",
"available": 1,
"ordered": 5
}
],
"code": "stock",
"message": "Not all lines are in stock."
}
],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"quantity": 5,
"shipped_quantity": 0,
"unit_price_cents": 2200,
"total_cents": 11000
}
],
"total_cents": 16000,
"subtotal_cents": 11000,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:07:30Z",
"updated_at": "2026-11-03T15:07:30Z",
"shipping_cents": 5000
}- The customer cancels after the warehouse started. You get
409 order_in_fulfillment. The parcel is on its way: refuse the cancellation, or contact Supplied. - Glow's server was down for an hour. Supplied retries each delivery for 3 days, but don't depend on that alone. Once a minute (and at start-up), run the catch-up job. It reads every event Glow hasn't processed, in order, and feeds each one to the same handler the webhook uses, so there is only one code path to get right. Store the sequence it returns.
// After an outage, a deploy, or on a schedule: read every event you haven't processed, in order.
// Keep `after` (the last sequence you finished) in your database, and call this with it.
export async function catchUp({ baseUrl, apiKey, after, handle, fetch = globalThis.fetch }) {
let last = after;
for (;;) {
const res = await fetch(`${baseUrl}/events?after=${last}&limit=100`, { headers: { Authorization: `Bearer ${apiKey}` } });
if (!res.ok) throw new Error(`events: ${res.status} ${(await res.json()).error?.code}`);
const page = await res.json();
for (const event of page.data) { await handle(event); last = event.sequence; } // use the same handler as your webhook
if (!page.has_more) return last; // store this one
}
}Authentication and test mode
Send your key on every call:
Authorization: Bearer sk_test_…| Key | Use it for |
|---|---|
sk_test_… | Building and testing. Orders are checked and priced exactly like real ones, but they never reach the warehouse or an invoice. Test orders go through the same checks as live ones (your account must be on net terms, SKUs, minimums, professional products), but nothing is held: a test order is received, then shipped and delivered with the helpers, or cancelled (always at once). So held, processing, partially_shipped and cancel_requested and the events order.held, order.released and order.partially_shipped only happen with live orders. |
sk_live_… | Real orders, shipped and invoiced. |
- Test and live never mix. A test key only sees test orders and test webhook endpoints, and a live key only live ones. A test order's id starts with
TEST-. - Keep keys on your server. The API does not allow calls from web pages. Never put a key in a browser or a mobile app.
- If a key leaks, ask Supplied to revoke it and issue a new one. A revoked key stops working at once.
- Stock and catalog events go to both modes. Order events go to the mode of the order.
A missing or bad key is 401 invalid_api_key.
{
"error": {
"code": "invalid_api_key",
"message": "Send your API key as: Authorization: Bearer sk_live_… (or sk_test_…)."
}
}Orders and their lifecycle
An order moves through these statuses. You are told of most changes by webhook, and you can always read the order.
| Status | Meaning |
|---|---|
received | Accepted, being checked. |
held | Waiting at Supplied. hold_reasons says why: stock (with the short lines), credit, manual_review or warehouse_setup. A stock hold goes out by itself when the stock arrives, unless something else is holding the order too. manual_review and credit holds are cleared by Supplied. |
processing | At the warehouse. |
partially_shipped | Some of it has shipped. Each line's shipped_quantity and each package in shipments say what. |
shipped | All of it has shipped. shipments holds the tracking numbers and carriers. |
delivered | The carrier reports it delivered. |
cancel_requested | Your cancel reached the warehouse; cancelled follows. No webhook is sent for cancel_requested itself (order.cancelled follows), but the order's updated_at moves, so GET /orders?updated_since=… finds it. |
cancelled | Cancelled. |
Tracking comes back on the order
When the warehouse ships, the order shows its packages. This is the order from the quickstart after it shipped (we also send it to you as an order.shipped webhook):
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1042" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1042', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1042",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:12:17Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:12:58Z",
"shipping_cents": 5000
}A short-stocked order is held
If a line is short, the order is accepted and held; it ships by itself when the stock arrives. You can cancel it while it is held.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-1043",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"quantity": 5
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-1043",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"quantity": 5
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-1043",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"quantity": 5,
},
],
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1043-81EB",
"external_id": "GLOW-1043",
"livemode": true,
"status": "held",
"hold_reasons": [
{
"lines": [
{
"sku": "PL-GHK-GLOW",
"available": 1,
"ordered": 5
}
],
"code": "stock",
"message": "Not all lines are in stock."
}
],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"quantity": 5,
"shipped_quantity": 0,
"unit_price_cents": 2200,
"total_cents": 11000
}
],
"total_cents": 16000,
"subtotal_cents": 11000,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:07:30Z",
"updated_at": "2026-11-03T15:07:30Z",
"shipping_cents": 5000
}Cancelling
- While it is held: cancelled at once.
- At the warehouse but not started: the cancel is sent there. The order shows
cancel_requested, thencancelled. - Once picking has started:
409 order_in_fulfillment. Contact Supplied.
Cancelling twice returns the order unchanged. To change an order, cancel it and place a new one with a new external_id.
Professional products
Prescription (503A) and PUO products can't be ordered through the API, because a key has no licensed clinician behind it. They are not in your catalog list, and an order for one is refused as professional_product. Order them in the Supplied portal.
Retries and idempotency
If a request times out, send it again. You can't create an order twice by accident.
Your external_id is the order's identity in your account. POST /orders with an external_id we already have:
- with the same content returns the existing order with
200(a new order is201). The order of the fields doesn't matter, but leaving outnotesand sending"notes": nullcount as different content, so resend exactly what you sent; - with different content is refused with
409 external_id_conflict, and nothing changes.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"shipping_method": "ground",
"notes": "Gift"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"shipping_method": "ground",
"notes": "Gift"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2,
},
],
"shipping_method": "ground",
"notes": "Gift",
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "processing",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:06:49Z",
"shipping_cents": 5000
}{
"error": {
"code": "external_id_conflict",
"message": "Order GLOW-1042 already exists with different details.",
"param": "external_id"
}
}What to retry
| You got | Do this |
|---|---|
A timeout, a dropped connection, or 500 | Retry the same request after a few seconds, with the same external_id. Back off: 2, 4, 8 seconds. |
4xx | Don't retry unchanged: the request is wrong or not allowed. Fix it first. |
Webhooks
Instead of asking, get told. Subscribe an HTTPS address on your server and we send each change to it: shipments with tracking numbers, deliveries, cancellations and stock.
1. Subscribe
events lists the types you want, or ["*"] for all. The answer includes the endpoint's secret (whsec_…). It is shown only here: store it.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated"
],
"description": "production"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated"
],
"description": "production"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated",
],
"description": "production",
},
)
print(res.status_code, res.json()){
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"inventory.updated",
"order.delivered",
"order.shipped"
],
"description": "production",
"livemode": true,
"status": "active",
"secret": "whsec_5d2f7c1e9b0a4d38a6f1c2e7b9d04a83",
"health": {
"consecutive_failures": 0,
"pending": 0
},
"verified_at": "2026-11-03T15:09:33Z",
"created_at": "2026-11-03T15:08:52Z"
}2. Answer the challenge
Before anything is sent, we POST a challenge to the address. It must answer within 10 seconds with a 2xx and the challenge back, as JSON or as plain text.
// we send
{ "object": "event", "type": "webhook.verification", "challenge": "9f1c4b7a02de58a3c6710be4d92f5a38" }
// you answer
{ "challenge": "9f1c4b7a02de58a3c6710be4d92f5a38" }The challenge is signed like any delivery, but its secret only reaches you in the answer to the subscribe call, so you can't check that first signature: answer it as shown. It carries no data, and answering only proves the address is yours. Every later delivery you must verify. A complete receiver that does all of this is in the example.
The endpoint is active once verified. Until then it is pending_verification: we try again every 5 minutes for a day, and keep what happens meanwhile to send, in order, once it's verified. You can also call POST /webhook_endpoints/{id}/verify. Changing the url means verifying again.
3. Verify every delivery
Each delivery is a POST of one event, with these headers:
Supplied-Signature | t=1793718245,v1=5d2f…: the time, and the signature. |
Supplied-Event-Id | The event's id. |
Supplied-Event-Type | For example order.shipped. |
Supplied-Delivery-Attempt | 1 the first time, higher on a retry. |
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1(your webhook address)" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"headers": {
"Content-Type": "application/json",
"Supplied-Delivery-Attempt": "1",
"Supplied-Event-Id": "evt_8813",
"Supplied-Event-Type": "order.shipped",
"Supplied-Signature": "t=1793718245,v1=5d2f7c1e9b0a4d38a6f1c2e7b9d04a83e1f06c92b7a45d3180e9fa26c4b7d531"
}
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1(your webhook address)', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"headers": {
"Content-Type": "application/json",
"Supplied-Delivery-Attempt": "1",
"Supplied-Event-Id": "evt_8813",
"Supplied-Event-Type": "order.shipped",
"Supplied-Signature": "t=1793718245,v1=5d2f7c1e9b0a4d38a6f1c2e7b9d04a83e1f06c92b7a45d3180e9fa26c4b7d531"
}
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1(your webhook address)",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"headers": {
"Content-Type": "application/json",
"Supplied-Delivery-Attempt": "1",
"Supplied-Event-Id": "evt_8813",
"Supplied-Event-Type": "order.shipped",
"Supplied-Signature": "t=1793718245,v1=5d2f7c1e9b0a4d38a6f1c2e7b9d04a83e1f06c92b7a45d3180e9fa26c4b7d531",
},
},
)
print(res.status_code, res.json()){
"object": "event",
"id": "evt_8813",
"sequence": 12,
"type": "order.shipped",
"livemode": true,
"resource": {
"id": "SUP-1042-7F3A",
"type": "order",
"version": 3
},
"data": {
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:12:17Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:12:58Z",
"shipping_cents": 5000
},
"created_at": "2026-11-03T15:13:39Z"
}HMAC-SHA256(secret, "<t>.<raw body>") in hex and compare it with v1 using a constant-time comparison. Reject a t older than 5 minutes. Use the raw body bytes, before any JSON parsing.// Checks that a webhook really came from Supplied. Use the raw request body, before any JSON parsing.
import { createHmac, timingSafeEqual } from 'node:crypto';
export function verifySignature(rawBody, signatureHeader, secret, toleranceSeconds = 300) {
const parts = Object.fromEntries(signatureHeader.split(',').map((p) => p.split('=')));
const { t, v1 } = parts;
if (!t || !v1) return false;
if (Math.abs(Date.now() / 1000 - Number(t)) > toleranceSeconds) return false;
const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
return v1.length === expected.length && timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}import hmac, hashlib, time
def verify_signature(raw_body: bytes, header: str, secret: str, tolerance_seconds: int = 300) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
if abs(time.time() - int(parts["t"])) > tolerance_seconds:
return False
expected = hmac.new(secret.encode(), f"{parts['t']}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts["v1"])4. Handle it well
- Save the event, then answer
2xxwithin 10 seconds. Queue anything slow for later. Any other answer, a redirect or a timeout counts as a failure and the event is sent again, so answer2xxonly once it is safely stored. - Drop duplicates by
id. Delivery is at least once, so an event can arrive twice. - Drop stale updates by
resource.version. Versions only go up for a record: if you already hold a higher version of that order, product or SKU, ignore the event. Events for one record are sent one at a time and in order, but your own retries can reorder them. - Treat
dataas the whole current state, never a change. A stock event says "37 available", never "−1".
Event types
| Type | data | When |
|---|---|---|
order.created | The order | You placed an order. |
order.held | The order | It is waiting at Supplied (hold_reasons says why). |
order.released | The order | It was sent to the warehouse. |
order.partially_shipped | The order | Some of it shipped. shipments and each line's shipped_quantity say what. |
order.shipped | The order | All of it shipped. shipments holds the tracking numbers. |
order.delivered | The order | The carrier reports it delivered. |
order.cancelled | The order | It was cancelled. |
inventory.updated | { sku, available, as_of } | Stock changed. A newer stock event replaces an older one still waiting. |
product.added | The product | A product joined your catalog. |
product.updated | The product | A product changed. |
price.updated | The product | Your price or a price tier changed. |
product.removed | { sku, removed: true } | A product left your catalog. |
ping | — | A test, from POST /webhook_endpoints/{id}/test. |
An endpoint made with a test key gets test-mode order events. Stock and catalog events go to both modes.
If your server is down
We retry with growing gaps (30 seconds, 1, 5, 15 and 30 minutes, then hourly) for 3 days. Newer stock for a SKU replaces an older stock event still waiting, so you aren't flooded after an outage. An endpoint that answers 410 Gone, or fails for 3 days, is turned off and Supplied is told; its events are kept, and once it's back on (PATCH it to active, or ask Supplied) they are sent in order. An endpoint Supplied turned off itself: contact Supplied to turn it back on.
{
"error": {
"code": "endpoint_disabled_by_supplied",
"message": "Supplied turned this endpoint off. Contact Supplied to turn it back on.",
"param": "status"
}
}Good to know
- The address must be
https://, a public name with a dot (no IP addresses, no credentials in the URL), at most 500 characters. Redirects count as failures, and the address we resolve is checked again on every send. - You can subscribe to up to 20 event types per endpoint, and
eventscan't be empty. - The verification challenge is signed like any delivery, but it has no
Supplied-Event-IdorSupplied-Delivery-Attemptheader and noid: don't require them there. Answer with the challenge in the first 1,000 bytes of your reply. - Stock and catalog events are sent to test endpoints too, with
livemode: true. Don't drop an event only because of itslivemode. - We send
User-Agent: Supplied-Webhooks/1.0. There is no fixed list of source IP addresses: rely on the signature.
Check on it
Read an endpoint to see its health, send a test event to check your server now, and list the attempts to find out why deliveries fail.
The event log
Webhooks tell you now. The event log lets you catch up after anything: an outage, a deploy, a missed delivery, or a brand new integration.
sequence: your own counter. It only goes up, and can skip numbers.- To catch up: store the last
sequenceyou processed. After any gap, read from there withGET /events?after=<sequence>untilhas_moreis false. - Retention: events are kept 30 days (longer while one is still waiting to be delivered to you).
oldest_sequenceis the oldest still available, counted over your whole account, test and live together. - Gaps are normal:
sequenceis shared by your test and live events, so a live key sees numbers skipped. - Use: this is how you rebuild anything, with or without webhooks. Process an event the same way whichever way it reached you.
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=0&limit=3" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=0&limit=3', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=0&limit=3",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "event",
"id": "evt_8814",
"sequence": 1,
"type": "product.added",
"livemode": true,
"resource": {
"id": "PL-BPC-GLOW",
"type": "product",
"version": 1
},
"data": {
"object": "product",
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"description": "Research peptide, 10 mg vial",
"unit_price_cents": 1800,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 100,
"inventory_as_of": "2026-11-03T15:04:05Z"
},
"created_at": "2026-11-03T15:06:08Z"
},
{
"object": "event",
"id": "evt_8815",
"sequence": 2,
"type": "product.added",
"livemode": true,
"resource": {
"id": "PL-GHK-GLOW",
"type": "product",
"version": 1
},
"data": {
"object": "product",
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"description": null,
"unit_price_cents": 2200,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 1,
"inventory_as_of": "2026-11-03T15:04:46Z"
},
"created_at": "2026-11-03T15:06:08Z"
},
{
"object": "event",
"id": "evt_8816",
"sequence": 3,
"type": "product.added",
"livemode": true,
"resource": {
"id": "PL-TB4-GLOW",
"type": "product",
"version": 1
},
"data": {
"object": "product",
"sku": "PL-TB4-GLOW",
"name": "TB-500 5mg (Glow label)",
"description": null,
"unit_price_cents": 2600,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 40,
"inventory_as_of": "2026-11-03T15:05:27Z"
},
"created_at": "2026-11-03T15:06:08Z"
}
],
"has_more": true,
"oldest_sequence": 1
}See GET /events for the parameters.
Going live
Checklist
- Your test integration places an order, receives
order.shippedandorder.deliveredwebhooks, and reads the tracking number. - Your webhook handler verifies the signature, answers fast, drops duplicates by
idand stale updates byresource.version. - You store the last event
sequence, and readGET /eventsafter any outage. - You read
GET /inventoryevery 15 minutes as a safety net, and subscribe toinventory.updated. - Your retries reuse the same
external_id. - Your live key is on your server only. Ask Supplied for it, and for your live webhook to be set up the same way.
Good to know
ship_to.stateandship_to.postal_codeare required for every country.GET /orders:limitis clamped to 1–100 rather than refused, andupdated_sincemust be an ISO 8601 time. An order'supdated_atmoves whenever it changes, including when you ask to cancel it, so reading from the lastupdated_atyou saw finds every change. There is no webhook forcancel_requesteditself:order.cancelledfollows. Page forward byupdated_since(it is inclusive, so expect to see the last order again);starting_afteris for a single walk, and an order that changes while you walk can move.GET /inventory?skus=leaves out SKUs that aren't in your catalog.
Not in this version
- EDI;
- choosing a carrier or service (the warehouse picks the carrier);
- returns from your customers (contact Supplied);
- per-order fees;
- a per-key rate limit.
Questions, or something you need that isn't here? Contact your Supplied representative, and quote the Request-Id of any call you ask about.
Catalog
What you can order, at your prices, and what is in stock.
List your catalog
/productsYour catalog: every product you can order, at your prices, with live stock. Professional products (PUO and 503A) are not listed, because they cannot be ordered through the API. Read it once at start-up and keep it fresh with the product.*, price.updated and inventory.updated events.
Returns
- 200 a list
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/products" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/products', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/products",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "product",
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"description": "Research peptide, 10 mg vial",
"unit_price_cents": 1800,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 100,
"inventory_as_of": "2026-11-03T15:04:05Z",
"image_url": "https://api.supplied.example/storage/v1/object/public/supplied-product-photos/forms/v1/bare/vial.jpg"
},
{
"object": "product",
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"description": null,
"unit_price_cents": 2200,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 1,
"inventory_as_of": "2026-11-03T15:04:46Z",
"image_url": "https://api.supplied.example/storage/v1/object/public/supplied-product-photos/forms/v1/bare/vial.jpg"
},
{
"object": "product",
"sku": "PL-TB4-GLOW",
"name": "TB-500 5mg (Glow label)",
"description": null,
"unit_price_cents": 2600,
"currency": "USD",
"min_quantity": 5,
"price_tiers": [],
"available": 40,
"inventory_as_of": "2026-11-03T15:05:27Z",
"image_url": "https://api.supplied.example/storage/v1/object/public/supplied-product-photos/forms/v1/bare/vial.jpg"
}
]
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/products"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/products');
const data = await res.json();
console.log(res.status, data);import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/products",
)
print(res.status_code, res.json()){
"error": {
"code": "invalid_api_key",
"message": "Send your API key as: Authorization: Bearer sk_live_… (or sk_test_…)."
}
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/products"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/products');
const data = await res.json();
console.log(res.status, data);import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/products",
)
print(res.status_code, res.json()){
"error": {
"code": "invalid_api_key",
"message": "This API key is not valid, or it was revoked."
}
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/nope" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/nope', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/nope",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"error": {
"code": "not_found",
"message": "No route for GET /v1/nope."
}
}Read stock
/inventoryJust the stock: sku, available and as_of, for all your SKUs or the ones you name. Subscribe to inventory.updated to stay current, and read this every 15 minutes as a safety net.
Query parameters
| Field | Description |
|---|---|
skusstring | Comma-separated SKUs. Leave out for all. |
Returns
- 200 a list
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/inventory" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/inventory', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/inventory",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "inventory",
"sku": "PL-BPC-GLOW",
"available": 100,
"as_of": "2026-11-03T15:04:05Z"
},
{
"object": "inventory",
"sku": "PL-GHK-GLOW",
"available": 1,
"as_of": "2026-11-03T15:04:46Z"
},
{
"object": "inventory",
"sku": "PL-TB4-GLOW",
"available": 40,
"as_of": "2026-11-03T15:05:27Z"
}
]
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/inventory?skus=PL-GHK-GLOW,PL-BPC-GLOW" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/inventory?skus=PL-GHK-GLOW,PL-BPC-GLOW', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/inventory?skus=PL-GHK-GLOW,PL-BPC-GLOW",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "inventory",
"sku": "PL-BPC-GLOW",
"available": 100,
"as_of": "2026-11-03T15:04:05Z"
},
{
"object": "inventory",
"sku": "PL-GHK-GLOW",
"available": 1,
"as_of": "2026-11-03T15:04:46Z"
}
]
}Orders
Place, read and cancel orders. Idempotent on your own order number.
Place an order
/ordersSends one customer order to Supplied. We pick, pack and ship it in your name.
Idempotent on external_id: if a request times out, send it again. The same external_id with the same content returns the existing order with 200 and never creates a second one; with different content it is 409 external_id_conflict. A new order answers 201.
If a line is short of stock the order is held (see hold_reasons) and goes out by itself when stock arrives. Your account must be invoiced on net terms: orders are invoiced when they ship, with shipping at your account's flat price per order, or at the warehouse's cost when it has none.
Body
| Field | Description |
|---|---|
external_idrequiredstring | Your order number. Unique in your account, and how a retry is recognised: the same external_id with the same content returns the existing order. |
ship_torequiredobject | |
ship_to.namerequiredstring | Who the parcel is for. |
ship_to.companystring | null | |
ship_to.line1requiredstring | |
ship_to.line2string | null | |
ship_to.cityrequiredstring | |
ship_to.staterequiredstring | |
ship_to.postal_coderequiredstring | |
ship_to.countryrequiredstring | Two letters |
ship_to.phonestring | null | The carrier gets it. We never ask for your customer's email, and we never contact them. |
linesrequiredobject[] | One line per SKU. Prices come from your catalog; you do not send them. |
lines[].skurequiredstring | |
lines[].quantityrequiredinteger | A whole number, at least the product's min_quantity. |
notesstring | null | Kept on the order for Supplied. |
shipping_methodstring | null | Kept on the order. When your account has a freight price for this method (a key such as standard, fedex-2day or next-day), the order is billed that freight and the warehouse ships with the matching service; otherwise your account's usual shipping applies. |
Returns
Errors
| Code | Status | When |
|---|---|---|
invalid_request | 400 | The request is malformed: the body is not JSON, a required field is missing, a field has the wrong type, or a query parameter is not valid. |
unknown_sku | 422 | A SKU is not in your catalog. |
below_minimum | 422 | A line is below the product's min_quantity for your account. |
not_in_step | 422 | A line's quantity is not a multiple of the product's order step for your account (for example 25 of a product sold in 10s). |
professional_product | 422 | PUO and 503A (prescription) products cannot be ordered through the API: a key has no licensed clinician behind it. |
external_id_conflict | 409 | You already placed an order with this external_id, and this request has different content. |
account_not_on_terms | 403 | Orders go on your account and are invoiced when they ship. |
account_suspended | 403 | Your account is suspended. |
partner_disabled | 403 | API ordering is turned off for your account. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"shipping_method": "ground",
"notes": "Gift"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"shipping_method": "ground",
"notes": "Gift"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2,
},
],
"shipping_method": "ground",
"notes": "Gift",
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "processing",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:06:49Z",
"shipping_cents": 5000
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"shipping_method": "ground",
"notes": "Gift"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"shipping_method": "ground",
"notes": "Gift"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2,
},
],
"shipping_method": "ground",
"notes": "Gift",
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "processing",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:06:49Z",
"shipping_cents": 5000
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-1043",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"quantity": 5
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-1043",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"quantity": 5
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-1043",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"quantity": 5,
},
],
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1043-81EB",
"external_id": "GLOW-1043",
"livemode": true,
"status": "held",
"hold_reasons": [
{
"lines": [
{
"sku": "PL-GHK-GLOW",
"available": 1,
"ordered": 5
}
],
"code": "stock",
"message": "Not all lines are in stock."
}
],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"quantity": 5,
"shipped_quantity": 0,
"unit_price_cents": 2200,
"total_cents": 11000
}
],
"total_cents": 16000,
"subtotal_cents": 11000,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:07:30Z",
"updated_at": "2026-11-03T15:07:30Z",
"shipping_cents": 5000
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "TEST-RUN-1",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "TEST-RUN-1",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "TEST-RUN-1",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2,
},
],
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "TEST-1046-89FE",
"external_id": "TEST-RUN-1",
"livemode": false,
"status": "received",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:17:04Z",
"updated_at": "2026-11-03T15:17:04Z",
"shipping_cents": 5000
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 3
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 3
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-1042",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 3,
},
],
},
)
print(res.status_code, res.json()){
"error": {
"code": "external_id_conflict",
"message": "Order GLOW-1042 already exists with different details.",
"param": "external_id"
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 1
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 1
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 1,
},
],
},
)
print(res.status_code, res.json()){
"error": {
"code": "invalid_request",
"message": "external_id is required.",
"param": "external_id"
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{nope'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: '{nope',
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
data="{nope",
)
print(res.status_code, res.json()){
"error": {
"code": "invalid_request",
"message": "The body must be JSON."
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-2",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "NOPE",
"quantity": 1
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-2",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "NOPE",
"quantity": 1
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-2",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "NOPE",
"quantity": 1,
},
],
},
)
print(res.status_code, res.json()){
"error": {
"code": "unknown_sku",
"message": "NOPE is not in your catalog.",
"param": "lines[0].sku"
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-3",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-TB4-GLOW",
"quantity": 2
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-3",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-TB4-GLOW",
"quantity": 2
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-3",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-TB4-GLOW",
"quantity": 2,
},
],
},
)
print(res.status_code, res.json()){
"error": {
"code": "below_minimum",
"message": "PL-TB4-GLOW has a minimum order quantity of 5.",
"param": "lines[0].quantity"
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "GLOW-4",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-SEMA-GLOW",
"quantity": 1
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "GLOW-4",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-SEMA-GLOW",
"quantity": 1
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"external_id": "GLOW-4",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-SEMA-GLOW",
"quantity": 1,
},
],
},
)
print(res.status_code, res.json()){
"error": {
"code": "professional_product",
"message": "PL-SEMA-GLOW is a professional product (PUO or 503A): it can't be ordered through the API. A licensed clinician orders it in the portal.",
"param": "lines[0].sku"
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Content-Type: application/json" \
-d '{
"external_id": "Q-1",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "Q-1",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
json={
"external_id": "Q-1",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2,
},
],
},
)
print(res.status_code, res.json()){
"error": {
"code": "account_not_on_terms",
"message": "This account isn't set up to be invoiced (net terms). Contact Supplied."
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Content-Type: application/json" \
-d '{
"external_id": "Q-2",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "Q-2",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
json={
"external_id": "Q-2",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2,
},
],
},
)
print(res.status_code, res.json()){
"error": {
"code": "account_suspended",
"message": "This account is suspended. Contact Supplied."
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders" \
-H "Content-Type: application/json" \
-d '{
"external_id": "Q-3",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"external_id": "Q-3",
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
]
}),
});
const data = await res.json();
console.log(res.status, data);import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders",
json={
"external_id": "Q-3",
"ship_to": {
"name": "Dana Consumer",
"company": None,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100",
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2,
},
],
},
)
print(res.status_code, res.json()){
"error": {
"code": "partner_disabled",
"message": "API ordering is turned off for this account. Contact Supplied."
}
}List orders
/ordersYour orders that changed since a time, oldest change first, so you can walk forward through your changes. updated_since must be an ISO 8601 time, and limit is clamped to 1 to 100. Page with starting_after=<the last id you got> while has_more is true.
Query parameters
| Field | Description |
|---|---|
updated_sincestring | Only orders changed at or after this time. |
starting_afterstring | The id of the last order of the previous page. |
limitinteger | How many to return. Default 50. |
Returns
- 200 a list
Errors
| Code | Status | When |
|---|---|---|
invalid_request | 400 | The request is malformed: the body is not JSON, a required field is missing, a field has the wrong type, or a query parameter is not valid. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=2" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=2', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=2",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "order",
"id": "SUP-1043-81EB",
"external_id": "GLOW-1043",
"livemode": true,
"status": "cancelled",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"quantity": 5,
"shipped_quantity": 0,
"unit_price_cents": 2200,
"total_cents": 11000
}
],
"total_cents": 16000,
"subtotal_cents": 11000,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": "2026-11-03T15:08:11Z",
"created_at": "2026-11-03T15:07:30Z",
"updated_at": "2026-11-03T15:08:11Z",
"shipping_cents": 5000
},
{
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:12:17Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:13:39Z",
"shipping_cents": 5000
}
],
"has_more": true
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=2&starting_after=SUP-1042-7F3A" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=2&starting_after=SUP-1042-7F3A', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=2&starting_after=SUP-1042-7F3A",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "order",
"id": "SUP-1045-874D",
"external_id": "GLOW-1044",
"livemode": true,
"status": "processing",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:14:20Z",
"updated_at": "2026-11-03T15:15:01Z",
"shipping_cents": 5000
},
{
"object": "order",
"id": "SUP-1044-849C",
"external_id": "GLOW-1045",
"livemode": true,
"status": "cancel_requested",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:15:42Z",
"updated_at": "2026-11-03T15:16:23Z",
"shipping_cents": 5000
}
],
"has_more": false
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?updated_since=yesterday" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?updated_since=yesterday', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?updated_since=yesterday",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"error": {
"code": "invalid_request",
"message": "updated_since must be an ISO 8601 time, like 2026-11-01T00:00:00Z.",
"param": "updated_since"
}
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=lots" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=lots', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders?limit=lots",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"error": {
"code": "invalid_request",
"message": "limit must be a whole number.",
"param": "limit"
}
}Read an order
/orders/{id}One order, by our id or by your own external_id. A test key sees only test orders and a live key only live orders.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | Our id (SUP-… for live orders, TEST-… for test orders) or your own external_id. |
Returns
- 200 Order object
Errors
| Code | Status | When |
|---|---|---|
order_not_found | 404 | No order of yours has this id or external_id in this mode. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1042" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1042', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1042",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:12:17Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:12:58Z",
"shipping_cents": 5000
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-404" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-404', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-404",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"error": {
"code": "order_not_found",
"message": "No such order.",
"param": "id"
}
}Cancel an order
/orders/{id}/cancelWhile the order is held it is cancelled at once. If it is at the warehouse but not started, the cancel is sent there: the order shows cancel_requested, then cancelled. Once picking has started it is 409 order_in_fulfillment: contact Supplied. Cancelling twice returns the order unchanged.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | Our id (SUP-… for live orders, TEST-… for test orders) or your own external_id. |
Body
| Field | Description |
|---|---|
reasonstring | Kept on the order. |
Returns
- 200 Order object
Errors
| Code | Status | When |
|---|---|---|
order_not_found | 404 | No order of yours has this id or external_id in this mode. |
order_in_fulfillment | 409 | The warehouse has started the order, or it has shipped, so it can no longer be cancelled. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1043/cancel" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Customer changed their mind"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1043/cancel', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"reason": "Customer changed their mind"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1043/cancel",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"reason": "Customer changed their mind",
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1043-81EB",
"external_id": "GLOW-1043",
"livemode": true,
"status": "cancelled",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"quantity": 5,
"shipped_quantity": 0,
"unit_price_cents": 2200,
"total_cents": 11000
}
],
"total_cents": 16000,
"subtotal_cents": 11000,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": "2026-11-03T15:08:11Z",
"created_at": "2026-11-03T15:07:30Z",
"updated_at": "2026-11-03T15:08:11Z",
"shipping_cents": 5000
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1045/cancel" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Customer changed their mind"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1045/cancel', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"reason": "Customer changed their mind"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1045/cancel",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"reason": "Customer changed their mind",
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "SUP-1044-849C",
"external_id": "GLOW-1045",
"livemode": true,
"status": "cancel_requested",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:15:42Z",
"updated_at": "2026-11-03T15:16:23Z",
"shipping_cents": 5000
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1044/cancel" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Too late"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1044/cancel', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"reason": "Too late"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/orders/GLOW-1044/cancel",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"reason": "Too late",
},
)
print(res.status_code, res.json()){
"error": {
"code": "order_in_fulfillment",
"message": "The warehouse has started this order (Picking), so it can't be cancelled. Contact Supplied."
}
}Test mode
Move test orders along without a warehouse (test keys only).
Ship a test order
/test_helpers/orders/{id}/shipTest keys only. Moves a test order to shipped with a tracking number, and sends the same webhooks a real shipment would. The body is optional.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | Our id (SUP-… for live orders, TEST-… for test orders) or your own external_id. |
Body
| Field | Description |
|---|---|
tracking_numberstring | |
carrierstring |
Returns
- 200 Order object
Errors
| Code | Status | When |
|---|---|---|
test_mode_only | 403 | A test helper was called with a live key. |
order_not_found | 404 | No order of yours has this id or external_id in this mode. |
invalid_state | 409 | The action does not fit the current state, for example shipping a test order that has already shipped, delivering one that has not, or sending a test event that is already being sent. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS",
},
)
print(res.status_code, res.json()){
"object": "order",
"id": "TEST-1046-89FE",
"external_id": "TEST-RUN-1",
"livemode": false,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:17:45Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:17:04Z",
"updated_at": "2026-11-03T15:17:45Z",
"shipping_cents": 5000
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/ship",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={},
)
print(res.status_code, res.json()){
"error": {
"code": "invalid_state",
"message": "A shipped order can't be shipped."
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/GLOW-1042/ship" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/GLOW-1042/ship', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/GLOW-1042/ship",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={},
)
print(res.status_code, res.json()){
"error": {
"code": "test_mode_only",
"message": "Test helpers work only with a test key (sk_test_…)."
}
}Deliver a test order
/test_helpers/orders/{id}/deliverTest keys only. Moves a shipped test order to delivered, and sends the order.delivered webhook.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | Our id (SUP-… for live orders, TEST-… for test orders) or your own external_id. |
Returns
- 200 Order object
Errors
| Code | Status | When |
|---|---|---|
test_mode_only | 403 | A test helper was called with a live key. |
order_not_found | 404 | No order of yours has this id or external_id in this mode. |
invalid_state | 409 | The action does not fit the current state, for example shipping a test order that has already shipped, delivering one that has not, or sending a test event that is already being sent. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/deliver" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/deliver', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/test_helpers/orders/TEST-RUN-1/deliver",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "order",
"id": "TEST-1046-89FE",
"external_id": "TEST-RUN-1",
"livemode": false,
"status": "delivered",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1ZTEST0000000001",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:17:45Z",
"delivered_at": "2026-11-03T15:18:26Z",
"cancelled_at": null,
"created_at": "2026-11-03T15:17:04Z",
"updated_at": "2026-11-03T15:18:26Z",
"shipping_cents": 5000
}Webhooks
Be told when something changes. Signed, retried, and verified before anything is sent.
Subscribe an address
/webhook_endpointsSubscribes an HTTPS address to your events. Before anything is sent we POST a challenge to it and it must answer within 10 seconds (see Webhooks). The answer includes the endpoint's secret: it is shown here only, so store it. You can have up to 5 endpoints per mode.
Body
| Field | Description |
|---|---|
urlrequiredstring | An https:// address on your server. |
eventsstring[] | The event types you want, or ["*"] for all. Default ["*"]. |
descriptionstring |
Returns
- 201 Webhook endpoint object — created
Errors
| Code | Status | When |
|---|---|---|
invalid_url | 400 | The webhook address is not an HTTPS URL we can send to (plain http, a private or internal address, or a malformed URL). |
invalid_request | 400 | The request is malformed: the body is not JSON, a required field is missing, a field has the wrong type, or a query parameter is not valid. |
too_many_endpoints | 409 | An account can have at most 5 webhook endpoints per mode. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated"
],
"description": "production"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated"
],
"description": "production"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"order.shipped",
"order.delivered",
"inventory.updated",
],
"description": "production",
},
)
print(res.status_code, res.json()){
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"inventory.updated",
"order.delivered",
"order.shipped"
],
"description": "production",
"livemode": true,
"status": "active",
"secret": "whsec_5d2f7c1e9b0a4d38a6f1c2e7b9d04a83",
"health": {
"consecutive_failures": 0,
"pending": 0
},
"verified_at": "2026-11-03T15:09:33Z",
"created_at": "2026-11-03T15:08:52Z"
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "http://glow.example/hooks"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "http://glow.example/hooks"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"url": "http://glow.example/hooks",
},
)
print(res.status_code, res.json()){
"error": {
"code": "invalid_url",
"message": "The url must start with https://, have no spaces and be at most 500 characters.",
"param": "url"
}
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://n5.glowstore.example/hooks"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://n5.glowstore.example/hooks"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"url": "https://n5.glowstore.example/hooks",
},
)
print(res.status_code, res.json()){
"error": {
"code": "too_many_endpoints",
"message": "An account can have at most 5 webhook endpoints per mode. Delete one first."
}
}List endpoints
/webhook_endpointsYour webhook endpoints for this key's mode. The secret is never included.
Returns
- 200 a list
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"inventory.updated",
"order.delivered",
"order.shipped"
],
"description": "production",
"livemode": true,
"status": "active",
"health": {
"consecutive_failures": 0,
"pending": 0
},
"verified_at": "2026-11-03T15:09:33Z",
"created_at": "2026-11-03T15:08:52Z"
}
],
"has_more": false
}Read an endpoint
/webhook_endpoints/{id}One endpoint with its health: last success and failure, the last error, failures in a row, and how many events are waiting.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | The webhook endpoint's id. |
Returns
- 200 Webhook endpoint object
Errors
| Code | Status | When |
|---|---|---|
endpoint_not_found | 404 | No webhook endpoint of yours has this id in this mode. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"inventory.updated",
"order.delivered",
"order.shipped"
],
"description": "production",
"livemode": true,
"status": "active",
"health": {
"consecutive_failures": 0,
"pending": 0
},
"verified_at": "2026-11-03T15:09:33Z",
"created_at": "2026-11-03T15:08:52Z"
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b4e6" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b4e6', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b4e6",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"error": {
"code": "endpoint_not_found",
"message": "No such webhook endpoint.",
"param": "id"
}
}Change, pause or resume an endpoint
/webhook_endpoints/{id}Change url, events or description, or set status to paused or active. Changing the url means verifying again. An endpoint Supplied turned off: contact Supplied to turn it back on.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | The webhook endpoint's id. |
Body
| Field | Description |
|---|---|
urlstring | |
eventsstring[] | |
descriptionstring | |
statusenum | activepaused |
Returns
- 200 Webhook endpoint object
Errors
| Code | Status | When |
|---|---|---|
endpoint_not_found | 404 | No webhook endpoint of yours has this id in this mode. |
endpoint_disabled_by_supplied | 409 | Supplied turned this endpoint off. |
not_verified | 409 | The webhook endpoint has not answered our challenge yet. |
invalid_url | 400 | The webhook address is not an HTTPS URL we can send to (plain http, a private or internal address, or a malformed URL). |
invalid_request | 400 | The request is malformed: the body is not JSON, a required field is missing, a field has the wrong type, or a query parameter is not valid. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X PATCH \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "production (v2)",
"status": "paused"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"description": "production (v2)",
"status": "paused"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.patch(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"description": "production (v2)",
"status": "paused",
},
)
print(res.status_code, res.json()){
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100",
"url": "https://api.glowstore.example/supplied-webhooks",
"events": [
"inventory.updated",
"order.delivered",
"order.shipped"
],
"description": "production (v2)",
"livemode": true,
"status": "paused",
"health": {
"last_success_at": "2026-11-03T15:10:14Z",
"consecutive_failures": 0,
"pending": 0
},
"verified_at": "2026-11-03T15:09:33Z",
"created_at": "2026-11-03T15:08:52Z"
}curl -X PATCH \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b6d9" \
-H "Authorization: Bearer $SUPPLIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "active"
}'const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b6d9', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"status": "active"
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.patch(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b6d9",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
json={
"status": "active",
},
)
print(res.status_code, res.json()){
"error": {
"code": "endpoint_disabled_by_supplied",
"message": "Supplied turned this endpoint off. Contact Supplied to turn it back on.",
"param": "status"
}
}Unsubscribe
/webhook_endpoints/{id}Deletes the endpoint: nothing more is sent to it.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | The webhook endpoint's id. |
Returns
- 200 a confirmation
Errors
| Code | Status | When |
|---|---|---|
endpoint_not_found | 404 | No webhook endpoint of yours has this id in this mode. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X DELETE \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.delete(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3",
"deleted": true
}Verify an endpoint again
/webhook_endpoints/{id}/verifySends the verification challenge again. The endpoint is active once your server answers it correctly. An endpoint that is already active is returned as it is, with no new challenge.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | The webhook endpoint's id. |
Returns
- 200 Webhook endpoint object
Errors
| Code | Status | When |
|---|---|---|
endpoint_not_found | 404 | No webhook endpoint of yours has this id in this mode. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3/verify" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3/verify', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3/verify",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "webhook_endpoint",
"id": "3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3",
"url": "https://lazy.glowstore.example/hooks",
"events": [
"*"
],
"livemode": true,
"status": "active",
"health": {
"consecutive_failures": 0,
"pending": 0
},
"verified_at": "2026-11-03T15:11:36Z",
"created_at": "2026-11-03T15:10:55Z"
}Send a test event
/webhook_endpoints/{id}/testSends a ping now, signed like any real event, and answers with the result: your server's status code, the time taken and any error. Your server's response body is not returned (it is in your own logs).
Path parameters
| Field | Description |
|---|---|
idrequiredstring | The webhook endpoint's id. |
Returns
- 200 Attempt object — the attempt
Errors
| Code | Status | When |
|---|---|---|
endpoint_not_found | 404 | No webhook endpoint of yours has this id in this mode. |
not_verified | 409 | The webhook endpoint has not answered our challenge yet. |
invalid_state | 409 | The action does not fit the current state, for example shipping a test order that has already shipped, delivering one that has not, or sending a test event that is already being sent. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100/test" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100/test', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100/test",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "delivery_attempt",
"event_id": "evt_8812",
"ok": true,
"status_code": 200,
"duration_ms": 118,
"error": null
}curl -X POST \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3/test" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3/test', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.post(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b2f3/test",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"error": {
"code": "not_verified",
"message": "This endpoint hasn't been verified yet."
}
}List delivery attempts
/webhook_endpoints/{id}/attemptsEvery attempt to reach this endpoint, newest first: use it to find out why deliveries are failing.
Path parameters
| Field | Description |
|---|---|
idrequiredstring | The webhook endpoint's id. |
Query parameters
| Field | Description |
|---|---|
limitinteger | How many to return. |
Returns
- 200 a list
Errors
| Code | Status | When |
|---|---|---|
endpoint_not_found | 404 | No webhook endpoint of yours has this id in this mode. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100/attempts" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100/attempts', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/webhook_endpoints/3f6c1a90-5b7d-4e21-9a4c-7a1c40e2b100/attempts",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "delivery_attempt",
"id": 2,
"kind": "event",
"event_id": "evt_8812",
"event_type": "ping",
"attempted_at": "2026-11-03T15:10:14Z",
"ok": true,
"status_code": 200,
"duration_ms": 118,
"error": null
},
{
"object": "delivery_attempt",
"id": 1,
"kind": "verification",
"event_id": null,
"event_type": null,
"attempted_at": "2026-11-03T15:09:33Z",
"ok": true,
"status_code": 200,
"duration_ms": 118,
"error": null
}
]
}Events
The replay log behind the webhooks. Catch up after any gap.
Read the event log
/eventsYour events in order, kept for 30 days (longer while one is still waiting to be delivered). Store the last sequence you processed and, after any gap (an outage, a deploy, a missed webhook), read from there. This is how you rebuild anything, with or without webhooks.
Query parameters
| Field | Description |
|---|---|
afterinteger | Only events with a higher sequence. Default 0. |
limitinteger | How many to return. Default 100. |
typesstring | Comma-separated event types to keep. |
Returns
- 200 a list
Errors
| Code | Status | When |
|---|---|---|
invalid_request | 400 | The request is malformed: the body is not JSON, a required field is missing, a field has the wrong type, or a query parameter is not valid. |
Every call can also answer 401 invalid_api_key and 500 internal_error.
curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=0&limit=3" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=0&limit=3', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=0&limit=3",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "event",
"id": "evt_8814",
"sequence": 1,
"type": "product.added",
"livemode": true,
"resource": {
"id": "PL-BPC-GLOW",
"type": "product",
"version": 1
},
"data": {
"object": "product",
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"description": "Research peptide, 10 mg vial",
"unit_price_cents": 1800,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 100,
"inventory_as_of": "2026-11-03T15:04:05Z"
},
"created_at": "2026-11-03T15:06:08Z"
},
{
"object": "event",
"id": "evt_8815",
"sequence": 2,
"type": "product.added",
"livemode": true,
"resource": {
"id": "PL-GHK-GLOW",
"type": "product",
"version": 1
},
"data": {
"object": "product",
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"description": null,
"unit_price_cents": 2200,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 1,
"inventory_as_of": "2026-11-03T15:04:46Z"
},
"created_at": "2026-11-03T15:06:08Z"
},
{
"object": "event",
"id": "evt_8816",
"sequence": 3,
"type": "product.added",
"livemode": true,
"resource": {
"id": "PL-TB4-GLOW",
"type": "product",
"version": 1
},
"data": {
"object": "product",
"sku": "PL-TB4-GLOW",
"name": "TB-500 5mg (Glow label)",
"description": null,
"unit_price_cents": 2600,
"currency": "USD",
"min_quantity": 1,
"price_tiers": [],
"available": 40,
"inventory_as_of": "2026-11-03T15:05:27Z"
},
"created_at": "2026-11-03T15:06:08Z"
}
],
"has_more": true,
"oldest_sequence": 1
}curl \
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=3&types=order.created,order.shipped&limit=3" \
-H "Authorization: Bearer $SUPPLIED_API_KEY"const res = await fetch('https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=3&types=order.created,order.shipped&limit=3', {
headers: {
Authorization: `Bearer ${process.env.SUPPLIED_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
res = requests.get(
"https://api.supplied.example/functions/v1/supplied-partner-api/v1/events?after=3&types=order.created,order.shipped&limit=3",
headers={"Authorization": f"Bearer {os.environ["SUPPLIED_API_KEY"]}"},
)
print(res.status_code, res.json()){
"object": "list",
"data": [
{
"object": "event",
"id": "evt_8817",
"sequence": 5,
"type": "order.created",
"livemode": true,
"resource": {
"id": "SUP-1042-7F3A",
"type": "order",
"version": 1
},
"data": {
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "received",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 0,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:06:49Z",
"shipping_cents": 5000
},
"created_at": "2026-11-03T15:06:49Z"
},
{
"object": "event",
"id": "evt_8818",
"sequence": 8,
"type": "order.created",
"livemode": true,
"resource": {
"id": "SUP-1043-81EB",
"type": "order",
"version": 1
},
"data": {
"object": "order",
"id": "SUP-1043-81EB",
"external_id": "GLOW-1043",
"livemode": true,
"status": "received",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-GHK-GLOW",
"name": "GHK-Cu 50mg (Glow label)",
"quantity": 5,
"shipped_quantity": 0,
"unit_price_cents": 2200,
"total_cents": 11000
}
],
"total_cents": 16000,
"subtotal_cents": 11000,
"currency": "USD",
"shipping_method": null,
"notes": null,
"shipments": [],
"shipped_at": null,
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:07:30Z",
"updated_at": "2026-11-03T15:07:30Z",
"shipping_cents": 5000
},
"created_at": "2026-11-03T15:07:30Z"
},
{
"object": "event",
"id": "evt_8813",
"sequence": 12,
"type": "order.shipped",
"livemode": true,
"resource": {
"id": "SUP-1042-7F3A",
"type": "order",
"version": 3
},
"data": {
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:12:17Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:12:58Z",
"shipping_cents": 5000
},
"created_at": "2026-11-03T15:13:39Z"
}
],
"has_more": true,
"oldest_sequence": 1
}Webhook delivery
What your server receives. See Webhooks for verification, signatures and retries.
A delivery to your server
POST your webhook addressOne event, signed: Supplied-Signature: t=…,v1=HMAC-SHA256(secret, "<t>.<raw body>"). Save the event, then answer any 2xx within 10 seconds (queue anything slow).
The event
| Field | Description |
|---|---|
object"event" | |
idstring | Unique. Drop a delivery whose id you have already processed. |
sequenceinteger | Your own counter. Only goes up, and can skip numbers. Use it to catch up with GET /events. |
typestring | |
created_atstring | |
livemodeboolean | |
resourceobject | What changed. Versions only go up for a record, so ignore an event whose version you already hold. |
resource.typeenum | orderinventoryproductendpoint |
resource.idstring | |
resource.versioninteger | |
dataobject | The record's full state at that moment, never a change. |
Returns
- 200 a list — answer any 2xx within 10 seconds
POST /supplied-webhooks HTTP/1.1
Content-Type: application/json
Supplied-Delivery-Attempt: 1
Supplied-Event-Id: evt_8813
Supplied-Event-Type: order.shipped
Supplied-Signature: t=1793718245,v1=5d2f7c1e9b0a4d38a6f1c2e7b9d04a83e1f06c92b7a45d3180e9fa26c4b7d531
{
"object": "event",
"id": "evt_8813",
"sequence": 12,
"type": "order.shipped",
"livemode": true,
"resource": {
"id": "SUP-1042-7F3A",
"type": "order",
"version": 3
},
"data": {
"object": "order",
"id": "SUP-1042-7F3A",
"external_id": "GLOW-1042",
"livemode": true,
"status": "shipped",
"hold_reasons": [],
"ship_to": {
"name": "Dana Consumer",
"company": null,
"line1": "9 Elm St",
"line2": "Apt 4",
"city": "Denver",
"state": "CO",
"postal_code": "80202",
"country": "US",
"phone": "555-0100"
},
"lines": [
{
"sku": "PL-BPC-GLOW",
"name": "BPC-157 10mg (Glow label)",
"quantity": 2,
"shipped_quantity": 2,
"unit_price_cents": 1800,
"total_cents": 3600
}
],
"total_cents": 8600,
"subtotal_cents": 3600,
"currency": "USD",
"shipping_method": "ground",
"notes": "Gift",
"shipments": [
{
"lines": [
{
"sku": "PL-BPC-GLOW",
"quantity": 2
}
],
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS"
}
],
"shipped_at": "2026-11-03T15:12:17Z",
"delivered_at": null,
"cancelled_at": null,
"created_at": "2026-11-03T15:06:49Z",
"updated_at": "2026-11-03T15:12:58Z",
"shipping_cents": 5000
},
"created_at": "2026-11-03T15:13:39Z"
}Answer with any 2xx within 10 seconds, then do the work.
Errors
Errors are JSON with a stable code. Branch on the code, never on the message.
{
"error": {
"code": "unknown_sku",
"message": "NOPE is not in your catalog.",
"param": "lines[0].sku"
}
}code: a stable machine-readable code, listed below.message: a sentence for a person. Its wording can change.param: the field at fault, when there is one, for examplelines[0].sku.
The HTTP status tells you what to do next: 4xx means fix the request, don't retry it unchanged. 5xx means retry; it is safe, because orders are idempotent.
| Code | Status | What it means | What to do |
|---|---|---|---|
invalid_request | 400 | The request is malformed: the body is not JSON, a required field is missing, a field has the wrong type, or a query parameter is not valid. A body over 256,000 bytes is also answered 413 with this code. | Read error.message and error.param: it names the field. Fix the request and send it again. Do not retry unchanged. |
invalid_url | 400 | The webhook address is not an HTTPS URL we can send to (plain http, a private or internal address, or a malformed URL). | Use a public https:// address. Addresses on private networks are refused. |
invalid_api_key | 401 | No key was sent, it is not in the form sk_live_… or sk_test_…, or it is unknown or revoked. | Send Authorization: Bearer <key>. If the key was revoked, ask Supplied for a new one. |
partner_disabled | 403 | API ordering is turned off for your account. | Contact Supplied. |
account_suspended | 403 | Your account is suspended. | Contact Supplied. |
account_not_on_terms | 403 | Orders go on your account and are invoiced when they ship. Your account does not have net terms yet. | Contact Supplied to be set up. |
test_mode_only | 403 | A test helper was called with a live key. | Use an sk_test_… key. Test helpers never touch real orders. |
license_required | 403 | Reserved. Professional products (PUO and 503A) cannot be ordered through the API at all, so today they are refused as professional_product. | Order professional products in the Supplied portal, signed in as a verified clinician. |
license_expired | 403 | Reserved, as license_required. | As license_required. |
not_found | 404 | The path or method does not exist. Paths start with /v1/. | Check the path against this reference. |
order_not_found | 404 | No order of yours has this id or external_id in this mode. Test orders and live orders never mix. | Use the id we returned or your own external_id, and the key of the mode that created the order. |
endpoint_not_found | 404 | No webhook endpoint of yours has this id in this mode. | List your endpoints with GET /webhook_endpoints. |
external_id_conflict | 409 | You already placed an order with this external_id, and this request has different content. (The same content again is not an error: it returns the existing order.) | Use a new external_id for a different order. To change an order, cancel it and place a new one. |
order_in_fulfillment | 409 | The warehouse has started the order, or it has shipped, so it can no longer be cancelled. | Contact Supplied if you must stop it. |
invalid_state | 409 | The action does not fit the current state, for example shipping a test order that has already shipped, delivering one that has not, or sending a test event that is already being sent. | Read the order, then call the helper that fits its status. |
not_verified | 409 | The webhook endpoint has not answered our challenge yet. | Make your server answer the challenge, then call POST /webhook_endpoints/{id}/verify. |
too_many_endpoints | 409 | An account can have at most 5 webhook endpoints per mode. | Delete one you no longer use. |
endpoint_disabled_by_supplied | 409 | Supplied turned this endpoint off. | Contact Supplied. |
unknown_sku | 422 | A SKU is not in your catalog. error.param says which line. | Read your catalog with GET /products and use its SKUs. |
below_minimum | 422 | A line is below the product's min_quantity for your account. | Order at least min_quantity of that product. |
not_in_step | 422 | A line's quantity is not a multiple of the product's order step for your account (for example 25 of a product sold in 10s). Only while Supplied checks order steps. | Order a multiple of the step: 20 or 30 of a product sold in 10s. |
professional_product | 422 | PUO and 503A (prescription) products cannot be ordered through the API: a key has no licensed clinician behind it. They are not listed in GET /products either. | Order them in the Supplied portal, signed in as a verified clinician. |
scope_not_allowed | 403 | Connected apps only ("Sign in with Supplied"): a connection key may read the catalog and stock, place and look up its own orders and manage its own webhook endpoints. Anything else is refused with this code, as is DELETE /v1/connect with a key that is not a connection key. | Use the routes a connection key is for. Other keys are issued by Supplied. |
connection_approver_removed | 403 | Connected apps only: the person who allowed this connection is no longer an owner of the Supplied account (nor Supplied staff). Every call with the connection key is refused until they are again; DELETE /v1/connect still works. | Treat the connection as cut off. Ask an owner of the Supplied account to connect it again. |
invalid_client | 401 | Connected apps only: POST /v1/connect/token was sent without the app's client id and secret (HTTP Basic, or X-Client-Id and X-Client-Secret), or they are wrong. | Send the client id and secret Supplied registered for your app. |
invalid_grant | 400 | Connected apps only: the code is unknown, expired (codes last 60 seconds), already used (the connection made with it is then revoked), made for another app, or redirect_uri is not the one it was made for. | Send the person through Supplied's connect page again for a new code, and swap it at once from your server. |
invalid_redirect_uri | 400 | Connected apps only: the return address is not exactly one registered for the app. | Use a registered return address, character for character, or ask Supplied to register yours. |
internal_error | 500 | An error on our side. We log it with the Request-Id. | Retry after a few seconds with the same external_id (an order is never created twice). If it keeps failing, contact Supplied and quote the Request-Id. |
Objects
The shapes the API sends and accepts. Fields can be added over time: ignore the ones you don't know.
Order
| Field | Description |
|---|---|
object"order" | |
idstring | Our order number: SUP-… (live) or TEST-… (test). |
external_idstring | Your order number. |
livemodeboolean | false for an order placed with a test key. |
statusenum | See the order lifecycle. receivedheldprocessingpartially_shippedshippeddeliveredcancel_requestedcancelled |
hold_reasonsobject[] | Why a held order is waiting. Empty otherwise. |
hold_reasons[].codeenum | stockcreditmanual_reviewwarehouse_setup |
hold_reasons[].messagestring | |
hold_reasons[].linesany[] | For stock: the short lines, with what is available and what you ordered. |
ship_toobject | |
ship_to.namerequiredstring | Who the parcel is for. |
ship_to.companystring | null | |
ship_to.line1requiredstring | |
ship_to.line2string | null | |
ship_to.cityrequiredstring | |
ship_to.staterequiredstring | |
ship_to.postal_coderequiredstring | |
ship_to.countryrequiredstring | Two letters |
ship_to.phonestring | null | The carrier gets it. We never ask for your customer's email, and we never contact them. |
linesobject[] | |
lines[].skustring | |
lines[].namestring | |
lines[].quantityinteger | |
lines[].shipped_quantityinteger | How much of this line has shipped. |
lines[].unit_price_centsinteger | |
lines[].total_centsinteger | |
subtotal_centsinteger | The products only. |
shipping_centsinteger | Shipping on this order. A flat price per order when your account has one (set when the order is placed, never changed afterwards). Otherwise the warehouse's cost, known once the order ships: 0 until then (always 0 on an order paid before it ships, which pays no shipping without a flat price). It is on the invoice. |
total_centsinteger | subtotal_cents + shipping_cents: what the order is invoiced at (with a flat price, from the moment it is placed). A cancelled order is not invoiced. |
currency"USD" | |
shipping_methodstring | null | |
notesstring | null | |
shipmentsobject[] | One entry per package, with the tracking number as soon as the warehouse has it. |
shipments[].tracking_numberstring | |
shipments[].carrierstring | null | |
shipments[].linesobject[] | |
shipments[].lines[].skustring | |
shipments[].lines[].quantityinteger | |
shipped_atstring | null | |
delivered_atstring | null | |
cancelled_atstring | null | |
created_atstring | |
updated_atstring | When the order last changed: placed, held, released, shipped, delivered, cancel requested or cancelled. |
Product
| Field | Description |
|---|---|
object"product" | |
skustring | |
namestring | |
descriptionstring | null | |
unit_price_centsinteger | Your drop-ship price for one unit, in cents (1800 = $18.00). |
currency"USD" | |
min_quantityinteger | The least you can order of this product on one line. |
price_tiersobject[] | Lower prices from a quantity per line. |
price_tiers[].min_quantityinteger | |
price_tiers[].unit_price_centsinteger | |
availableinteger | null | What the warehouse can sell now (0 when sold out, never negative). Shared with every channel Supplied sells through, so treat it as live. null: the warehouse has not reported this product yet. |
inventory_as_ofstring | null | When the warehouse last reported this stock. |
image_urlstring | null | A photo of the product: a stable, public https URL you may copy. A changed photo is a new URL, and product.updated tells you. Your own label's picture once Supplied has made it, otherwise a plain photo of the container with a blank label (never Supplied's branding). null: no photo yet. Left out while Supplied hasn't turned photos on for your account's API. |
strengthobject[] | The product's strength as Supplied holds it, left out while Supplied has not filled it in. One row per ingredient, in label order (a blend has several): amount (a number above 0), unit (mg, mcg, g, mL, IU, mg/mL, mcg/mL or IU/mL) and ingredient (the ingredient's name, always present for a blend). An empty list means no strength applies (for example a capsule product sold by pack count). |
strength[].amountrequirednumber | |
strength[].unitrequiredstring | |
strength[].ingredientstring | |
strength_displaystring | null | The strength as text, in row order: "10 mg", "10 mg / 10 mg". null when strength is an empty list. Present whenever strength is. |
Inventory
| Field | Description |
|---|---|
object"inventory" | |
skustring | |
availableinteger | null | What the warehouse can sell now. null: not reported yet. |
as_ofstring | null |
Address
| Field | Description |
|---|---|
namerequiredstring | Who the parcel is for. |
companystring | null | |
line1requiredstring | |
line2string | null | |
cityrequiredstring | |
staterequiredstring | |
postal_coderequiredstring | |
countryrequiredstring | Two letters |
phonestring | null | The carrier gets it. We never ask for your customer's email, and we never contact them. |
Webhook endpoint
| Field | Description |
|---|---|
object"webhook_endpoint" | |
idstring | |
urlstring | |
eventsstring[] | The event types you subscribed to, or ["*"] for all. |
descriptionstring | |
livemodeboolean | An endpoint made with a test key gets test-mode order events. |
statusenum | pending_verificationactivepauseddisabled |
secretstring | whsec_… Only in the answer to POST /webhook_endpoints. Store it: it is never shown again. |
created_atstring | |
verified_atstring | |
disabled_atstring | |
disabled_reasonstring | |
healthobject | How deliveries are going. |
health.last_success_atstring | |
health.last_failure_atstring | |
health.last_errorstring | |
health.failing_sincestring | |
health.consecutive_failuresinteger | |
health.pendinginteger | Events waiting to be sent. |
health.oldest_pending_atstring |
Delivery attempt
| Field | Description |
|---|---|
object"delivery_attempt" | |
kindenum | Only in the list of attempts (not in the answer to a test send). eventverification |
event_idstring | null | |
event_typestring | null | |
attempted_atstring | |
okboolean | |
status_codeinteger | null | What your server answered. |
duration_msinteger | |
errorstring | null |
Event
| Field | Description |
|---|---|
object"event" | |
idstring | Unique. Drop a delivery whose id you have already processed. |
sequenceinteger | Your own counter. Only goes up, and can skip numbers. Use it to catch up with GET /events. |
typestring | |
created_atstring | |
livemodeboolean | |
resourceobject | What changed. Versions only go up for a record, so ignore an event whose version you already hold. |
resource.typeenum | orderinventoryproductendpoint |
resource.idstring | |
resource.versioninteger | |
dataobject | The record's full state at that moment, never a change. |
Error
| Field | Description |
|---|---|
error.coderequiredstring | A stable machine-readable code. Branch on this, never on the message. |
error.messagerequiredstring | A sentence for a person. Its wording can change. |
error.paramstring | The field at fault, when one is, e.g. lines[0].sku. |