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

# Sync Server API

> Tenant-scoped order, inventory and product sync across 180+ integrations — the tenant endpoints of api.sync.stateset.com, generated from the server's own OpenAPI.

The Sync Server keeps a tenant's commerce systems agreeing with each other: Shopify with NetSuite,
a 3PL with the order book, inventory with every channel that sells it. This API is how a tenant
drives it — trigger and inspect syncs, read and write orders, receive and replay webhooks, and
watch the jobs that do the work.

|          |                                                                       |
| -------- | --------------------------------------------------------------------- |
| Base URL | `https://api.sync.stateset.com/v1/tenants/{tenant_id}`                |
| Auth     | `x-stateset-api-key: <tenant key>` or `Authorization: Bearer <token>` |
| Spec     | `GET /api-docs/openapi.json` — the server publishes its own document  |

<Note>
  Every endpoint here is tenant-scoped: the tenant id is in the path, and the key must belong to it.
  The server also carries a 38-operation admin surface under `/v1/admin` behind an admin key —
  platform diagnostics, tenant policy, audit — which is operated by StateSet and not listed.
</Note>

<Note>
  Every success body is wrapped: `{ "meta": { "requestId": "…" }, "data": … }`. The response fields
  on each page describe `data`; the wrapper is the same everywhere and is not repeated. Errors use
  the same `meta` with an `error` object instead of `data`.
</Note>

## Where to start

<CardGroup cols={2}>
  <Card title="Trigger a sync" icon="refresh-cw" href="/api-reference/sync/sync/v1-tenants-by-sync-all-create">
    Orders, inventory, products — per integration, with the job id you then watch.
  </Card>

  <Card title="Watch the jobs" icon="list-checks" href="/api-reference/sync/jobs/v1-tenants-by-jobs-by-cancel-create">
    Queued, running, succeeded, retrying, failed, dead-lettered — and why.
  </Card>

  <Card title="Receive webhooks" icon="webhook" href="/api-reference/sync/webhooks/v1-tenants-by-webhooks-acp-orders-create">
    Register endpoints, read the events the platform recorded, replay one that failed.
  </Card>

  <Card title="Read and write orders" icon="package" href="/api-reference/sync/orders/v1-tenants-by-orders-batch-create">
    The order book as the sync sees it, with idempotent writes.
  </Card>
</CardGroup>

<Tip>
  Every write takes an `Idempotency-Key`. Reusing a key with a different body returns
  `idempotency_conflict` rather than a second order — so after a timeout, retry with the same key and
  check the job rather than retrying blind.
</Tip>

## Related

* [API contract](/stateset-sync-server-api-contract) — envelopes, error codes, rate limits, pagination
* [Sync Server MCP](/stateset-sync-mcp) — the 186-tool registry for agents
* [Connectors](/stateset-sync-server-connectors) and [troubleshooting](/stateset-sync-server-troubleshooting)
* [Sync Server skill](/stateset-sync-server-skill) — the agent-facing summary
