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

# List shipments

> Retrieve a paginated list of shipments

Enables developers to query shipments associated with their account, with filters and cursor-based pagination.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/checkout-intents/openapi.documented.yml get /api/v1/shipments
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/shipments:
    get:
      tags:
        - Shipments
      summary: List shipments
      description: >-
        Retrieve a paginated list of shipments


        Enables developers to query shipments associated with their account,
        with filters and cursor-based pagination.
      operationId: ListShipments
      parameters:
        - description: Maximum number of results to return (default 100)
          in: query
          name: limit
          required: false
          schema:
            format: int32
            type: integer
            minimum: 1
            maximum: 100
          example: 20
        - in: query
          name: after
          required: false
          schema:
            type: string
        - in: query
          name: before
          required: false
          schema:
            type: string
        - in: query
          name: ids
          required: false
          schema:
            default: []
            type: array
            items:
              type: string
        - in: query
          name: status
          required: false
          schema:
            default: []
            type: array
            items:
              $ref: '#/components/schemas/ShipmentStatus'
      responses:
        '200':
          description: Paginated shipments response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShipmentsListResponse'
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateError'
      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
            });

            // Automatically fetches more pages as needed.
            for await (const shipment of client.shipments.list()) {
              console.log(shipment);
            }
        - 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
            )
            page = client.shipments.list()
            page = page.data[0]
            print(page)
        - lang: Java
          source: |-
            package com.rye.example;

            import com.rye.client.CheckoutIntentsClient;
            import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
            import com.rye.models.shipments.ShipmentListPage;
            import com.rye.models.shipments.ShipmentListParams;

            public final class Main {
                private Main() {}

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

                    ShipmentListPage page = client.shipments().list();
                }
            }
        - lang: cURL
          source: |-
            curl https://staging.api.rye.com/api/v1/shipments \
                -H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"
