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

# List orders

> Orders for a site
## Pagination
Use `page[number]` and `page[size]` parameters to paginate results:
### Get first page of 10 items
* `GET /v1/orders?page[number]=1&page[size]=10`
### Get second page of 25 items
* `GET /v1/orders?page[number]=2&page[size]=25`

The response includes pagination links and meta data:
```json
{
  "links": {
    "self": "https://api.kajabi.com/v1/orders?page[number]=2&page[size]=10",
    "first": "https://api.kajabi.com/v1/orders?page[number]=1&page[size]=10",
    "prev": "https://api.kajabi.com/v1/orders?page[number]=1&page[size]=10",
    "next": "https://api.kajabi.com/v1/orders?page[number]=3&page[size]=10",
    "last": "https://api.kajabi.com/v1/orders?page[number]=5&page[size]=10"
  },
  "meta": {
    "total_pages": 5,
    "total_count": 50,
    "current_page": 2
  }
}
```
## Sorting
Use the `sort` parameter to sort the results:
### Sort by order_number in ascending order
* `GET /v1/orders?sort=order_number`
### Sort by created_at in descending order
* `GET /v1/orders?sort=-created_at`

## Filtering
Use filter parameters to narrow down results:
### Filter by site
Use the `filter[site_id]` parameter to get orders for a specific site:
* `GET /v1/orders?filter[site_id]=123`
### Filter by customer
Use the `filter[customer_id]` parameter to get orders for a specific customer:
* `GET /v1/orders?filter[customer_id]=456789`
### Filter by order number
* `GET /v1/orders?filter[order_number_eq]=12345`
### Filter by fulfilled status
* `GET /v1/orders?filter[fulfilled_at_null]=true` (unfulfilled orders)
* `GET /v1/orders?filter[fulfilled_at_null]=false` (fulfilled orders)

## Advanced Filtering Examples
### Range queries
* `GET /v1/orders?filter[site_id]=123&filter[created_at_gteq]=2024-01-01&filter[created_at_lteq]=2024-12-31`
* `GET /v1/orders?filter[site_id]=123&filter[total_price_in_cents_gt]=5000`
### Pattern matching
* `GET /v1/orders?filter[site_id]=123&filter[order_number_cont]=2024`
* `GET /v1/orders?filter[site_id]=123&filter[currency_code_start]=US`
### Array filters
* `GET /v1/orders?filter[site_id]=123&filter[currency_code_in]=USD,EUR,GBP`




## OpenAPI

