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

# List orders

> Get a list of all of your orders

This endpoint is paginated and supports cursor based pagination. Each response includes a `next_cursor` and `previous_cursor` which can be used to fetch the next and previous pages of results.

The orders returned only contain a subset of the fields that are returned for a single order. To fetch the full details of an order use the [single order get endpoint](/reference/2024-02-05/endpoint/orders/get).

This endpoint can return both complete and incomplete orders. The types of these responses differ, you should use the `status` field to determine which type of response you are receiving.

* Completed orders will have a `status` of `COMPLETED` or `FAILED` and have a full response body.
* Incomplete orders will have a `status` of `PROCESSING` and have a partial response body.


## OpenAPI

````yaml reference/2024-02-05/openapi.json GET /order
openapi: 3.1.1
info:
  title: Runa
  version: '2.0'
  description: The public Runa API
  license:
    name: Ⓒ Runa
    url: https://runa.io/terms-of-use
  contact:
    name: Runa
    url: https://runa.io
    email: info@runa.io
servers:
  - url: https://playground.runa.io/v2
    description: Playground
  - url: https://api.runa.io/v2
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: utility
    description: Utility endpoints.
  - name: balance
    description: Operations related to account balance.
  - name: products
    description: Operations related to products.
  - name: orders
    description: Operations related to ordering and orders.
externalDocs:
  url: https://developer.runa.com/reference
  description: Runa API Reference
