Batch Carriers
POST /v2/tms-api/batch/carriers
Create, update, or upsert multiple carriers in a single request.
API Reference
Request Body
itemsarrayrequired Array of carrier items. Each item must have: - `operation`: `create`, `update`, or `upsert` - `external_reference_id`: Carrier external reference ID - `carrier`: Carrier data object
Request Example
bash
curl -X POST "https://api.mentium.io/v2/tms-api/batch/carriers" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"operation": "create",
"external_reference_id": "CARRIER-MIDWEST-001",
"carrier": {
"external_reference_id": "CARRIER-MIDWEST-001",
"name": "Midwest Express Trucking",
"mc_number": "MC123456"
}
}
]
}'Response
json
{
"success_count": 1,
"error_count": 0,
"results": [
{
"external_reference_id": "CARRIER-MIDWEST-001",
"operation": "create",
"success": true,
"id": "carrier_abc123"
}
]
}