````yaml /openapi.yaml get /v1/orders
openapi: 3.1.1
info:
  title: Kajabi API V1
  version: 1.0.1
  description: >
    ## Public API

    * Server URL `https://api.kajabi.com`

    * Endpoint paths are prefixed with `/v1`

    * Version endpoint `GET https://api.kajabi.com/v1/version`

    * See the [Developers Site](https://developers.kajabi.com) for documentation
    and examples.

    * Try the demo [Postman
    collection](https://www.postman.com/kajabi-apis/beta-public-api-demo/collection/fg4iyaz/kajabi-public-api-v1)

    ## API Keys

    * Your API `client_id` and `client_secret` are available on the [User API
    Keys](https://app.kajabi.com/admin/settings/security) section of the Kajabi
    Admin Portal.
      * Custom API Keys can be created with specific permissions.
      * Click the "Create User API Key" button, enter a name (e.g. "My project"), select the user and permissions, and click "Create".
      * For security purposes, you may "Delete" or "Rotate" the api credentials at any time; which will invalidate any access tokens granted with the credentials.
    ## Video Walkthroughs

    *
    [Capabilities](https://drive.google.com/file/d/1Puc9B2sSdA-RQb7YMxmUXg4FVoEXytoc/view?usp=sharing)

    * [Getting
    Started](https://drive.google.com/file/d/1hbGRShkxven_QMWvgYrerHKURbcZrnvJ/view?usp=sharing)

    * [Error
    Examples](https://drive.google.com/file/d/1i0wQK71I1jpaZVsxYwsn62gVj40S_E7Y/view?usp=sharing)

    * [External Contact
    Form](https://drive.google.com/file/d/1HqpULXvan5TOK3LvM7nILCuCkCaX0kFT/view?usp=sharing)
  contact:
    email: support@kajabi.com
    name: Support
    url: >-
      https://help.kajabi.com/hc/en-us/articles/4404549690523-How-to-Get-Help-From-Kajabi-Live-Agents
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.kajabi.com
    description: Production
security: []
paths:
  /v1/orders:
    get:
      tags:
        - Orders
      summary: List orders
      description: >
        Orders for a site

        ## Pagination

        Use `page[number]` and `page[size]` parameters to paginate results:

        ### Get first page of 10 items

        * `GET /v1/orders?page[number]=1&page[size]=10`

        ### Get second page of 25 items

        * `GET /v1/orders?page[number]=2&page[size]=25`


        The response includes pagination links and meta data:

        ```json

        {
          "links": {
            "self": "https://api.kajabi.com/v1/orders?page[number]=2&page[size]=10",
            "first": "https://api.kajabi.com/v1/orders?page[number]=1&page[size]=10",
            "prev": "https://api.kajabi.com/v1/orders?page[number]=1&page[size]=10",
            "next": "https://api.kajabi.com/v1/orders?page[number]=3&page[size]=10",
            "last": "https://api.kajabi.com/v1/orders?page[number]=5&page[size]=10"
          },
          "meta": {
            "total_pages": 5,
            "total_count": 50,
            "current_page": 2
          }
        }

        ```

        ## Sorting

        Use the `sort` parameter to sort the results:

        ### Sort by order_number in ascending order

        * `GET /v1/orders?sort=order_number`

        ### Sort by created_at in descending order

        * `GET /v1/orders?sort=-created_at`


        ## Filtering

        Use filter parameters to narrow down results:

        ### Filter by site

        Use the `filter[site_id]` parameter to get orders for a specific site:

        * `GET /v1/orders?filter[site_id]=123`

        ### Filter by customer

        Use the `filter[customer_id]` parameter to get orders for a specific
        customer:

        * `GET /v1/orders?filter[customer_id]=456789`

        ### Filter by order number

        * `GET /v1/orders?filter[order_number_eq]=12345`

        ### Filter by fulfilled status

        * `GET /v1/orders?filter[fulfilled_at_null]=true` (unfulfilled orders)

        * `GET /v1/orders?filter[fulfilled_at_null]=false` (fulfilled orders)


        ## Advanced Filtering Examples

        ### Range queries

        * `GET
        /v1/orders?filter[site_id]=123&filter[created_at_gteq]=2024-01-01&filter[created_at_lteq]=2024-12-31`

        * `GET
        /v1/orders?filter[site_id]=123&filter[total_price_in_cents_gt]=5000`

        ### Pattern matching

        * `GET /v1/orders?filter[site_id]=123&filter[order_number_cont]=2024`

        * `GET /v1/orders?filter[site_id]=123&filter[currency_code_start]=US`

        ### Array filters

        * `GET
        /v1/orders?filter[site_id]=123&filter[currency_code_in]=USD,EUR,GBP`
      parameters:
        - name: sort
          in: query
          required: false
          description: >-
            Sort order, use: order_number, created_at, fulfilled_at. For
            descending order use '-' e.g. &sort=-created_at
          schema:
            type: string
        - name: page[number]
          in: query
          required: false
          schema:
            type: integer
        - name: page[size]
          in: query
          required: false
          description: Number of documents
          schema:
            type: integer
        - name: fields[orders]
          in: query
          required: false
          description: >-
            Partial attributes as specified, e.g.
            fields[orders]=order_number,total_price_in_cents
          schema:
            type: string
        - name: filter[site_id]
          in: query
          required: false
          description: Filter by site_id, for example ?filter[site_id]=111
          schema:
            type: string
        - name: filter[customer_id]
          in: query
          required: false
          description: Filter by customer_id, for example ?filter[customer_id]=456789
          schema:
            type: string
        - name: filter[order_number_eq]
          in: query
          required: false
          description: Filter by order number, for example ?filter[order_number_eq]=12345
          schema:
            type: string
        - name: filter[fulfilled_at_null]
          in: query
          required: false
          description: >-
            Filter by fulfillment status, for example
            ?filter[fulfilled_at_null]=true
          schema:
            type: boolean
      responses:
        '200':
          description: Success, list of orders which the current user may access
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/orders_index_response'
        '401':
          description: Unauthorized, Authorization header is missing or invalid
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_unauthorized'
        '403':
          description: Forbidden, insufficient permission to access the resource
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_forbidden'
      security:
        - Bearer: []
components:
  schemas:
    orders_index_response:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
                enum:
                  - orders
              attributes:
                $ref: '#/components/schemas/orders_attributes'
              relationships:
                type: object
                properties:
                  site:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/resource_identifier'
                  customer:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/resource_identifier'
                  order_items:
                    type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/resource_identifiers'
        links:
          type: object
          properties:
            self:
              type: string
            current:
              type: string
    errors_unauthorized:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
    errors_forbidden:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
    orders_attributes:
      type: object
      properties:
        order_number:
          type: integer
        currency_code:
          type: string
        fulfilled_at:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: ISO 8601 date-time, read only
        total_price_in_cents:
          type: integer
        subtotal_in_cents:
          type: integer
        sales_tax_amount_in_cents:
          type: integer
        discount_amount_in_cents:
          type: integer
        formatted_total_price:
          type: string
        formatted_subtotal:
          type: string
        currency_symbol:
          type: string
    resource_identifier:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
      required:
        - id
        - type
    resource_identifiers:
      type: array
      items:
        $ref: '#/components/schemas/resource_identifier'
    errors_attributes:
      type: object
      properties:
        status:
          type: string
        source:
          type: object
          nullable: true
          properties:
            pointer:
              type: string
        title:
          type: string
        detail:
          type: string
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````