For non-scheduled order batches, for order batches with 10 or fewer recipients, the order_batch.created event will contain all of the orders for each recipient. For order batches with more than 10 recipients, order creation happens asynchronously, and the order_batch.completed event is emitted immediately after the orders are created.

For scheduled order batches, no order will be created when the order batch is created until the scheduled send time. The order_batch.completed event is emitted when the order batch scheduled time is reached, and orders are created for the order batch.

Example

{
  "event_type": "gift_batch.created",
  "id": "ad097c47-bf12-45c9-8feb-0536a0012c09",
  "data": {
    "id": "bd1fd5b5-6339-4331-a404-66200143ff0f",
    "send_status": "complete",
    "from_name": "John",
    "message": "Thank you!",
    "gifts_count": 2,
    "gifts_preview": [
      {
        "id": "1f6e253e-4d03-4a85-a349-0659384ac894",
        "status": "created",
        "recipient_first_name": "Alena",
        "recipient_last_name": "Kenter",
        "recipient_email": "alena@ongoody.com",
        "individual_gift_link_shared": "https://gifts.ongoody.com/gift/Anc0HT0ZhyKAJguP75jt2Rar",
        "card_id": "60c4a674-4f0e-4031-9eca-645d34bb6cec",
        "message": "Thank you!",
        "thank_you_note": null,
        "view_count_recipient": 0,
        "is_swapped": false,
        "gift_batch_id": "bd1fd5b5-6339-4331-a404-66200143ff0f",
        "cart": {
          "id": "e0597695-5e19-4bbc-9a99-0fd540a9e68f",
          "items": [
            {
              "id": "5f4e70e9-5cc7-406e-8058-c513af667511",
              "quantity": 1,
              "product": {
                "id": "e69ea31a-320f-48f5-8fd7-0692df22328e",
                "name": "Cookies",
                "brand": {
                  "id": "393d847d-874b-4338-b834-fe3e0cf27644",
                  "name": "Cookie Company"
                }
              }
            }
          ]
        },
        "shipments": [],
        "amounts": {
          "amount_product": 1000,
          "amount_shipping": 1000,
          "amount_processing_fee": 100,
          "amount_pre_tax_total": 2100,
          "amount_tax": null,
          "amount_total": null,
          "amount_global_relay_cost": null
        },
        "sender": {
          "first_name": "Test",
          "last_name": "User",
          "email": "15550197216@test.ongoody.com"
        },
        "workspace_id": "ae6e2795-8667-4d21-a1b0-fe7f642d7893",
        "workspace_name": "Test Team",
        "original_cart": null,
        "original_amounts": null,
        "reference_id": "LLRMPDGSSD7GXISGMACUKUIS"
      },
      {
        "id": "981c4abd-1f0c-4287-8c35-c7cea8f6f5da",
        "status": "created",
        "recipient_first_name": "Michael",
        "recipient_last_name": "Franci",
        "recipient_email": "michael@ongoody.com",
        "individual_gift_link_shared": "https://gifts.ongoody.com/gift/6p5k63B9ym4ksusHG6hr6xtA",
        "card_id": "60c4a674-4f0e-4031-9eca-645d34bb6cec",
        "message": "Thank you!",
        "thank_you_note": null,
        "view_count_recipient": 0,
        "is_swapped": false,
        "gift_batch_id": "bd1fd5b5-6339-4331-a404-66200143ff0f",
        "cart": {
          "id": "e0597695-5e19-4bbc-9a99-0fd540a9e68f",
          "items": [
            {
              "id": "5f4e70e9-5cc7-406e-8058-c513af667511",
              "quantity": 1,
              "product": {
                "id": "e69ea31a-320f-48f5-8fd7-0692df22328e",
                "name": "Cookies",
                "brand": {
                  "id": "393d847d-874b-4338-b834-fe3e0cf27644",
                  "name": "Cookie Company"
                }
              }
            }
          ]
        },
        "shipments": [],
        "amounts": {
          "amount_product": 1000,
          "amount_shipping": 1000,
          "amount_processing_fee": 100,
          "amount_pre_tax_total": 2100,
          "amount_tax": null,
          "amount_total": null,
          "amount_global_relay_cost": null
        },
        "sender": {
          "first_name": "Test",
          "last_name": "User",
          "email": "15550197216@test.ongoody.com"
        },
        "workspace_id": "ae6e2795-8667-4d21-a1b0-fe7f642d7893",
        "workspace_name": "Test Team",
        "original_cart": null,
        "original_amounts": null,
        "reference_id": "U23DXZIHYSI4U9M8SBQ7XMVH"
      }
    ],
    "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": "e0597695-5e19-4bbc-9a99-0fd540a9e68f",
      "items": [
        {
          "id": "5f4e70e9-5cc7-406e-8058-c513af667511",
          "quantity": 1,
          "product": {
            "id": "e69ea31a-320f-48f5-8fd7-0692df22328e",
            "name": "Cookies",
            "brand": {
              "id": "393d847d-874b-4338-b834-fe3e0cf27644",
              "name": "Cookie Company"
            }
          }
        }
      ]
    },
    "is_scheduled_send": false,
    "scheduled_send_on": null,
    "expires_at": null,
    "send_method": "link_multiple_custom_list",
    "batch_name": "Alena Kenter and Michael Franci",
    "card_id": "60c4a674-4f0e-4031-9eca-645d34bb6cec",
    "sender": {
      "first_name": "Test",
      "last_name": "User",
      "email": "15550197216@test.ongoody.com"
    },
    "workspace_id": "ae6e2795-8667-4d21-a1b0-fe7f642d7893",
    "workspace_name": "Test Team",
    "reference_id": "61Q2FSAHYYISJRZDHQXGYTBU"
  }
}

Schema

event_type
string
required

The type of event that occurred

event_id
string
required

The unique ID for this event

data
object

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