GET
/
v1
/
order_batches
/
{id}
{
  "id": "1af502a6-9233-4ea7-9af6-5786adce0e13",
  "send_status": "complete",
  "from_name": "Mark",
  "message": null,
  "orders_count": 2,
  "orders_preview": [
    {
      "id": "3ffdb08b-2521-48a4-8a68-bbfd7b649e17",
      "status": "created",
      "individual_gift_link": "https://gifts.ongoody.com/gift/UD1TZIHRHBWITRFQZVANPNDZ",
      "recipient_first_name": "Alena",
      "recipient_last_name": "Kenter",
      "recipient_email": "alena@ongoody.com",
      "card_id": "91c2744d-5e4e-4509-ae91-0097a7bb0536",
      "message": "Test Message",
      "thank_you_note": null,
      "view_count_recipient": 0,
      "is_swapped": false,
      "order_batch_id": "1af502a6-9233-4ea7-9af6-5786adce0e13",
      "expires_at": null,
      "cart": {
        "id": "740252ef-b17e-4487-acd0-eedee763d368",
        "items": [
          {
            "id": "1b650623-160d-4ee7-9892-3007daec8a14",
            "quantity": 1,
            "product": {
              "id": "b4d0fa16-9540-4574-8a0c-2331c51964b9",
              "name": "Cookies",
              "brand": {
                "id": "c53e816d-f000-49dd-a7c7-39b33c000585",
                "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": "15552249449@test.ongoody.com"
      },
      "workspace_id": "5c7bbce7-b236-4054-83b1-7d09e4aedb49",
      "workspace_name": "Test Team",
      "original_cart": null,
      "original_amounts": null,
      "reference_id": "P8ZUSSBP7MC0QJBHR4U2A1UU",
      "payment_link": null
    },
    {
      "id": "a249baa5-da76-4a53-ae85-42b55373987d",
      "status": "created",
      "individual_gift_link": "https://gifts.ongoody.com/gift/GM5VYBUS6XOWFQVP8RX5TVKV",
      "recipient_first_name": "Michael",
      "recipient_last_name": "Franci",
      "recipient_email": "michael@ongoody.com",
      "card_id": "91c2744d-5e4e-4509-ae91-0097a7bb0536",
      "message": "Test Message",
      "thank_you_note": null,
      "view_count_recipient": 0,
      "is_swapped": false,
      "order_batch_id": "1af502a6-9233-4ea7-9af6-5786adce0e13",
      "expires_at": null,
      "cart": {
        "id": "740252ef-b17e-4487-acd0-eedee763d368",
        "items": [
          {
            "id": "1b650623-160d-4ee7-9892-3007daec8a14",
            "quantity": 1,
            "product": {
              "id": "b4d0fa16-9540-4574-8a0c-2331c51964b9",
              "name": "Cookies",
              "brand": {
                "id": "c53e816d-f000-49dd-a7c7-39b33c000585",
                "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": "15552249449@test.ongoody.com"
      },
      "workspace_id": "5c7bbce7-b236-4054-83b1-7d09e4aedb49",
      "workspace_name": "Test Team",
      "original_cart": null,
      "original_amounts": null,
      "reference_id": "KYUSWHYQUIS1OENFPAU2Q11H",
      "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": "740252ef-b17e-4487-acd0-eedee763d368",
    "items": [
      {
        "id": "1b650623-160d-4ee7-9892-3007daec8a14",
        "quantity": 1,
        "product": {
          "id": "b4d0fa16-9540-4574-8a0c-2331c51964b9",
          "name": "Cookies",
          "brand": {
            "id": "c53e816d-f000-49dd-a7c7-39b33c000585",
            "name": "Cookie Company"
          }
        }
      }
    ]
  },
  "is_scheduled_send": false,
  "scheduled_send_on": null,
  "expires_at": null,
  "send_method": null,
  "batch_name": "Thank You from Legros and Sons",
  "card_id": "91c2744d-5e4e-4509-ae91-0097a7bb0536",
  "sender": {
    "first_name": "Test",
    "last_name": "User",
    "email": "15552249449@test.ongoody.com"
  },
  "workspace_id": "5c7bbce7-b236-4054-83b1-7d09e4aedb49",
  "workspace_name": "Test Team",
  "reference_id": "UQNOWISTP4TTF4T9IMKGT1XD"
}

Authorizations

Authorization
string
headerrequired

Your Goody API key.

Path Parameters

id
string
required

Order batch ID

Response

200 - application/json

An order batch is the primary resource created by the API. Order batches contain an array of orders.

id
string
required
send_status
enum<string>
required

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.

Available options:
pending,
complete,
failed,
canceled
from_name
string
required

The name of the sender. This is displayed on the order and notifications.

orders_count
integer
required

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
object[]
required

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
integer
required

The total number of recipients in this order batch.

recipients_preview
object[]
required

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
object
required

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.

sender
object
required

The sender of the order batch.

reference_id
string
required

The reference ID displayed on receipts and other locations as the ID for this order batch.

message
string | null

The message in this order batch, provided by the sender.

is_scheduled_send
boolean

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
string | null

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.

expires_at
string | null

The date and time the order batch is set to expire. ISO 8601, UTC.

send_method
enum<string>

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.

Available options:
email_and_link,
link_multiple_custom_list,
direct_send
batch_name
string | null

An internal name for the order batch, falling back to an auto-generated batch name. Not displayed to recipients.

card_id
string | null

The digital greeting card on this order batch.

workspace_id
string | null

Organizations are sub-divided into workspaces. Order batches are contained in workspaces, identified by this ID.

workspace_name
string | null