curl --request POST \
--url https://api.ongoody.com/v1/order_batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"from_name": "John",
"message": "Thank you!",
"send_method": "link_multiple_custom_list",
"payment_method_id": null,
"workspace_id": null,
"card_id": "313cb0b4-8e0b-47f5-b110-138e78e76a19",
"recipients": [
{
"first_name": "Alena",
"last_name": "Kenter",
"email": "alena@ongoody.com"
},
{
"first_name": "Michael",
"last_name": "Franci",
"email": "michael@ongoody.com"
}
],
"cart": {
"items": [
{
"product_id": "3f9d5d5d-258d-40e3-8583-649ed899b824",
"quantity": 1
}
]
}
}'
{
"id": "a4c92d69-4686-479e-968c-69a1c85d9a40",
"send_status": "complete",
"from_name": "John",
"message": "Thank you!",
"orders_count": 2,
"orders_preview": [
{
"id": "db8f2159-9fdb-44cf-ae58-84f7424193d4",
"status": "created",
"individual_gift_link": "https://gifts.ongoody.com/gift/q1fsXaxLnqMEiM0uvtOj8xA3",
"recipient_first_name": "Alena",
"recipient_last_name": "Kenter",
"recipient_email": "alena@ongoody.com",
"card_id": "313cb0b4-8e0b-47f5-b110-138e78e76a19",
"message": "Thank you!",
"thank_you_note": null,
"view_count_recipient": 0,
"is_swapped": false,
"order_batch_id": "a4c92d69-4686-479e-968c-69a1c85d9a40",
"expires_at": null,
"cart": {
"id": "b7230ce9-c35a-48e8-b20b-227aec637aa7",
"items": [
{
"id": "051cfe26-48d4-42fb-a8d3-aad9383fa30b",
"quantity": 1,
"product": {
"id": "3f9d5d5d-258d-40e3-8583-649ed899b824",
"name": "Cookies",
"brand": {
"id": "40a86b11-9674-40a0-854d-5d5fbe982b8d",
"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": "15554427289@test.ongoody.com"
},
"workspace_id": "6e88b40f-4d2f-422e-8657-549a02768299",
"workspace_name": "Test Team",
"original_cart": null,
"original_amounts": null,
"reference_id": "6IHXWGUJDLP45STIQSFYTGVK",
"payment_link": null
},
{
"id": "24bcf7ef-f442-40e0-8a50-ef0a8540e525",
"status": "created",
"individual_gift_link": "https://gifts.ongoody.com/gift/zjivxRmZxhhJ2vMRR9BL1hQ5",
"recipient_first_name": "Michael",
"recipient_last_name": "Franci",
"recipient_email": "michael@ongoody.com",
"card_id": "313cb0b4-8e0b-47f5-b110-138e78e76a19",
"message": "Thank you!",
"thank_you_note": null,
"view_count_recipient": 0,
"is_swapped": false,
"order_batch_id": "a4c92d69-4686-479e-968c-69a1c85d9a40",
"expires_at": null,
"cart": {
"id": "b7230ce9-c35a-48e8-b20b-227aec637aa7",
"items": [
{
"id": "051cfe26-48d4-42fb-a8d3-aad9383fa30b",
"quantity": 1,
"product": {
"id": "3f9d5d5d-258d-40e3-8583-649ed899b824",
"name": "Cookies",
"brand": {
"id": "40a86b11-9674-40a0-854d-5d5fbe982b8d",
"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": "15554427289@test.ongoody.com"
},
"workspace_id": "6e88b40f-4d2f-422e-8657-549a02768299",
"workspace_name": "Test Team",
"original_cart": null,
"original_amounts": null,
"reference_id": "AY7F1V0MASHNVOSZWEZKLGA9",
"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": "b7230ce9-c35a-48e8-b20b-227aec637aa7",
"items": [
{
"id": "051cfe26-48d4-42fb-a8d3-aad9383fa30b",
"quantity": 1,
"product": {
"id": "3f9d5d5d-258d-40e3-8583-649ed899b824",
"name": "Cookies",
"brand": {
"id": "40a86b11-9674-40a0-854d-5d5fbe982b8d",
"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": "313cb0b4-8e0b-47f5-b110-138e78e76a19",
"sender": {
"first_name": "Test",
"last_name": "User",
"email": "15554427289@test.ongoody.com"
},
"workspace_id": "6e88b40f-4d2f-422e-8657-549a02768299",
"workspace_name": "Test Team",
"reference_id": "LQBJIKQWDEFLW70WWC6HLWEI"
}
curl --request POST \
--url https://api.ongoody.com/v1/order_batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"from_name": "John",
"message": "Thank you!",
"send_method": "link_multiple_custom_list",
"payment_method_id": null,
"workspace_id": null,
"card_id": "313cb0b4-8e0b-47f5-b110-138e78e76a19",
"recipients": [
{
"first_name": "Alena",
"last_name": "Kenter",
"email": "alena@ongoody.com"
},
{
"first_name": "Michael",
"last_name": "Franci",
"email": "michael@ongoody.com"
}
],
"cart": {
"items": [
{
"product_id": "3f9d5d5d-258d-40e3-8583-649ed899b824",
"quantity": 1
}
]
}
}'
{
"id": "a4c92d69-4686-479e-968c-69a1c85d9a40",
"send_status": "complete",
"from_name": "John",
"message": "Thank you!",
"orders_count": 2,
"orders_preview": [
{
"id": "db8f2159-9fdb-44cf-ae58-84f7424193d4",
"status": "created",
"individual_gift_link": "https://gifts.ongoody.com/gift/q1fsXaxLnqMEiM0uvtOj8xA3",
"recipient_first_name": "Alena",
"recipient_last_name": "Kenter",
"recipient_email": "alena@ongoody.com",
"card_id": "313cb0b4-8e0b-47f5-b110-138e78e76a19",
"message": "Thank you!",
"thank_you_note": null,
"view_count_recipient": 0,
"is_swapped": false,
"order_batch_id": "a4c92d69-4686-479e-968c-69a1c85d9a40",
"expires_at": null,
"cart": {
"id": "b7230ce9-c35a-48e8-b20b-227aec637aa7",
"items": [
{
"id": "051cfe26-48d4-42fb-a8d3-aad9383fa30b",
"quantity": 1,
"product": {
"id": "3f9d5d5d-258d-40e3-8583-649ed899b824",
"name": "Cookies",
"brand": {
"id": "40a86b11-9674-40a0-854d-5d5fbe982b8d",
"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": "15554427289@test.ongoody.com"
},
"workspace_id": "6e88b40f-4d2f-422e-8657-549a02768299",
"workspace_name": "Test Team",
"original_cart": null,
"original_amounts": null,
"reference_id": "6IHXWGUJDLP45STIQSFYTGVK",
"payment_link": null
},
{
"id": "24bcf7ef-f442-40e0-8a50-ef0a8540e525",
"status": "created",
"individual_gift_link": "https://gifts.ongoody.com/gift/zjivxRmZxhhJ2vMRR9BL1hQ5",
"recipient_first_name": "Michael",
"recipient_last_name": "Franci",
"recipient_email": "michael@ongoody.com",
"card_id": "313cb0b4-8e0b-47f5-b110-138e78e76a19",
"message": "Thank you!",
"thank_you_note": null,
"view_count_recipient": 0,
"is_swapped": false,
"order_batch_id": "a4c92d69-4686-479e-968c-69a1c85d9a40",
"expires_at": null,
"cart": {
"id": "b7230ce9-c35a-48e8-b20b-227aec637aa7",
"items": [
{
"id": "051cfe26-48d4-42fb-a8d3-aad9383fa30b",
"quantity": 1,
"product": {
"id": "3f9d5d5d-258d-40e3-8583-649ed899b824",
"name": "Cookies",
"brand": {
"id": "40a86b11-9674-40a0-854d-5d5fbe982b8d",
"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": "15554427289@test.ongoody.com"
},
"workspace_id": "6e88b40f-4d2f-422e-8657-549a02768299",
"workspace_name": "Test Team",
"original_cart": null,
"original_amounts": null,
"reference_id": "AY7F1V0MASHNVOSZWEZKLGA9",
"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": "b7230ce9-c35a-48e8-b20b-227aec637aa7",
"items": [
{
"id": "051cfe26-48d4-42fb-a8d3-aad9383fa30b",
"quantity": 1,
"product": {
"id": "3f9d5d5d-258d-40e3-8583-649ed899b824",
"name": "Cookies",
"brand": {
"id": "40a86b11-9674-40a0-854d-5d5fbe982b8d",
"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": "313cb0b4-8e0b-47f5-b110-138e78e76a19",
"sender": {
"first_name": "Test",
"last_name": "User",
"email": "15554427289@test.ongoody.com"
},
"workspace_id": "6e88b40f-4d2f-422e-8657-549a02768299",
"workspace_name": "Test Team",
"reference_id": "LQBJIKQWDEFLW70WWC6HLWEI"
}
status
field will be completed
. The orders and order links are available immediately inside the orders_preview
field (which returns the first 10 orders).
status
of pending
. The orders and gift links won’t be available until the order batch is finished processing synchronously. You can check the status of the order batch by calling the /order_batches/:id
endpoint, or by receiving a webhook notification on the order_batch.completed
event.
Once an order batch is created, you can access all of the orders by calling the /order_batches/:id/orders
endpoint, where you can paginate through the list of orders. If your use case always sends 10 or fewer orders at a time, you can just use the orders_preview
field on the order batch which gives you the first 10 orders.Your Goody API key.
Input parameters for an order batch.
Order batch created using product URL in cart
An order batch is the primary resource created by the API. Order batches contain an array of orders.