> ## 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.

# StateSet Commerce API

> The embedded commerce engine's HTTP surface — 442 operations across 61 domains, from order capture through the general ledger.

This is the HTTP surface of the embedded commerce engine — the same engine documented in
[iCommerce](/stateset-icommerce/stateset-icommerce-quickstart). It runs a full commerce and ERP
stack: order capture, inventory, warehouse operations, manufacturing, procurement, and
double-entry accounting.

**442 operations across 61 domains.** Every page in this section is generated from the engine's
OpenAPI specification, so the paths, parameters, and response shapes are the ones the code serves
rather than prose that drifted.

<Warning>
  **Deployment required.** The dated [host report](/api-reference/hosts) records no public
  Commerce deployment at `api.stateset.com`. This section documents the HTTP contract.
  Obtain a provisioned deployment URL and credentials before running its examples.
  To create an order now without a hosted key, use the [local walkthrough](/guides/first-operation).
</Warning>

## Base URL

```
https://api.stateset.com/api/v1
```

<Warning>
  The documented router prefix is `/api/v1`. The example host above is a contract address;
  replace it with your provisioned host. Do not substitute the legacy `/v1` prefix.
</Warning>

## Authentication

```bash theme={null}
curl https://api.stateset.com/api/v1/orders \
  -H "Authorization: Bearer $STATESET_API_KEY"
```

## What it covers

### Orders and customers

*88 operations*

| Domain | Operations | Covers |
| - | - | - |
| **orders** | 5 | Order lifecycle management |
| **carts** | 10 | Cart and checkout sessions: items, shipping, payment, completion |
| **customers** | 5 | Customer management |
| **companies** | 6 | B2B company account management |
| **channels** | 6 | Sales channel management |
| **segments** | 6 | Customer segment management |
| **wishlists** | 6 | Customer wishlist management |
| **reviews** | 4 | Product review management |
| **loyalty** | 4 | Loyalty program management |
| **store credits** | 5 | Store credit management |
| **gift cards** | 6 | Gift card management |
| **subscriptions** | 6 | Recurring subscription management |
| **promotions** | 5 | Promotion and discount management |
| **price levels** | 7 | Customer price level management |
| **price schedules** | 7 | Scheduled pricing management |

### Inventory and warehouse

*76 operations*

| Domain | Operations | Covers |
| - | - | - |
| **inventory** | 3 | Stock and inventory management |
| **warehouse** | 27 | Warehouses, storage locations, and location-level inventory (adjust/move) |
| **lots** | 9 | Lot/batch tracking: creation, consumption, reservations, quarantine, and expiry queries |
| **serials** | 8 | Serial number tracking: creation, lookup, reservations, and lifecycle transitions |
| **stock snapshots** | 5 | Point-in-time inventory snapshots |
| **units of measure** | 6 | Unit of measure definitions |
| **transfer orders** | 6 | Inter-warehouse transfer orders |
| **backorders** | 5 | Backorder creation, fulfillment, and cancellation |
| **print stations** | 7 | Warehouse print station management |

### Fulfillment and shipping

*54 operations*

| Domain | Operations | Covers |
| - | - | - |
| **fulfillment** | 13 | Outbound fulfillment: waves, pick tasks, pack tasks and cartons, ship tasks |
| **shipments** | 4 | Shipment tracking and management |
| **shipping** | 4 | Shipping zone management |
| **receiving** | 12 | Inbound receiving: goods receipts, item receipt, and put-away tasks |
| **inbound shipments** | 7 | Inbound shipment receiving |
| **returns** | 5 | Return request processing |
| **vendor returns** | 6 | Return-to-vendor processing |
| **warranties** | 3 | Product warranty management |

### Manufacturing and quality

*41 operations*

| Domain | Operations | Covers |
| - | - | - |
| **work orders** | 13 | Manufacturing work order lifecycle and shop-floor tasks |
| **bom** | 8 | Bills of materials: BOM revisions, components, and status control |
| **production batches** | 5 | Production batch tracking |
| **quality** | 15 | Quality control: inspections, non-conformance reports, and quality holds |

### Procurement

