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

# Retrieve an order batch



## OpenAPI

````yaml GET /v1/order_batches/{id}
openapi: 3.0.1
info:
  title: Goody API
  version: 1.0.0
  contact:
    name: Goody Support
    email: support@ongoody.com
servers:
  - url: https://api.ongoody.com
    description: Production
  - url: https://api.sandbox.ongoody.com
    description: Sandbox
security: []
paths:
  /v1/order_batches/{id}:
    get:
      tags:
        - Order Batches
      summary: Retrieve an order batch
      parameters:
        - name: id
          in: path
          description: Order batch ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Scheduled order batch retrieved
          content:
            application/json:
              examples:
                Order batch retrieved:
                  value:
                    id: dfd218b5-37f8-4069-a5c7-4f8bc48e5e8c
                    send_status: complete
                    from_name: Mazie
                    message: null
                    orders_count: 2
                    orders_preview:
                      - id: 57aaa9f5-0166-4177-8825-89ad8df75c9f
                        status: created
                        individual_gift_link: >-
                          https://gifts.ongoody.com/gift/ZP805XNFVVSWDMWJVZZCBXRE
                        recipient_first_name: Alena
                        recipient_last_name: Kenter
                        recipient_email: alena@ongoody.com
                        card_id: 8a876f42-af16-4482-9214-53ae2c321931
                        message: Test Message
                        thank_you_note: null
                        view_count_recipient: 0
                        is_swapped: false
                        order_batch_id: dfd218b5-37f8-4069-a5c7-4f8bc48e5e8c
                        expires_at: null
                        cart:
                          id: 19785b2a-74a5-4e93-a8bf-6ec87e27de3d
                          items:
                            - id: db87cd41-81bf-49f1-9bb3-16ea3015cc3c
                              quantity: 1
                              product:
                                id: 22f52b4c-acde-4891-aa63-02cf698a6af9
                                name: Cookies
                                brand:
                                  id: 00c260d8-6378-4475-928c-ca2da7be08c1
                                  name: Cookie Company
                        shipments: []
                        amounts:
                          amount_product: 2000
                          amount_shipping: 500
                          amount_processing_fee: 0
                          amount_pre_tax_total: 2500
                          amount_tax: null
                          amount_total: null
                          amount_global_relay_cost: null
                        sender:
                          first_name: Test
                          last_name: User
                          email: 15556954782@test.ongoody.com
                        workspace_id: 47a907e7-d145-483d-9c4a-fb0e9a7363fa
                        workspace_name: Test Team
                        original_cart: null
                        original_amounts: null
                        reference_id: AWIFURRCYGWDENFMTG76TBME
                        payment_link: null
                      - id: 1e103420-c7fe-408e-9694-3be6bdd5e9a3
                        status: created
                        individual_gift_link: >-
                          https://gifts.ongoody.com/gift/XKUPBQEKN4F9WMGYJN7AINOX
                        recipient_first_name: Michael
                        recipient_last_name: Franci
                        recipient_email: michael@ongoody.com
                        card_id: 8a876f42-af16-4482-9214-53ae2c321931
                        message: Test Message
                        thank_you_note: null
                        view_count_recipient: 0
                        is_swapped: false
                        order_batch_id: dfd218b5-37f8-4069-a5c7-4f8bc48e5e8c
                        expires_at: null
                        cart:
                          id: 19785b2a-74a5-4e93-a8bf-6ec87e27de3d
                          items:
                            - id: db87cd41-81bf-49f1-9bb3-16ea3015cc3c
                              quantity: 1
                              product:
                                id: 22f52b4c-acde-4891-aa63-02cf698a6af9
                                name: Cookies
                                brand:
                                  id: 00c260d8-6378-4475-928c-ca2da7be08c1
                                  name: Cookie Company
                        shipments: []
                        amounts:
                          amount_product: 2000
                          amount_shipping: 500
                          amount_processing_fee: 0
                          amount_pre_tax_total: 2500
                          amount_tax: null
                          amount_total: null
                          amount_global_relay_cost: null
                        sender:
                          first_name: Test
                          last_name: User
                          email: 15556954782@test.ongoody.com
                        workspace_id: 47a907e7-d145-483d-9c4a-fb0e9a7363fa
                        workspace_name: Test Team
                        original_cart: null
                        original_amounts: null
                        reference_id: JTVTIGXD4DQY7HW7NOF9UGHQ
                        payment_link: null
                    recipients_count: 2
                    recipients_preview:
                      - first_name: Alena
                        last_name: Kenter
                        email: alena@ongoody.com
                      - first_name: Michael
                        last_name: Franci
                        email: michael@ongoody.com
                    cart:
                      id: 19785b2a-74a5-4e93-a8bf-6ec87e27de3d
                      items:
                        - id: db87cd41-81bf-49f1-9bb3-16ea3015cc3c
                          quantity: 1
                          product:
                            id: 22f52b4c-acde-4891-aa63-02cf698a6af9
                            name: Cookies
                            brand:
                              id: 00c260d8-6378-4475-928c-ca2da7be08c1
                              name: Cookie Company
                    is_scheduled_send: false
                    scheduled_send_on: null
                    expires_at: null
                    send_method: null
                    batch_name: Thank You from Reilly Group
                    card_id: 8a876f42-af16-4482-9214-53ae2c321931
                    sender:
                      first_name: Test
                      last_name: User
                      email: 15556954782@test.ongoody.com
                    workspace_id: 47a907e7-d145-483d-9c4a-fb0e9a7363fa
                    workspace_name: Test Team
                    reference_id: CDYCAULRK68D61XP4TYMYGMT
                    customer_reference_id: null
                Scheduled order batch retrieved:
                  value:
                    id: 9580a5bc-eec5-481b-88e6-9b6072da06ca
                    send_status: pending
                    from_name: Zachariah
                    message: null
                    orders_count: 0
                    orders_preview: []
                    recipients_count: 2
                    recipients_preview:
                      - first_name: Alena
                        last_name: Kenter
                        email: alena@ongoody.com
                      - first_name: Michael
                        last_name: Franci
                        email: michael@ongoody.com
                    cart:
                      id: 3b7c6ebb-d687-4868-a157-9fb7af3af1d6
                      items:
                        - id: d81ac7cc-4b54-475f-8348-5b7bb1bc7d67
                          quantity: 1
                          product:
                            id: f7c084bc-3c33-40a6-9b0e-41c9efb65b8a
                            name: Cookies
                            brand:
                              id: 00c260d8-6378-4475-928c-ca2da7be08c1
                              name: Cookie Company
                    is_scheduled_send: true
                    scheduled_send_on: '2026-06-10T12:25:00Z'
                    expires_at: null
                    send_method: null
                    batch_name: Thank You from Wolf-Cummerata
                    card_id: 8a876f42-af16-4482-9214-53ae2c321931
                    sender:
                      first_name: Test
                      last_name: User
                      email: 15556954782@test.ongoody.com
                    workspace_id: 47a907e7-d145-483d-9c4a-fb0e9a7363fa
                    workspace_name: Test Team
                    reference_id: GNAVWVBDDVP2ITLGAPU6A9YA
                    customer_reference_id: null
              schema:
                $ref: '#/components/schemas/OrderBatch'
        '404':
          description: Not found
          content:
            application/json:
              examples:
                Order batch not found:
                  value:
                    error: Order batch not found
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    OrderBatch:
      type: object
      description: >-
        An order batch is the primary resource created by the API. Order batches
        contain an array of orders.
      properties:
        id:
          type: string
          format: uuid
        send_status:
          $ref: '#/components/schemas/OrderBatchSendStatus'
          description: >-
            The `pending` status indicates that an order batch is being prepared
            to be sent out. If it is not scheduled, it is being sent
            asynchronously. If it is scheduled, it will stay in `pending` state
            until the scheduled time is reached, at which point it will be
            processed and moved to `complete`. When it is in `pending` status,
            no orders are created yet. When the order batch is in `complete`
            status, all orders are created and available.
        from_name:
          type: string
          description: >-
            The name of the sender. This is displayed on the order and
            notifications.
        message:
          type: string
          nullable: true
          description: The message in this order batch, provided by the sender.
        orders_count:
          type: integer
          description: >-
            The total number of orders in this order batch. This might be blank
            if the order batch is scheduled for the future, or it could be fewer
            than the recipient count if the order batch is in the process of
            being sent.
        orders_preview:
          type: array
          items:
            $ref: '#/components/schemas/Order'
          description: >-
            A preview of the first 10 orders in this order batch. To paginate
            through all of the orders, use the `/order_batches/:id/orders`
            endpoint with `?page&per_page`. If your use case never sends more
            than 10 orders in a single batch, you can use this field instead of
            calling `/order_batches/:id/orders`. For order batches with more
            than 10 recipients, this array will be empty while the orders are
            asynchronously created in the background.
        recipients_count:
          type: integer
          description: The total number of recipients in this order batch.
        recipients_preview:
          type: array
          items:
            $ref: '#/components/schemas/OrderBatchRecipient'
          description: >-
            A preview of the first 10 recipients in this order batch. To see all
            of the recipients, use `/order_batches/:id/recipients`. Recipients
            contain the original contact information provided for each recipient
            when the order batch was created.
        cart:
          $ref: '#/components/schemas/Cart'
          description: >-
            The cart that was sent for this order batch. This is the original
            cart that was created for this order batch. If individual orders
            were swapped, this still remains the same, whereas orders' `cart`
            would change if they were swapped.
        is_scheduled_send:
          type: boolean
          description: >-
            Whether this order batch was set up as a scheduled send. This stays
            as `true` after the scheduled send is complete. To determine if the
            order batch is scheduled to be sent for the future, check if
            `status` is `pending` and `scheduled_send_on` is in the future. When
            a order batch is scheduled, orders are only created on the scheduled
            send date.
        scheduled_send_on:
          type: string
          format: date-time
          description: >-
            The date and time the order batch is scheduled to be sent. This will
            be `null` if the order batch is not a scheduled send. This field
            remains after the scheduled send completes. ISO 8601, UTC.
          nullable: true
        expires_at:
          type: string
          format: date-time
          description: The date and time the order batch is set to expire. ISO 8601, UTC.
          nullable: true
        send_method:
          $ref: '#/components/schemas/OrderBatchSendMethod'
          nullable: true
        batch_name:
          type: string
          nullable: true
          description: >-
            An internal name for the order batch, falling back to an
            auto-generated batch name. Not displayed to recipients.
        card_id:
          type: string
          format: uuid
          nullable: true
          description: The digital greeting card on this order batch.
        sender:
          $ref: '#/components/schemas/Sender'
          description: The sender of the order batch.
        workspace_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            Organizations are sub-divided into workspaces. Order batches are
            contained in workspaces, identified by this ID.
        workspace_name:
          type: string
          nullable: true
        reference_id:
          type: string
          description: >-
            The reference ID displayed on receipts and other locations as the ID
            for this order batch.
        customer_reference_id:
          type: string
          nullable: true
          description: >-
            A unique client-supplied reference for this order batch, provided on
            creation to prevent duplicate order batches. Returns the value sent
            when the batch was created, or `null` if none was provided.
      required:
        - id
        - send_status
        - orders_preview
        - orders_count
        - cart
        - from_name
        - recipients_preview
        - recipients_count
        - sender
        - reference_id
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    OrderBatchSendStatus:
      type: string
      enum:
        - pending
        - complete
        - failed
        - canceled
    Order:
      type: object
      description: >-
        An individual order contains the gift link to be sent to the recipient
        (if applicable) and other information about the order.
      properties:
        id:
          type: string
          format: uuid
        recipient_first_name:
          type: string
        recipient_last_name:
          type: string
          nullable: true
        recipient_email:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/OrderStatus'
        individual_gift_link:
          type: string
          description: >-
            This gift link can be sent to the recipient or shared with the
            sender. For privacy reasons, this gift link does not display
            tracking information. A separate link, the recipient link, is sent
            directly to the recipient after they accept their gift, which does
            contain tracking information.
        cart:
          $ref: '#/components/schemas/Cart'
          description: >-
            The cart currently on this order. If the order is a gift that was
            swapped, `cart` displays the most recent products selected (i.e.
            post-swap).
        cart_selections:
          type: array
          items:
            $ref: '#/components/schemas/CartSelection'
          description: >-
            Product variant selections for each cart product. Only for commerce
            app orders.
          nullable: true
        shipments:
          type: array
          items:
            $ref: '#/components/schemas/Shipment'
          description: A list of the shipments for the order.
        workspace_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            Organizations are sub-divided into workspaces. Orders are contained
            in workspaces, identified by this ID.
        workspace_name:
          type: string
          nullable: true
        expires_at:
          type: string
          format: date-time
          description: For gifts, the date and time the gift is set to expire.
          nullable: true
        card_id:
          type: string
          format: uuid
          nullable: true
          description: The digital greeting card on this gift.
        message:
          type: string
          nullable: true
          description: The message in this gift, provided by the sender.
        thank_you_note:
          type: string
          nullable: true
          description: A thank you note sent by the recipient.
        view_count_recipient:
          type: integer
          description: The number of times the recipient viewed the gift.
        is_swapped:
          type: boolean
          description: >-
            If this gift was swapped by the recipient. Swapping allows a
            recipient to select another product or products, which replaces the
            `cart`. The original products are saved to `original_cart`.
        order_batch_id:
          type: string
          format: uuid
          description: >-
            On Goody for Business, all orders are attached to a order batch,
            which is a collection of one or more orders.
        amounts:
          type: object
          description: >-
            Costs in USD cents (i.e. $1.00 = 100). If the order was swapped,
            `amounts` displays the most recent amounts (i.e. post-swap).
          properties:
            amount_product:
              type: integer
              description: Total cost of the products in this order.
            amount_shipping:
              type: integer
              description: Total cost of shipping for this order.
            amount_processing_fee:
              type: integer
              nullable: true
              description: Total cost of processing fees for this order.
            amount_credit_applied:
              type: integer
              nullable: true
              description: Total amount of credit applied to this order.
            amount_pre_tax_total:
              type: integer
              description: >-
                Total cost of the products, shipping, and processing fees in
                this order.
            amount_tax:
              type: integer
              nullable: true
              description: Total tax for this order.
            amount_total:
              type: integer
              nullable: true
              description: >-
                Total cost of the products, shipping, processing fees, tax, and
                global shipping costs in this order.
            amount_global_relay_cost:
              type: integer
              nullable: true
              description: >-
                Total cost of global shipping for this order through the Global
                Relay service.
          required:
            - amount_product
            - amount_shipping
            - amount_pre_tax_total
        event_times:
          type: object
          description: Only provided when calling the /orders/:id endpoint.
          properties:
            created_at:
              type: string
              format: date-time
              description: ISO 8601
            notified_at:
              type: string
              format: date-time
              description: When the recipient was notified of the order.
              nullable: true
            opened_at:
              type: string
              format: date-time
              description: For gifts, when the recipient opened the order.
              nullable: true
            accepted_at:
              type: string
              format: date-time
              description: For gifts, when the recipient accepted the order.
              nullable: true
            pending_payment_at:
              type: string
              format: date-time
              description: When the order entered pending payment status.
              nullable: true
            paid_at:
              type: string
              format: date-time
              description: When the order was paid for.
              nullable: true
            shipped_at:
              type: string
              format: date-time
              description: >-
                When the order was first shipped. If there are multiple
                shipments, this is when the first shipment shipped.
              nullable: true
            delivered_at:
              type: string
              format: date-time
              description: >-
                When the order was delivered. If there are multiple shipments,
                this is when all shipments were delivered.
              nullable: true
          required:
            - created_at
          nullable: true
        original_cart:
          $ref: '#/components/schemas/Cart'
          description: >-
            If this order is a gift that was swapped, this displays the original
            cart that was sent to the recipient.
          nullable: true
        original_amounts:
          type: object
          description: >-
            If this order is a gift that was swapped, this displays the original
            amounts of the cart that was sent to the recipient.
          properties:
            original_amount_product:
              type: integer
              nullable: true
            original_amount_shipping:
              type: integer
              nullable: true
            original_amount_credit_applied:
              type: integer
              nullable: true
            original_amount_pre_tax_total:
              type: integer
              nullable: true
          nullable: true
        sender:
          $ref: '#/components/schemas/Sender'
          description: The Goody user who sent this order.
        payment_link:
          type: string
          nullable: true
          description: >-
            For commerce apps using Hosted Payment, the payment link for the
            gift with the credit card entry form. Available when the gift is in
            `pending_payment` status (after it has been accepted).
        reference_id:
          type: string
          description: >-
            The reference ID displayed on receipts and other locations as the ID
            for this order.
      required:
        - id
        - recipient_first_name
        - status
        - individual_gift_link
        - cart
        - shipments
        - amounts
        - sender
        - reference_id
    OrderBatchRecipient:
      type: object
      properties:
        first_name:
          type: string
        last_name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
      required:
        - first_name
    Cart:
      type: object
      properties:
        id:
          type: string
          format: uuid
        items:
          type: array
          items:
            $ref: '#/components/schemas/CartItem'
    OrderBatchSendMethod:
      type: string
      enum:
        - email_and_link
        - link_multiple_custom_list
        - direct_send
      description: >-
        The method for sending a order batch. `email_and_link` sends a gift
        email to the recipient (specify `email` for each recipient).
        `link_multiple_custom_list` generates a gift link without an automatic
        email. `direct_send` ships the product directly to the recipient
        (specify `mailing_address` for each recipient). For more information,
        see [Send Methods](/introduction/send-methods).
    Sender:
      type: object
      properties:
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
      required:
        - first_name
        - last_name
        - email
    OrderStatus:
      type: string
      enum:
        - created
        - notified
        - opened
        - accepted
        - pending_payment
        - paid
        - ordered
        - shipped
        - delivered
        - failed
        - canceled
    CartSelection:
      type: object
      description: Product variant selections for a specific gift cart product.
      properties:
        id:
          type: string
          format: uuid
        cart_item_id:
          type: string
          format: uuid
          description: >-
            The cart item ID this selection belongs to. Match this with
            cart.items[].id.
        quantity_index:
          type: integer
          description: >-
            The index of this selection within multiple quantities of the same
            product. If a given cart product has multiple quantities, this will
            be 0 for the first unit, 1 for the second unit, etc.
        variants:
          type: array
          items:
            type: string
          description: The selected variants for this product selection and quantity index.
      required:
        - id
        - cart_item_id
        - quantity_index
        - variants
    Shipment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - tracking
            - shipped
            - delivered
            - delivered_override
            - failed
            - failed_unset_tracking
            - failed_with_reship
        brand_name:
          type: string
          description: The name of the brand that this shipment is from.
        tracking_carrier:
          type: string
          nullable: true
          description: The carrier for this shipment, e.g. UPS.
        tracking_number:
          type: string
          nullable: true
          description: Only for approved distribution partners.
        tracking_url:
          type: string
          nullable: true
          description: Only for approved distribution partners.
        shipped_at:
          type: string
          format: date-time
          description: ISO 8601
          nullable: true
        delivered_at:
          type: string
          format: date-time
          description: ISO 8601
          nullable: true
        delivery_eta:
          type: string
          format: date-time
          description: The estimated delivery time of this shipment.
          nullable: true
      required:
        - id
        - status
        - brand_name
    CartItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
        product:
          type: object
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            brand:
              type: object
              description: The brand that this product is from.
              properties:
                id:
                  type: string
                  format: uuid
                name:
                  type: string
              required:
                - id
                - name
          required:
            - id
            - name
            - brand
        quantity:
          type: integer
      required:
        - id
        - product
        - quantity
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your Goody API key.

````