paths:
  /order:
    get:
      tags:
        - orders
      summary: List orders
      description: Get a list of all of your orders
      operationId: getListOfOrders
      parameters:
        - $ref: '#/components/parameters/X-Api-Version'
        - required: false
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 100
          in: query
          description: >-
            The number (1&ndash;500) of orders to include in each page of
            orders. Default: 100.
        - $ref: '#/components/parameters/BeforeCursor'
        - $ref: '#/components/parameters/AfterCursor'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                  - pagination
                properties:
                  items:
                    title: Items
                    description: The list of orders in the page.
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/CompletedOrderWithBasicDetails'
                        - $ref: '#/components/schemas/IncompleteOrder'
                  pagination:
                    title: Pagination
                    description: Metadata of the result page.
                    allOf:
                      - $ref: '#/components/schemas/PageableMeta'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    X-Api-Version:
      name: X-Api-Version
      description: >-
        The dated version of the API, if not specified a default is used. See
        [API versioning](/best-practices/api-versioning) for more information.
      in: header
      required: false
      schema:
        type: string
    BeforeCursor:
      name: before
      description: >-
        A cursor for use in pagination to return the previous set of results.
        The before and after cursors are mutually exclusive (you can't use them
        at the same time). You can get a value from the
        `pagination.cursors.before` field in the response. See
        [pagination](/reference/pagination) for more information.
      in: query
      schema:
        type: string
        example: A-123
    AfterCursor:
      name: after
      description: >-
        A cursor for use in pagination to return the next set of results. The
        before and after cursors are mutually exclusive (you can't use them at
        the same time). You can get a value from the `pagination.cursors.after`
        field in the response. See [pagination](/reference/pagination) for more
        information.
      in: query
      schema:
        type: string
        example: A-789
  schemas:
    CompletedOrderWithBasicDetails:
      title: Completed order
      description: >-
        Used for orders that have completed. This class is typically used when
        returning a *list* of orders to the client.
      required:
        - id
        - status
        - created_at
        - payment_method
        - currency
        - total_price
        - total_discount
      type: object
      properties:
        id:
          $ref: '#/components/schemas/OrderId'
        status:
          $ref: '#/components/schemas/OrderStatus'
        created_at:
          title: Created At
          description: UTC timestamp, in ISO 8601 format, when the order was submitted.
          type: string
          format: date-time
        completed_at:
          title: Completed At
          description: UTC timestamp, in ISO 8601 format, when the order was completed.
          type: string
          format: date-time
        description:
          $ref: '#/components/schemas/OrderDescription'
        payment_method:
          title: Payment Method
          description: The payment method used for the order.
          allOf:
            - $ref: '#/components/schemas/AccountPayment'
        currency:
          title: Currency
          example: USD
          type: string
          pattern: ^[A-Z]{3}$
          description: >-
            The currency of the order, represented by ISO 4217 currency codes.
            Please check the currency section in the guidelines for how to use
            this field.
        total_price:
          title: Total Price
          description: The total price of the order. This _includes_ any applicable fees.
          example: '10'
          type: string
        total_discount:
          title: Total Discount
          description: The total discount of the order.
          type: string
          example: '1'
    IncompleteOrder:
      title: Incomplete order
      required:
        - id
        - status
        - message
      type: object
      properties:
        id:
          $ref: '#/components/schemas/OrderId'
        status:
          $ref: '#/components/schemas/OrderStatus'
        message:
          title: Message
          description: Human readable message describing the status of the order.
          type: string
      description: Order that has been accepted but is not complete.
    PageableMeta:
      title: PageableMeta
      required:
        - cursors
        - page
      type: object
      description: >-
        Information about the page of results returned. See
        [pagination](/reference/pagination) for more information on how to page
        through results.
      properties:
        cursors:
          title: Cursors
          description: >-
            Pagination cursors, use the `after` cursor to page forward and the
            `before` cursor to page backward.
          allOf:
            - $ref: '#/components/schemas/PageCursors'
        page:
          title: Page
          description: Extra information about the current page.
          allOf:
            - $ref: '#/components/schemas/Page'
    OrderId:
      title: Order ID
      description: The ID of the order.
      type: string
      example: O-01H5WQGHKCBB85MQFM68S9KJ5Q
    OrderStatus:
      title: Order Status
      description: Status of the order.
      allOf:
        - $ref: '#/components/schemas/OrderStatusEnum'
      example: PROCESSING
    OrderDescription:
      title: Description
      description: >-
        Free format text reference for the order. The order description will not
        be visible to the end user. You will see this description in the Runa
        web portal.


        This field is optional and can be omitted if not needed.

        If not provided, the field will be set to `null` in the response.
      type: string
      nullable: true
      maxLength: 128
      example: Your own reference text
    AccountPayment:
      title: AccountPayment
      required:
        - type
      type: object
      properties:
        type:
          description: Account balance payment.
          allOf:
            - $ref: '#/components/schemas/AccountPaymentType'
        currency:
          $ref: '#/components/schemas/CurrencyForAccount'
      description: Account balance payment.
    PageCursors:
      title: PageCursors
      type: object
      properties:
        after:
          title: After
          description: Cursor to query the next page.
          example: A-789
          type: string
        before:
          title: Before
          description: Cursor to query the previous page.
          example: A-123
          type: string
    Page:
      title: Page
      type: object
      properties:
        limit:
          title: Limit
          description: How many records the current page is limited to.
          example: 100
          type: integer
    APIErrorResponse:
      title: APIErrorResponse
      required:
        - type
        - message
      type: object
      properties:
        type:
          title: Type
          description: An error code or type.
          type: string
          example: not-found
        message:
          title: Message
          description: A human readable summary of the error.
          type: string
          example: The requested resource was not found
        help:
          title: Help
          description: Additional information that pertains to the error.
          type: string
          example: Please check the resource ID and try again.
      description: Generic Runa API error response.
    OrderStatusEnum:
      title: OrderStatusEnum
      type: string
      enum:
        - COMPLETED
        - FAILED
        - PROCESSING
      description: The status of the order.
    AccountPaymentType:
      title: AccountPaymentType
      type: string
      enum:
        - ACCOUNT_BALANCE
      description: Account balance payment.
    CurrencyForAccount:
      type: string
      pattern: ^[A-Z]{3}$
      description: >-
        The currency of the account, represented by ISO 4217 currency codes.
        Check the [currencies](/reference/currencies) for a listing of supported
        currencies.
      example: USD
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Your API key. See the [API key](/getting-started/api-key) page on
        details of how to generate and store your keys.

````