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

# List orders with filtering and pagination

> List of orders

### Path parameters

<ParamField path="tenant_id" type="string" required>
  Tenant identifier
</ParamField>

### Query parameters

<ParamField query="page" type="integer (int32)">
  Page number (1-indexed)
</ParamField>

<ParamField query="page_size" type="integer (int32)">
  Items per page (max 100)
</ParamField>

<ParamField query="status" type="string">
  Filter by order status
</ParamField>

<ParamField query="created_after" type="string">
  Filter by creation date (ISO 8601)
</ParamField>

<ParamField query="created_before" type="string">
  Filter by creation date (ISO 8601)
</ParamField>

<ParamField query="order_number" type="string">
  Search by order number
</ParamField>

<ParamField query="shopify_order_id" type="string">
  Search by Shopify order ID
</ParamField>

<ParamField query="tags" type="string">
  Filter by tags (comma-separated)
</ParamField>

### Response

`object`

<ResponseField name="items" type="object[]" required>
  The items on this page

  <Expandable title="items">
    <ResponseField name="id" type="string (uuid)" required>
      Unique StateSet order ID
    </ResponseField>

    <ResponseField name="shopifyOrderId" type="string" required>
      Shopify order ID
    </ResponseField>

    <ResponseField name="orderNumber" type="string" required>
      Order number
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Order status
    </ResponseField>

    <ResponseField name="lineItems" type="object[]" required>
      Order line items

      <Expandable title="lineItems">
        <ResponseField name="title" type="string" required>
          Product title
        </ResponseField>

        <ResponseField name="quantity" type="number" required>
          Quantity ordered
        </ResponseField>

        <ResponseField name="price" type="number" required>
          Unit price
        </ResponseField>

        <ResponseField name="sku" type="string">
          Product SKU
        </ResponseField>

        <ResponseField name="variantId" type="string">
          Variant ID from Shopify
        </ResponseField>

        <ResponseField name="shopifyLineItemId" type="string">
          Shopify line item ID
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="createdAt" type="string (date-time)" required>
      Order creation timestamp
    </ResponseField>

    <ResponseField name="updatedAt" type="string (date-time)" required>
      Last update timestamp
    </ResponseField>

    <ResponseField name="tags" type="string[]" required>
      Order tags
    </ResponseField>

    <ResponseField name="locationId" type="string">
      Location ID for fulfillment
    </ResponseField>

    <ResponseField name="netsuiteId" type="string">
      NetSuite order ID if synced
    </ResponseField>

    <ResponseField name="netsuiteTranId" type="string">
      NetSuite transaction ID if available
    </ResponseField>

    <ResponseField name="netsuiteSyncedAt" type="string (date-time)">
      When this order was synced to NetSuite
    </ResponseField>

    <ResponseField name="netsuiteLastError" type="string">
      Last NetSuite sync error
    </ResponseField>

    <ResponseField name="netsuiteLastAttemptAt" type="string (date-time)">
      Last NetSuite sync attempt time
    </ResponseField>

    <ResponseField name="fulfillmentStatus" type="string">
      Fulfillment status
    </ResponseField>

    <ResponseField name="tracking" type="object">
      Tracking information for an order

      <Expandable title="tracking">
        <ResponseField name="trackingNumber" type="string">
          Tracking number
        </ResponseField>

        <ResponseField name="carrier" type="string">
          Carrier name
        </ResponseField>

        <ResponseField name="trackingUrl" type="string">
          Tracking URL
        </ResponseField>

        <ResponseField name="estimatedDelivery" type="string">
          Estimated delivery date
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="dclSubmittedAt" type="string (date-time)">
      When this order was submitted to DCL
    </ResponseField>

    <ResponseField name="dclLastError" type="string">
      Last DCL submission error
    </ResponseField>

    <ResponseField name="dclLastAttemptAt" type="string (date-time)">
      Last DCL submission attempt time
    </ResponseField>

    <ResponseField name="dclLocation" type="string">
      DCL location used during submission
    </ResponseField>

    <ResponseField name="luminousOrderId" type="string">
      Luminous order ID if synced
    </ResponseField>

    <ResponseField name="luminousSyncedAt" type="string (date-time)">
      When this order was synced to Luminous
    </ResponseField>

    <ResponseField name="luminousLastError" type="string">
      Last Luminous sync error
    </ResponseField>

    <ResponseField name="luminousLastAttemptAt" type="string (date-time)">
      Last Luminous sync attempt time
    </ResponseField>

    <ResponseField name="capacitySubmittedAt" type="string (date-time)">
      When this order was submitted to Capacity
    </ResponseField>

    <ResponseField name="capacityLastError" type="string">
      Last Capacity submission/cancel error
    </ResponseField>

    <ResponseField name="capacityLastAttemptAt" type="string (date-time)">
      Last Capacity operation attempt time
    </ResponseField>

    <ResponseField name="latestMovement" type="object">
      Summary of the latest movement event for an order

      <Expandable title="latestMovement">
        <ResponseField name="eventType" type="string" required>
          Stable event type
        </ResponseField>

        <ResponseField name="stage" type="string" required>
          Current stage within the engine
        </ResponseField>

        <ResponseField name="source" type="string" required>
          Source system for the latest movement
        </ResponseField>

        <ResponseField name="status" type="string">
          Optional normalized status
        </ResponseField>

        <ResponseField name="summary" type="string" required>
          Human-readable summary for operators
        </ResponseField>

        <ResponseField name="occurredAt" type="string (date-time)" required>
          Timestamp for the latest movement
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object" required>
  Pagination metadata

  <Expandable title="pagination">
    <ResponseField name="page" type="integer" required>
      Current page number
    </ResponseField>

    <ResponseField name="pageSize" type="integer" required>
      Number of items per page
    </ResponseField>

    <ResponseField name="totalItems" type="integer">
      Total number of items across all pages
    </ResponseField>

    <ResponseField name="totalPages" type="integer">
      Total number of pages
    </ResponseField>

    <ResponseField name="hasNext" type="boolean" required>
      Whether there is a next page
    </ResponseField>

    <ResponseField name="hasPrevious" type="boolean" required>
      Whether there is a previous page
    </ResponseField>
  </Expandable>
