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
      • POSTCreate/Update a product
      • GETGet a product's details
      • POSTCreate products in batch
      • GETReturn all your products
      • POSTCreate a product alert for a contact
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
EcommerceProducts

Create products in batch

POST
https://api.brevo.com/v3/products/batch
POST
/v3/products/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.createUpdateBatchProducts({
8 products: [
9 {
10 id: "P11",
11 name: "Iphone 11",
12 },
13 ],
14 });
15}
16main();
1{
2 "createdCount": 2,
3 "updatedCount": 7
4}
Create or update multiple ecommerce products in a single request. The `products` array accepts up to 100 product objects for creation (or up to 1000 when `updateEnabled` is `true` and the account has an increased limit). Each product requires a unique `id` and `name` (name is mandatory for creation only). When `updateEnabled` is `false`, all products are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing products are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated products.
Was this page helpful?
Previous

Return all your products

Next
Built with

Create or update multiple ecommerce products in a single request. The products array accepts up to 100 product objects for creation (or up to 1000 when updateEnabled is true and the account has an increased limit). Each product requires a unique id and name (name is mandatory for creation only). When updateEnabled is false, all products are inserted as new; if any ID already exists, a 400 error is returned. When updateEnabled is true, existing products are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated products.

Authentication

api-keystring

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

Request

Values to create a batch of products
productslist of objectsRequired
array of products objects
updateEnabledbooleanOptional

Facilitate to update the existing products in the same request (updateEnabled = true)

Response

Products created and updated
createdCountlong
Number of the new created products
updatedCountlong
Number of the existing products updated

Errors

400
Bad Request Error