Emitted when an order batch is fully processed, which is when all orders are created for each recipient in the order batch.
order_batch.completed
event is emitted immediately after the order batch is finished processing and all orders have been created. (This is instantly after the order_batch.created
webhook event for order batches with 10 or fewer recipients, and shortly after the order_batch.created
event for order batches with more than 10 recipients.)
For scheduled order batches, the order_batch.completed
event is emitted when the order batch scheduled time is reached, and orders are created for the order batch.
{
"event_type": "gift_batch.completed",
"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"
}
}
Show properties
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.Allowed values: pending
complete
failed
canceled
/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.Show properties
created
notified
opened
accepted
pending_payment
paid
ordered
shipped
delivered
failed
canceled
cart
displays the most recent products selected (i.e.
post-swap).Show properties
Show properties
pending
tracking
shipped
delivered
delivered_override
failed
failed_unset_tracking
failed_with_reship
cart
. The original products are saved to original_cart
.amounts
displays the most recent amounts (i.e. post-swap).Show properties
Show properties
Show properties
/order_batches/:id/recipients
. Recipients contain the original contact information provided for each recipient when the order batch was created.cart
would change if they were swapped.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.null
if the order batch is not a scheduled send. This field remains after the scheduled send completes. ISO 8601, UTC.link_multiple_custom_list
which specifies that a link should be created for each order, but no email should automatically be sent to the recipient. Allowed value: link_multiple_custom_list