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

# Get order

> Retrieve an order by id.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/checkout-intents/openapi.documented.yml get /api/v1/orders/{id}
openapi: 3.0.0
info:
  title: Universal Checkout API
  version: 1.0.5
  description: >-
    Turn any product URL into a completed checkout. Instantly retrieve price,
    tax, and shipping for any product, and let users buy without ever leaving
    your native AI experience.


    View the [Rye API docs](https://docs.rye.com).
  termsOfService: https://rye.com/terms-of-service
  license:
    name: UNLICENSED
  contact:
    name: Rye
    email: dev@rye.com
    url: https://docs.rye.com
servers:
  - url: https://staging.api.rye.com
security: []
paths:
  /api/v1/orders/{id}:
    get:
      tags:
        - Orders
      summary: Get order
      description: Retrieve an order by id.
      operationId: GetOrder
      parameters:
        - description: The order id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
        - bearerAuth:
            - checkout_intents:read
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import CheckoutIntents from 'checkout-intents';

            const client = new CheckoutIntents({
              apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
            });

            const order = await client.orders.retrieve('id');

            console.log(order.id);
        - lang: Python
          source: |-
            import os
            from checkout_intents import CheckoutIntents

            client = CheckoutIntents(
                api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"),  # This is the default and can be omitted
            )
            order = client.orders.retrieve(
                "id",
            )
            print(order.id)
        - lang: Java
          source: |-
            package com.rye.example;

            import com.rye.client.CheckoutIntentsClient;
            import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
            import com.rye.models.orders.Order;
            import com.rye.models.orders.OrderRetrieveParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();

                    Order order = client.orders().retrieve("id");
                }
            }
        - lang: cURL
          source: |-
            curl https://staging.api.rye.com/api/v1/orders/$ID \
                -H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"
components:
  schemas:
    OrderResponse:
      description: >-
        Represents a completed order. Orders are created after a checkout intent
        reaches

        the `completed` state.
      properties:
        id:
          type: string
        checkoutIntentId:
          type: string
          description: >-
            ID of the checkout intent that was responsible for creating this
            order.
          example: ci_aaa8af5c5aae4c0e8ef0172c26c65c13
        createdAt:
          type: string
          description: Timestamp the order was persisted to Rye.
          example: '2026-03-25T00:00:00Z'
        updatedAt:
          type: string
          description: Timestamp the order was last updated at
          example: '2026-03-27T00:00:00Z'
        referenceId:
          type: string
          description: >-
            The `referenceId` you supplied on the checkout intent, echoed back
            so you

            can reconcile this order against your own records. Absent when none
            was

            supplied.
          example: order-1234
        cancellation:
          allOf:
            - $ref: '#/components/schemas/Cancellation'
          nullable: true
          description: >-
            The cancellation for this order, or `null` if none has been
            requested.

            Populated by joining the separate cancellations collection on the
            order's

            marketplace order id.
      required:
        - id
        - checkoutIntentId
        - createdAt
        - updatedAt
        - cancellation
      type: object
      additionalProperties: false
    AuthenticationError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    NotFoundError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
      required:
        - name
        - message
      type: object
      additionalProperties: false
    Cancellation:
      anyOf:
        - $ref: '#/components/schemas/RequestedCancellation'
        - $ref: '#/components/schemas/CompletedCancellation'
        - $ref: '#/components/schemas/DeniedCancellation'
    RequestedCancellation:
      allOf:
        - $ref: '#/components/schemas/BaseCancellation'
        - properties:
            state:
              type: string
              enum:
                - requested
              nullable: false
          required:
            - state
          type: object
    CompletedCancellation:
      allOf:
        - $ref: '#/components/schemas/BaseCancellation'
        - properties:
            state:
              type: string
              enum:
                - completed
              nullable: false
          required:
            - state
          type: object
    DeniedCancellation:
      allOf:
        - $ref: '#/components/schemas/BaseCancellation'
        - properties:
            denialReason:
              $ref: '#/components/schemas/CancellationDenialReason'
            state:
              type: string
              enum:
                - denied
              nullable: false
          required:
            - denialReason
            - state
          type: object
    BaseCancellation:
      properties:
        reason:
          $ref: '#/components/schemas/CancellationReason'
        marketplaceOrderId:
          type: string
        checkoutIntentId:
          type: string
        createdAt:
          type: string
          format: date-time
        id:
          type: string
      required:
        - reason
        - marketplaceOrderId
        - checkoutIntentId
        - createdAt
        - id
      type: object
    CancellationDenialReason:
      properties:
        code:
          $ref: '#/components/schemas/CancellationDenialReasonCode'
        message:
          type: string
      required:
        - code
        - message
      type: object
    CancellationReason:
      properties:
        message:
          type: string
          description: >-
            Optional free-text note explaining the cancellation, forwarded to
            the

            merchant when possible.
          maxLength: 256
        code:
          $ref: '#/components/schemas/CancellationReasonCode'
      required:
        - code
      type: object
    CancellationDenialReasonCode:
      type: string
      enum:
        - other
        - already_shipped
        - non_cancellable_item
        - cancellation_window_expired
    CancellationReasonCode:
      type: string
      enum:
        - requested_by_customer
        - fraud
        - inventory
        - payment_issue
        - staff_error
        - other
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Rye API key

````