*27 operations*

| Domain | Operations | Covers |
| - | - | - |
| **purchase orders** | 18 | Supplier procurement: purchase order lifecycle (draft → approval → send → acknowledge → receive → complete) and supplier management |
| **supplier skus** | 4 | Supplier SKU catalog |
| **vendor credits** | 5 | Vendor credit management |

### Financials

*97 operations*

| Domain | Operations | Covers |
| - | - | - |
| **general ledger** | 20 | Chart of accounts, journal entries, accounting periods, and financial reports (trial balance, balance sheet, income statement) |
| **accounts payable** | 14 | Supplier bills, AP payments and allocations, payment runs, and AP aging |
| **accounts receivable** | 15 | AR aging, payment application, credit memos, write-offs, dunning, and customer statements |
| **invoices** | 5 | Invoice management |
| **payments** | 5 | Payment transaction management |
| **payment obligations** | 7 | Payment obligation tracking |
| **prepayments** | 5 | Customer and vendor prepayments |
| **fixed assets** | 10 | Fixed-asset register: acquisition, depreciation schedules, disposal, and write-off |
| **revenue recognition** | 8 | Revenue contracts, performance obligations, and recognition schedules (ASC 606) |
| **currency** | 3 | Exchange rates and currency conversion |
| **reports** | 5 | Computed business reports |

### Agents and protocols

*19 operations*

| Domain | Operations | Covers |
| - | - | - |
| **a2a** | 8 | Agent-to-agent messaging and credit terms |
| **negotiations** | 5 | Agent-to-agent price negotiation |
| **edi documents** | 5 | EDI document exchange |
| **events** | 1 | Real-time event streaming |

### Platform

*40 operations*

| Domain | Operations | Covers |
| - | - | - |
| **products** | 5 | Product catalog |
| **integration mappings** | 7 | External integration record mappings |
| **integration field mappings** | 8 | Integration field-level mappings |
| **activity logs** | 4 | Record-level activity history |
| **purgatory** | 6 | Quarantined record review |
| **topology snapshots** | 5 | Network topology snapshots |
| **health** | 5 | Health check endpoints |

<Note>
  The financials domain is the part most commerce APIs do not have. `general_ledger`,
  `accounts_payable`, `accounts_receivable`, `fixed_assets`, and `revenue_recognition` provide accounting operations. Their presence does not establish that creating an order
  automatically posts journal entries. Verify the ledger workflow and resulting records separately.
</Note>

## Workflows over this API

The reference tells you what each operation does; these guides tell you which ones to call, in what
order, for the jobs that span domains:

| Guide | Covers |
| - | - |
| [Order to cash](/guides/commerce/order-to-cash) | Order → invoice → payment → application → ledger |
| [AR and collections](/guides/commerce/ar-collections) | Aging, dunning, credit memos, write-offs |
| [Period close](/guides/commerce/period-close) | Journal entries, revaluation, close, lock |
| [Procure to pay](/guides/commerce/procure-to-pay) | PO lifecycle, three-way match, payment runs |
| [Receiving and put-away](/guides/commerce/receiving-and-putaway) | Inbound shipments, receipts, cycle counts |
| [Fulfillment](/guides/commerce/fulfillment) | Waves, picks, packs, ships |
| [Returns and RTV](/guides/commerce/returns-and-rtv) | Customer returns, disposition, vendor returns |
| [Traceability](/guides/commerce/traceability) | Lots, serials, quarantine, the recall drill |

## Conventions

| | |
| - | - |
| Path parameters | `{id}` in the documented path |
| Errors | Structured body — see [Errors](/api-reference/errors) |
| Idempotency | Follow the endpoint’s documented header and replay rules; preserve its key and body on retries |
| Rate limits | Use the limits and headers documented for your deployment; see [rate limiting](/api-reference/rate-limiting) |

## Related

* [iCommerce quickstart](/stateset-icommerce/stateset-icommerce-quickstart) — running the engine
* [StateSet One](/api-reference/overview) — the platform underneath this API
* [Errors](/api-reference/errors) · [Rate limiting](/api-reference/rate-limiting)


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