Skip to main content
POST
/
products
/
batch
Batch Create Products
curl --request POST \
  --url https://backend.anglera.com/products/batch \
  --header 'Content-Type: application/json' \
  --header 'X-Anglera-API-Key: <api-key>' \
  --data '
{
  "sheet_id": "<string>",
  "products": [
    {
      "name": "<string>",
      "sku": "<string>",
      "mapped_data": {},
      "input_source_url": "<string>"
    }
  ],
  "tab_id": "<string>",
  "auto_enrich": true,
  "update_if_exists": true,
  "replace_all": true
}
'
{
  "message": "<string>",
  "sheet_id": "<string>",
  "created": [
    {
      "id": 123,
      "name": "<string>",
      "sku": "<string>",
      "status": "<string>"
    }
  ],
  "updated": [
    {}
  ],
  "errors": [
    {
      "name": "<string>",
      "reason": "<string>"
    }
  ],
  "deleted_count": 123
}
Creates multiple products in a sheet in a single request. Supports optional auto_enrich to queue products for enrichment immediately, update_if_exists to update existing products matched by name, and replace_all to replace the entire sheet contents.

Request

curl -X POST "https://backend.anglera.com/products/batch" \
  -H "X-Anglera-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "sheet_id": "100",
    "products": [
      {
        "name": "Frigidaire Side-by-side Fridge",
        "sku": "FRSS26L3AF",
        "mapped_data": {"brand_name": "Frigidaire"},
        "input_source_url": "https://example.com/product/123"
      },
      {
        "name": "Samsung French Door Fridge",
        "sku": "RF28T5001SR"
      }
    ],
    "auto_enrich": false,
    "update_if_exists": false
  }'

Body Parameters

sheet_id
string
required
ID of the sheet where products should be added
products
array
required
Array of product objects (max 100). Each product can have:
tab_id
string
Target tab for new products. If omitted, products go to the sheet’s default tab. Use List Tabs to find existing tab IDs, or Create Tab to create a new one.
auto_enrich
boolean
default:"false"
When true, products are created with QUEUED status and sent to the enrichment queue. When false (default), products are created with DRAFT status. Use Batch Enrich to trigger enrichment later.
update_if_exists
boolean
default:"false"
When true, matches existing products by name within the sheet and updates them in-place. Matched products appear in the updated array instead of created. Ignored when replace_all is true.
replace_all
boolean
default:"false"
When true, all existing products in the sheet are permanently deleted before creating the new products. The response includes a deleted_count field indicating how many products were removed.
This is a destructive operation. All existing products in the sheet — including their enrichment results, price reports, and validation data — will be permanently deleted and cannot be recovered. Use this for workflows where you need to fully sync a sheet to a known list of products (e.g., weekly price report refresh).

Response

message
string
Summary of the operation
sheet_id
string
The sheet ID
created
array
Products that were newly created
updated
array
Products that were updated (only when update_if_exists is true). Same shape as created.
errors
array
Products that failed validation or insertion
deleted_count
number
Number of products that were deleted from the sheet. Only present when replace_all is true.
{
  "message": "Created 2 product(s), updated 0 product(s)",
  "sheet_id": "100",
  "created": [
    {"id": 9001, "name": "Frigidaire Side-by-side Fridge", "sku": "FRSS26L3AF", "status": "DRAFT"},
    {"id": 9002, "name": "Samsung French Door Fridge", "sku": "RF28T5001SR", "status": "DRAFT"}
  ],
  "updated": [],
  "errors": []
}

Errors

Status CodeDescription
400Missing required fields, invalid products array, or exceeds 100 product limit
401Invalid API key
404Sheet not found
500Internal server error