> ## 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 — 432 operations across 61 domains, from order capture through the general ledger.

# StateSet Commerce API

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.

**432 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.

## Base URL

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

<Warning>
  The prefix is `/api/v1`, not `/v1`. The engine mounts its router at `/api/v1` and serves no `/v1`
  alias, so a request to `/v1/orders` returns 404.
</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

*67 operations*

| Domain               | Operations | Covers                                                                                  |
| -------------------- | ---------- | --------------------------------------------------------------------------------------- |
| **inventory**        | 3          | Stock and inventory management                                                          |
| **warehouse**        | 18         | 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

*53 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**           | 4          | 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` mean an order
  posts to a real chart of accounts with journal entries, periods that close and lock, and a trial
  balance — rather than exporting a CSV for someone else's ledger.
</Note>

## Conventions

|                 |                                                                  |
| --------------- | ---------------------------------------------------------------- |
| Path parameters | `{id}` in the documented path                                    |
| Errors          | Structured body — see [Errors](/api-reference/errors)            |
| Idempotency     | Send `Idempotency-Key` on writes                                 |
| Rate limits     | Read `RateLimit-Remaining` and back off before you are throttled |

## Related

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