For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
      • POSTManaging the status of the order
      • POSTCreate orders in batch
      • GETGet order details
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
EcommerceOrders

Create orders in batch

POST
https://api.brevo.com/v3/orders/status/batch
POST
/v3/orders/status/batch
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.ecommerce.createBatchOrder({
8 orders: [
9 {
10 amount: 308.42,
11 createdAt: "2021-07-29T20:59:23.383Z",
12 id: "14",
13 products: [
14 {
15 price: 99.99,
16 productId: "P1",
17 },
18 ],
19 status: "completed",
20 updatedAt: "2021-07-30T10:59:23.383Z",
21 },
22 ],
23 });
24}
25main();
1{
2 "batchId": 1,
3 "count": 17655
4}
Create multiple orders at one time instead of one order at a time
Was this page helpful?
Previous

Get order details

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

This endpoint expects an object.
orderslist of objectsRequired
array of order objects
historicalbooleanOptionalDefaults to true

Defines whether you want your orders to be considered as live data or as historical data (import of past data, synchronising data). True: orders will not trigger any automation workflows. False: orders will trigger workflows as usual.

notifyUrlstringOptional
Webhook URL to receive the status of the batch request

Response

batch id created
batchIddouble
Batch ID of the request
countlong
Number of orders

Errors

400
Bad Request Error