# List orders

Return a paginated list of orders.

Endpoint: GET /orders
Version: V5
Security: bearerAuth, basicAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

  - `basicAuth` (unknown)
    http basic

## Query parameters:

  - `limit` (integer)
    Limit the number of orders returned.

  - `page` (string)
    Specify the page of orders returned.

  - `filter` (object)
    Filter orders by the specified fields.

Filter semantics: `filter[field][operator]=value`.

Available filter operators:
- `eq` - equal (=)
- `gt` - greater than (>)
- `gte` - greater than or equal (>=)
- `lt` - less than (<)
- `lte` - less than or equal (<=)

Filtering is allowed by the following fields:
  - `status` (`eq`)
  - `order_number` (`eq`)
  - `po_number` (`eq`)
  - `customer_id` (`eq`)
  - `authorized_at` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_authorized` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_captured` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_canceled` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_remaining` (`eq`, `gt`, `lt`, `gte`, `lte`)

Example: `filter[status][eq]=authorized`

Note: filter with the `eq` operator is equivalent to `filter[field]=value`

## Response 200:

  - `200` (unknown)
    A paginated list of orders.

## Response 200 fields (application/json):

  - `count` (integer)
    Example: 1

  - `limit` (integer)
    Example: 100

  - `page` (integer)
    Example: 1

  - `results` (array)

  - `results.id` (string)
    Unique identifier for the order.
    Example: ORDlaE5wbg0

  - `results.checkout_id` (string)
    ID of the checkout session associated with this order.
    Example: CHKabc123

  - `results.number` (string)
    Order number identifier.
    Example: ord_100001

  - `results.po_number` (string)
    Purchase order number associated with the order.
    Example: PO-555

  - `results.advance_requested` (boolean)
    Whether an advance was requested for this order.
    Example: false

  - `results.source` (string)
    Source channel that created the order.
    Example: checkout

  - `results.status` (string)
    Current status of the order.
    Example: authorized

  - `results.amount_authorized` (number)
    Total authorized amount for the order in USD.
    Example: 1000

  - `results.amount_captured` (number)
    Total captured amount for the order in USD.
    Example: 500

  - `results.amount_canceled` (number)
    Total canceled amount for the order in USD.
    Example: 0

  - `results.amount_remaining` (number)
    Remaining authorized amount available for capture in USD.
    Example: 500

  - `results.first_captured_at` (string)
    Timestamp of the first capture event.
    Example: 2024-01-15T10:00:00.000Z

  - `results.line_items` (array)
    Line items associated with the order.

  - `results.line_items.name` (string)
    Name or description of the line item.
    Example: Widget A

  - `results.line_items.quantity` (number)
    Quantity of units.
    Example: 2

  - `results.line_items.unit_price` (number)
    Price per unit in USD.
    Example: 50

  - `results.line_items.sku` (string)
    SKU or product identifier.
    Example: ABC-123

  - `results.line_items.total_price` (number)
    Total price for this line item in USD. Defaults to unit_price × quantity if omitted.
    Example: 100

  - `results.line_items.type` (string)
    Line item type. Common values: `product`, `shipping`, `subtotal`.
    Example: product

  - `results.line_items.tax_amount` (number)
    Tax amount for this line item in USD.
    Example: 8.5

  - `results.authorization_expires_at` (string)
    Timestamp when the authorization expires.
    Example: 2024-02-15T10:00:00.000Z

  - `results.authorization_expiry_source` (string)
    Source that determined the authorization expiry.
    Example: system

  - `results.authorized_at` (string)
    Timestamp when the order was authorized.
    Example: 2024-01-01T00:00:00.000Z

  - `results.updated_at` (string)
    Timestamp when the order was last updated.
    Example: 2024-01-15T10:00:00.000Z

  - `results.customer` (object)

  - `results.customer.id` (string)
    Unique identifier of the customer.
    Example: X50sgfRd

  - `results.customer.name` (string)
    Business name of the customer.
    Example: Acme Corp

  - `results.customer.remaining_credit` (number)
    Remaining available credit for the customer in USD.
    Example: 5000

## Response 400:

  - `400` (unknown)
    Bad request error

## Response 400 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Validation error

  - `error.type` (string)
    A short string, describing error type
    Enum: "validation_error"

  - `error.details` (array)

  - `error.details.path` (string)
    Path to the field failed validation
    Example: path.to.field

  - `error.details.message` (string)
    Detailed description of the error
    Example: `[field]` is required

## Response 401:

  - `401` (unknown)
    Unauthorized error

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 429:

  - `429` (unknown)
    Rate limit error

## Response 429 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Too many requests

  - `error.type` (string)
    A short string, describing error type
    Enum: "rate_limit_error"

