---
title: "Batch Carriers"
method: POST
path: "/v2/tms-api/batch/carriers"
tags: ["TMS API", "TMS API - Batch Operations"]
---

# Batch Carriers

`POST /v2/tms-api/batch/carriers`

## Request

- Base URL: `https://api.mentium.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mentium.io/v2/tms-api/batch/carriers`
- Auth: none declared

Process batch carrier operations (create, update, upsert, delete).

- For 'create' or 'upsert': 'name' is required
- For 'update': only fields to update need to be provided
- For 'delete': no data needed

## Headers

- `X-API-Key` string, nullable: API key for authentication

## Request body

- BatchCarrierRequest: Request schema for batch carrier operations.
  - `items` BatchCarrierItem[], required: Batch items (max 100)
    - `operation` 'create' | 'update' | 'upsert' | 'delete', required: Batch operation types.
    - `external_reference_id` string, required: External reference ID of the carrier
    - `carrier` union: Carrier data (CarrierCreate for create/upsert, CarrierUpdate for update)
      - CarrierCreate: Schema for creating a carrier.
        - `external_reference_id` string, required: Unique identifier from your system
        - `name` string, required: Carrier name
        - `dot_number` string, nullable: DOT number
        - `mc_number` string, nullable: MC (docket) number
        - `phone_number` string, nullable: Main phone number
        - `email` string, nullable: Main email address
        - `address` AddressCreate: Schema for an address.
          - `address_line1` string, nullable: Street address line 1
          - `address_line2` string, nullable: Street address line 2
          - `city` string, nullable: City
          - `state` string, nullable: State/Province
          - `postal_code` string, nullable: Postal/ZIP code
          - `country` string, nullable: Country
        - `contacts` CarrierContactCreate[], nullable: Carrier contacts
          - `external_reference_id` string, nullable: External reference ID for the contact
          - `first_name` string, required: First name
          - `last_name` string, required: Last name
          - `contact_type` string, nullable: Contact type (e.g., Primary, Dispatch)
          - `job_title` string, nullable: Job title
          - `primary_email` string, nullable: Primary email
          - `primary_phone` string, nullable: Primary phone number
          - `primary_phone_extension` string, nullable: Phone extension
          - `is_primary_contact` boolean, nullable: Is this the primary contact
          - `is_active` boolean, nullable: Is the contact active
      - CarrierUpdate: Schema for updating a carrier. All fields are optional.
        - `name` string, nullable: Carrier name
        - `dot_number` string, nullable: DOT number
        - `mc_number` string, nullable: MC (docket) number
        - `phone_number` string, nullable: Main phone number
        - `email` string, nullable: Main email address
        - `address` AddressCreate: Schema for an address.
          - `address_line1` string, nullable: Street address line 1
          - `address_line2` string, nullable: Street address line 2
          - `city` string, nullable: City
          - `state` string, nullable: State/Province
          - `postal_code` string, nullable: Postal/ZIP code
          - `country` string, nullable: Country
        - `contacts` CarrierContactCreate[], nullable: Carrier contacts (replaces existing)
          - `external_reference_id` string, nullable: External reference ID for the contact
          - `first_name` string, required: First name
          - `last_name` string, required: Last name
          - `contact_type` string, nullable: Contact type (e.g., Primary, Dispatch)
          - `job_title` string, nullable: Job title
          - `primary_email` string, nullable: Primary email
          - `primary_phone` string, nullable: Primary phone number
          - `primary_phone_extension` string, nullable: Phone extension
          - `is_primary_contact` boolean, nullable: Is this the primary contact
          - `is_active` boolean, nullable: Is the contact active

## Response `200`

Successful Response

- BatchResponse: Response for batch operations.
  - `success_count` integer, required: Number of successful operations
  - `error_count` integer, required: Number of failed operations
  - `results` BatchResultItem[], required: Results for each item
    - `external_reference_id` string, required: External reference ID of the item
    - `operation` 'create' | 'update' | 'upsert' | 'delete', required: Batch operation types.
    - `success` boolean, required: Whether the operation succeeded
    - `id` string, nullable: ID of created/updated entity
    - `error` string, nullable: Error message if failed
    - `error_code` string, nullable: Error code (e.g., DUPLICATE, NOT_FOUND)

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mentium/apis/mentium-api.md) - [All operations](https://skmtc.dev/mentium/apis/mentium-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mentium/apis/mentium-api/revisions/b4ed8e59432e?raw)
