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

# Get order details

> Get the details and status of a specific order. Can be used for checking the status of an async order after it's been accepted.

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/{id}
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/{id}:
    get:
      tags:
        - orders
      summary: Get order details
      description: >-
        Get the details and status of a specific order. Can be used for checking
        the status of an async order after it's been accepted.
      operationId: getSingleOrder
      parameters:
        - $ref: '#/components/parameters/X-Api-Version'
        - required: true
          name: id
          schema:
            type: string
          in: path
          description: The ID of the order.
          example: O-01H5WQGHKCBB85MQFM68S9KJ5Q
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CompletedOrderWithFullDetails'
                  - $ref: '#/components/schemas/IncompleteOrder'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '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
  schemas:
    CompletedOrderWithFullDetails:
      title: Completed order
      description: >-
        Used for an order that has completed. This class is typically used when
        returning a *single order* to the client.
      type: object
      allOf:
        - $ref: '#/components/schemas/CompletedOrderWithBasicDetails'
        - required:
            - id
            - status
            - created_at
            - payment_method
            - currency
            - total_price
            - total_discount
            - items
          properties:
            items:
              title: Items
              description: >-
                The list of items that were included in the order. Each _item_
                represents a single payout link.
              type: array
              items:
                $ref: '#/components/schemas/CompletedOrderItem'
            transaction_detail:
              $ref: '#/components/schemas/TransactionDetail'
            metadata:
              $ref: '#/components/schemas/OrderMetadata'
    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.
    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'
    CompletedOrderItem:
      title: CompletedOrderItem
      type: object
      properties:
        id:
          title: ID
          description: The ID of the order item.
          example: E-NWPEKW4VL
          type: string
        distribution_method:
          title: Distribution Method
          description: The distribution method used for the payout link.
          oneOf:
            - $ref: '#/components/schemas/EmailDistribution'
            - $ref: '#/components/schemas/LinkDistribution'
            - $ref: '#/components/schemas/RecipientDistribution'
        products:
          title: Products
          description: The product(s) the end user can redeem the payout link on.
          oneOf:
            - $ref: '#/components/schemas/MultipleProduct'
            - $ref: '#/components/schemas/SingleProductWithUsageConfig'
            - $ref: '#/components/schemas/PayoutSelectionTemplateDetailed'
            - $ref: '#/components/schemas/UnknownProduct'
        face_value:
          title: Face Value
          description: The face value of the payout link.
          example: '10'
          type: string
        price:
          title: Price
          description: The price paid for the payout link.
          example: '10'
          type: string
        payout:
          title: Payout
          description: Payout link details
          allOf:
            - $ref: '#/components/schemas/PayoutDetails'
        currency:
          title: Currency
          description: >-
            The currency of the payout link, represented by ISO 4217 currency
            codes.
          type: string
          pattern: ^[A-Z]{3}$
          example: USD
      required:
        - id
        - distribution_method
        - products
        - face_value
        - price
        - payout
    TransactionDetail:
      title: TransactionDetail
      description: >-
        A mapping of the subtotal of the order using the payout currency as a
        key.
      type: object
      example:
        USD:
          value: '10.00'
          fx: null
      additionalProperties:
        $ref: '#/components/schemas/TransactionDetailEntry'
    OrderMetadata:
      title: Metadata
      description: >-
        A flexible field for you to attach additional, customer-specific data to
        the order. This is for your internal use, the information stored here
        will not be exposed to the end user.

        - All keys and their corresponding values must be strings

        - Each order supports up to 20 key-value pairs

        - Keys have a maximum length of 40 characters

        - Values can be up to 200 characters long.


        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: object
      nullable: true
      maxProperties: 20
      propertyNames:
        type: string
        maxLength: 40
      additionalProperties:
        type: string
        maxLength: 200
      example:
        internal_id: '12345'
        department: marketing
        campaign: summer_2024
    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
    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.
    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.
    EmailDistribution:
      title: Email
      required:
        - type
        - email_address
      type: object
      properties:
        type:
          $ref: '#/components/schemas/EmailDistributionType'
        email_address:
          $ref: '#/components/schemas/DistributionEmailAddress'
        template_id:
          $ref: '#/components/schemas/RedemptionTemplateId'
      description: >-
        Email distribution. Send the payout link to the end user directly via
        email.
    LinkDistribution:
      title: Link
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/LinkDistributionType'
        template_id:
          $ref: '#/components/schemas/RedemptionTemplateId'
      description: Link distribution. Send the payout link to the end user yourself.
    RecipientDistribution:
      title: Recipient
      description: >-
        Recipient distribution. Currently this method is only supported for
        distributing payment type products. For subsequent orders to known
        recipients we will attempt to make a repeat payout.
      summary: Send the payout link to a known recipient
      required:
        - type
        - recipient_reference
        - email_address
      type: object
      properties:
        type:
          $ref: '#/components/schemas/RecipientDistributionType'
        recipient_reference:
          title: Recipient Reference
          description: >-
            A customer provided reference to identify an individual recipient.
            It must be unique per recipient. When the same reference is used for
            a second order this will trigger a repeat payout. This is a
            free-form string limited to 255 characters. It can only contain
            alphanumeric characters, dashes, underscores, dots, and at-signs.
          example: abc123
          type: string
          maxLength: 255
          pattern: ^[A-Za-z0-9-_@.]+$
        email_address:
          $ref: '#/components/schemas/DistributionEmailAddress'
        template_id:
          $ref: '#/components/schemas/RedemptionTemplateId'
    MultipleProduct:
      title: Multiple
      required:
        - type
        - values
      type: object
      properties:
        type:
          $ref: '#/components/schemas/MultipleProductType'
        values:
          title: Values
          description: >-
            The codes for the products the end user can choose from when
            redeeming their payout link. All products _must_ use the same
            currency.
          example:
            - AMZ-US
            - AIRBNB-US
          minItems: 2
          type: array
          items:
            type: string
          uniqueItems: true
      description: >-
        Multiple products. The end user will be able to split the payout link's
        value between these products.
    SingleProductWithUsageConfig:
      title: Single
      required:
        - type
        - value
      type: object
      example:
        type: SINGLE
        value: AMZ-US
      properties:
        type:
          $ref: '#/components/schemas/SingleProductType'
        value:
          title: Value
          description: >-
            The code for the product the end user will get when redeeming their
            payout link.
          minLength: 1
          example: AMZ-US
          type: string
        usage_config:
          description: >-
            Optional. **Only applicable to prepaid Visa cards.** Attaches an
            MCC-rules template to the issued card. Ignored for all other
            products. See [Card spend
            controls](/features/prepaid-visa/spend-controls) for a worked
            example. When set on a prepaid Visa card order, it is returned in
            the order details.
          allOf:
            - $ref: '#/components/schemas/UsageConfig'
      description: >-
        Single product. The end user will be able to redeem the payout link for
        this specific product.
    PayoutSelectionTemplateDetailed:
      title: Template
      required:
        - type
        - template_id
      type: object
      properties:
        type:
          $ref: '#/components/schemas/PayoutSelectionTemplateType'
        template_id:
          $ref: '#/components/schemas/PayoutSelectionTemplateId'
        values:
          title: Values
          description: The codes for products selected for Payout Selection Template.
          example:
            - AMZ-US
            - AIRBNB-US
          minItems: 2
          type: array
          items:
            type: string
          uniqueItems: true
      description: Payout selection template. Template having predefined set of products.
    UnknownProduct:
      title: Unknown
      type: object
      description: >-
        Product(s) unknown. It was not possible to determine which products were
        included in the order.
      required:
        - type
      properties:
        type:
          title: Type
          description: >-
            It is not currently possible to determine which products were
            selected when this item was ordered.
          default: UNKNOWN
          type: string
          enum:
            - UNKNOWN
    PayoutDetails:
      title: PayoutDetails
      type: object
      properties:
        status:
          $ref: '#/components/schemas/PayoutStatus'
        status_updated_at:
          title: Status Updated At
          description: Time that the payout link status was last updated
          type: string
          format: date-time
        url:
          title: Url
          description: The URL (payout link) the end user uses to redeem.
          type: string
        expiry_date:
          title: Expiry Date
          description: >-
            When the payout link expires. This is the expiry of the payout link
            itself, not the underlying gift card or product.


            If your account does not have expiry of links enabled this field
            will be set to `null`, the link does not expire.
          type: string
          format: date-time
      required:
        - status
        - status_updated_at
        - url
    TransactionDetailEntry:
      type: object
      title: TransactionDetailEntry
      description: >-
        A subtotal of the value purchased and associated fees and data about the
        transaction.
      properties:
        value:
          title: Value
          description: The total value purchased of a payout link currency.
          type: string
          example: '10.00'
        fx:
          $ref: '#/components/schemas/TransactionDetailFXDetails'
      required:
        - value
    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
    EmailDistributionType:
      title: EmailDistributionType
      type: string
      enum:
        - EMAIL
      description: Supported email distribution types.
    DistributionEmailAddress:
      title: Email Address
      description: The email address of the end user to send the payout link to.
      example: fred@example.com
      type: string
      format: email
    RedemptionTemplateId:
      title: Template ID
      description: The template ID for a User Redemption Template.
      example: DT-01HPSF51G0ZWHJ3JTNWRH0WDYK
      type: string
    LinkDistributionType:
      title: LinkDistributionType
      type: string
      enum:
        - PAYOUT_LINK
      description: Supported link distribution types.
    RecipientDistributionType:
      title: RecipientDistributionType
      type: string
      enum:
        - RECIPIENT
      description: Supported recipient distribution types.
    MultipleProductType:
      title: MultipleProductType
      type: string
      enum:
        - MULTIPLE
      description: Multiple products. When more than one product code is provided.
    SingleProductType:
      title: SingleProductType
      type: string
      enum:
        - SINGLE
      description: Single product. When only one product code is provided.
    UsageConfig:
      title: UsageConfig
      type: object
      description: >-
        Additional configuration applied to the issued product. Only applicable
        to prepaid Visa cards.
      properties:
        spend_rules_template_id:
          title: MCC rules template ID
          description: >-
            Identifier of a Runa-authored MCC-rules template applied to the
            issued card.


            Only applicable to prepaid Visa cards. A single template is applied
            per card, with multiple rules that either allows or blocks
            transactions for a given merchant category bundled inside that one
            template.
          type: string
          pattern: ^PSR-[0-9A-HJKMNP-TV-Z]{26}$
          example: PSR-XXXXXXXXXXXXXXXXXXXXXXXXXX
    PayoutSelectionTemplateType:
      title: PayoutSelectionTemplateType
      type: string
      enum:
        - TEMPLATE
      description: Payout Selection Template
    PayoutSelectionTemplateId:
      title: Template ID
      description: The template ID for a Payout Selection Template.
      example: PT-01HPSF51G0ZWHJ3JTNWRH0WDYK
      type: string
    PayoutStatus:
      title: Payout status
      description: >-
        Current status of the payout link. An `ACTIVE` link is live but has not
        been claimed yet, it will change to `CLAIMED` once that has happened. If
        you request a cancellation the status will reflect this as `CANCELLED`.
        Finally, if your account is configured with link expiry, when the link
        itself expires it will be marked as `EXPIRED` — this is independent of
        the underlying product's own expiry policy.
      enum:
        - ACTIVE
        - CLAIMED
        - CANCELLED
        - EXPIRED
    TransactionDetailFXDetails:
      type: object
      title: TransactionDetailFxDetails
      description: >-
        Provides details on fx conversion for an order transaction detail.
        Present when the payment method currency is different from the
        transaction detail currency.
      properties:
        rate:
          title: FX Rate
          description: >-
            The FX rate received for the transaction between the payout currency
            and payment currency.
          type: string
          example: '1.234'
        rate_symbol:
          title: FX Rate symbol
          description: The currency pair associated with the FX transaction.
          type: string
          example: GBPUSD
        fee:
          title: Fee
          description: The fee charged for making this transaction.
          type: object
          properties:
            value:
              title: Value
              description: The value of the fee.
              type: string
              example: '0.00'
            currency:
              title: Currency
              description: The currency of the fee.
              type: string
              example: USD
          required:
            - value
            - currency
      required:
        - rate
        - rate_symbol
        - fee
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
    NotFound:
      description: Not found
      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.

````