components:
  schemas:
    ShipmentStatus:
      type: string
      enum:
        - out_for_delivery
        - delivered
        - shipped
        - canceled
        - delayed
        - ordered
    ShipmentsListResponse:
      properties:
        pageInfo:
          properties:
            endCursor:
              type: string
            startCursor:
              type: string
            hasPreviousPage:
              type: boolean
            hasNextPage:
              type: boolean
          required:
            - hasPreviousPage
            - hasNextPage
          type: object
        data:
          items:
            $ref: '#/components/schemas/Shipment'
          type: array
      required:
        - pageInfo
        - data
      type: object
    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
    ValidateError:
      properties:
        name:
          type: string
        message:
          type: string
        stack:
          type: string
        status:
          type: number
          format: double
        fields:
          $ref: '#/components/schemas/FieldErrors'
      required:
        - name
        - message
        - status
        - fields
      type: object
      additionalProperties: false
    Shipment:
      $ref: '#/components/schemas/ShipmentUnion'
    FieldErrors:
      properties: {}
      type: object
      additionalProperties:
        properties:
          value: {}
          message:
            type: string
        required:
          - message
        type: object
    ShipmentUnion:
      anyOf:
        - $ref: '#/components/schemas/ShipmentWithTrackingUnion'
        - $ref: '#/components/schemas/ShipmentWithoutTrackingUnion'
    ShipmentWithTrackingUnion:
      anyOf:
        - $ref: '#/components/schemas/ShippedShipment'
        - $ref: '#/components/schemas/DeliveredShipment'
        - $ref: '#/components/schemas/DelayedShipment'
        - $ref: '#/components/schemas/OutForDeliveryShipment'
      description: >-
        Shipments that have tracking information (shipped, delayed, or delivered
        states)
      title: With Tracking
    ShipmentWithoutTrackingUnion:
      anyOf:
        - $ref: '#/components/schemas/OrderedShipment'
        - $ref: '#/components/schemas/CanceledShipment'
      description: Shipments without tracking information
      title: Without Tracking
    ShippedShipment:
      $ref: '#/components/schemas/WithStatus_BaseShipmentWithTracking.shipped_'
      title: Shipped
    DeliveredShipment:
      allOf:
        - $ref: '#/components/schemas/WithStatus_BaseShipmentWithTracking.delivered_'
        - properties:
            deliveredAt:
              type: string
              format: date-time
          required:
            - deliveredAt
          type: object
      title: Delivered
    DelayedShipment:
      $ref: '#/components/schemas/WithStatus_BaseShipmentWithTracking.delayed_'
      title: Delayed
    OutForDeliveryShipment:
      $ref: >-
        #/components/schemas/WithStatus_BaseShipmentWithTracking.out_for_delivery_
      title: Out for Delivery
    OrderedShipment:
      $ref: '#/components/schemas/WithStatus_BaseShipment.ordered_'
      title: Ordered
    CanceledShipment:
      $ref: '#/components/schemas/WithStatus_BaseShipment.canceled_'
      title: Canceled
    WithStatus_BaseShipmentWithTracking.shipped_:
      allOf:
        - $ref: '#/components/schemas/BaseShipmentWithTracking'
        - properties:
            status:
              type: string
              enum:
                - shipped
              nullable: false
          required:
            - status
          type: object
    WithStatus_BaseShipmentWithTracking.delivered_:
      allOf:
        - $ref: '#/components/schemas/BaseShipmentWithTracking'
        - properties:
            status:
              type: string
              enum:
                - delivered
              nullable: false
          required:
            - status
          type: object
    WithStatus_BaseShipmentWithTracking.delayed_:
      allOf:
        - $ref: '#/components/schemas/BaseShipmentWithTracking'
        - properties:
            status:
              type: string
              enum:
                - delayed
              nullable: false
          required:
            - status
          type: object
    WithStatus_BaseShipmentWithTracking.out_for_delivery_:
      allOf:
        - $ref: '#/components/schemas/BaseShipmentWithTracking'
        - properties:
            status:
              type: string
              enum:
                - out_for_delivery
              nullable: false
          required:
            - status
          type: object
    WithStatus_BaseShipment.ordered_:
      allOf:
        - $ref: '#/components/schemas/BaseShipment'
        - properties:
            status:
              type: string
              enum:
                - ordered
              nullable: false
          required:
            - status
          type: object
    WithStatus_BaseShipment.canceled_:
      allOf:
        - $ref: '#/components/schemas/BaseShipment'
        - properties:
            status:
              type: string
              enum:
                - canceled
              nullable: false
          required:
            - status
          type: object
    BaseShipmentWithTracking:
      allOf:
        - $ref: '#/components/schemas/BaseShipment'
        - $ref: '#/components/schemas/ShippingDetails'
    BaseShipment:
      properties:
        updatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        marketplaceOrderId:
          type: string
        checkoutIntentId:
          type: string
        id:
          type: string
      required:
        - updatedAt
        - createdAt
        - marketplaceOrderId
        - checkoutIntentId
        - id
      type: object
    ShippingDetails:
      properties:
        trackingEvents:
          items:
            $ref: '#/components/schemas/TrackingEvent'
          type: array
        shippedAt:
          type: string
          format: date-time
        tracking:
          $ref: '#/components/schemas/ShipmentTracking'
        externalId:
          type: string
          description: >-
            The external ID is provided by the marketplace and matches the
            shipment to their system.
      required:
        - trackingEvents
        - shippedAt
        - tracking
        - externalId
      type: object
    TrackingEvent:
      properties:
        status:
          $ref: '#/components/schemas/ShipmentStatus'
        location:
          $ref: '#/components/schemas/EventLocation'
        timestamp:
          allOf:
            - $ref: '#/components/schemas/TrackingEventTimestamp'
          nullable: true
        description:
          type: string
          nullable: true
      required:
        - status
        - location
        - timestamp
        - description
      type: object
    ShipmentTracking:
      properties:
        carrierName:
          type: string
          nullable: true
        number:
          type: string
          nullable: true
        deliveryDate:
          allOf:
            - $ref: '#/components/schemas/DeliveryDate'
          nullable: true
        url:
          type: string
          nullable: true
      required:
        - number
      type: object
    EventLocation:
      properties:
        country:
          type: string
          nullable: true
        province:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
      type: object
    TrackingEventTimestamp:
      properties:
        local:
          type: string
          description: >-
            ISO 8601 string with timezone offset, e.g.
            "2025-02-05T17:02:00.000-05:00"
        utc:
          type: string
          format: date-time
          description: UTC timestamp
      required:
        - local
        - utc
      type: object
    DeliveryDate:
      properties:
        estimated:
          type: string
          format: date-time
      required:
        - estimated
      type: object
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Rye API key

````