Guides
Pagination & filtering
List endpoints return results in pages. Use the cursor from one page to fetch the next.
Cursor pagination
| Parameter | Description |
|---|---|
limit | Results per page. Default 50, maximum 250. |
cursor | The next_cursor value from the previous response. Omit it for the first page. |
Every list response has the same envelope:
{
"data": [
{
"id": 1042,
"title": "Stoneware mug"
},
{
"id": 1043,
"title": "Linen apron"
}
],
"has_more": true,
"next_cursor": "eyJpZCI6MTA0M30"
}When has_more is false, next_cursor is null and you’ve reached the end. Cursors are opaque — don’t build or modify them, and keep the same filters while following one.
Fetching every page
async function* allProducts() {
let cursor = null;
do {
const url = new URL("https://api.sellorchard.com/v1/products");
url.searchParams.set("limit", "250");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.SELLORCHARD_API_KEY}` },
});
const page = await res.json();
yield* page.data;
cursor = page.has_more ? page.next_cursor : null;
} while (cursor);
}
for await (const product of allProducts()) console.log(product.id, product.title);$cursor = null;
do {
$query = http_build_query(array_filter(['limit' => 250, 'cursor' => $cursor]));
$ch = curl_init("https://api.sellorchard.com/v1/products?" . $query);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('SELLORCHARD_API_KEY')],
]);
$page = json_decode(curl_exec($ch), true);
foreach ($page['data'] as $product) {
echo $product['id'], ' ', $product['title'], PHP_EOL;
}
$cursor = $page['has_more'] ? $page['next_cursor'] : null;
} while ($cursor);import os
import requests
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['SELLORCHARD_API_KEY']}"
cursor = None
while True:
params = {"limit": 250, **({"cursor": cursor} if cursor else {})}
page = session.get("https://api.sellorchard.com/v1/products", params=params).json()
for product in page["data"]:
print(product["id"], product["title"])
if not page["has_more"]:
break
cursor = page["next_cursor"]Filtering
Most lists accept these filters, plus resource-specific ones listed in the reference (for example status on orders and products):
| Parameter | Description |
|---|---|
updated_since | Only results updated at or after this ISO-8601 time. |
created_since | Only results created at or after this ISO-8601 time. |
curl "https://api.sellorchard.com/v1/orders?payment_status=paid&updated_since=2026-11-01T00:00:00Z&limit=100" \
-H "Authorization: Bearer $SELLORCHARD_API_KEY"Incremental sync
To keep another system in step without re-reading everything:
- Do a full sync once, paging through the whole list.
- Remember the time you started that sync.
- Next time, request
updated_since=<that time>and page through the changes.
For near real-time updates, subscribe to webhooks and use
updated_since as a periodic safety net in case a delivery is missed.