Skip to content

Batch Customers

POST /v2/tms-api/batch/customers

Create, update, or upsert multiple customers in a single request.

API Reference

Request Body

itemsarrayrequired
Array of customer items. Each item must have: - `operation`: `create`, `update`, or `upsert` - `external_reference_id`: Customer external reference ID - `customer`: Customer data object

Request Example

bash
curl -X POST "https://api.mentium.io/v2/tms-api/batch/customers" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "operation": "create",
        "external_reference_id": "CUST-ACME-001",
        "customer": {
          "external_reference_id": "CUST-ACME-001",
          "name": "Acme Corporation",
          "phone": "312-555-0100"
        }
      }
    ]
  }'

Response

json
{
  "success_count": 1,
  "error_count": 0,
  "results": [
    {
      "external_reference_id": "CUST-ACME-001",
      "operation": "create",
      "success": true,
      "id": "cust_abc123"
    }
  ]
}

Mentium TMS API Documentation