</ResponseField>

### Status codes

| Code  | Meaning        |
| ----- | -------------- |
| `200` | List of orders |
| `401` | Unauthorized   |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/orders' \
    --header 'x-stateset-api-key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "items": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "shopifyOrderId": "string",
        "orderNumber": "ORD-10042",
        "status": "pending",
        "lineItems": [],
        "createdAt": "2026-08-31T14:22:05Z",
        "updatedAt": "2026-08-31T14:22:05Z",
        "tags": [],
        "locationId": "string",
        "netsuiteId": "string",
        "netsuiteTranId": "string",
        "netsuiteSyncedAt": "2026-08-31T14:22:05Z",
        "netsuiteLastError": "string",
        "netsuiteLastAttemptAt": "2026-08-31T14:22:05Z",
        "fulfillmentStatus": "string",
        "tracking": {
          "trackingNumber": null,
          "carrier": null,
          "trackingUrl": null,
          "estimatedDelivery": null
        },
        "dclSubmittedAt": "2026-08-31T14:22:05Z",
        "dclLastError": "string",
        "dclLastAttemptAt": "2026-08-31T14:22:05Z",
        "dclLocation": "string",
        "luminousOrderId": "string",
        "luminousSyncedAt": "2026-08-31T14:22:05Z",
        "luminousLastError": "string",
        "luminousLastAttemptAt": "2026-08-31T14:22:05Z",
        "capacitySubmittedAt": "2026-08-31T14:22:05Z",
        "capacityLastError": "San Francisco",
        "capacityLastAttemptAt": "2026-08-31T14:22:05Z",
        "latestMovement": {
          "eventType": null,
          "stage": null,
          "source": null,
          "status": null,
          "summary": null,
          "occurredAt": null
        }
      }
    ],
    "pagination": {
      "page": 1,
      "pageSize": 20,
      "totalItems": 1,
      "totalPages": 1,
      "hasNext": true,
      "hasPrevious": true
    }
  }
  ```
</ResponseExample>
