---
title: "Bulk add, update, or remove carriers in a broker's network"
method: POST
path: "/mynetwork"
tags: ["Carrier Hub"]
---

# Bulk add, update, or remove carriers in a broker's network

`POST /mynetwork`

Performs batched add, update, and remove operations against the authenticated broker's network. Carriers are identified by DOT number only.

The request is an array of operation groups; each group specifies an action and the DOT numbers it applies to. The response mirrors that structure and, for each operation group, reports the DOT numbers that were affected as well as the DOT numbers that were skipped along with a per-item reason and code.

Each operation result reports DOT numbers in three buckets: `affected` (the action was performed exactly as requested), `adjusted` (the action was performed but altered from what was requested - for example, an Add that would exceed the broker's active-network limit is added to the inactive list instead), and `skipped` (the action was not performed; reason explains why).

Semantics:
  * Add - affected are DOT numbers that were not already in the network and
    have been added to the active list when `activate` is true or to the
    inactive list when `activate` is false. Adjusted are DOT numbers that
    were added but placed differently than requested - currently, this
    occurs when adding with `activate` true would exceed the broker's
    active-network limit, in which case the overflow DOTs are added to
    the inactive list and reported here with reason
    `OverLimitAddedInactive`. Skipped are DOT numbers already in the
    network (AddDuplicate), invalid (InvalidDot), or otherwise not added
    (Other). `activate` is required.
  * Update - affected are DOT numbers that were in the network and now
    appear on the active list when `activate` is true or on the inactive
    list when `activate` is false. A carrier already on the target list is
    still considered affected. Skipped are DOT numbers not in the network
    (UpdateNotFound), invalid (InvalidDot), or otherwise not updated
    (Other). `activate` is required.
  * Remove - affected are DOT numbers that were in the network and have
    been removed from it entirely (no longer on either list). Skipped are
    DOT numbers not in the network (RemoveNotFound), invalid (InvalidDot),
    or otherwise not removed (Other). `activate` must be omitted or null;
    supplying a value results in a 400 response.

## Query parameters

- `relationship_type` 'Favorite' | 'Blocked' | 'Watched' — The type of relationship
- `relationship_type_group` 'MyCarriers' | 'CarrierHubNetwork' — The group of relationship types

## Request body

- NetworkCarrierBulkOperation[]
  - `action` 'Add' | 'Remove' | 'Update', required — The action to perform on the supplied DOT numbers
  - `dotNumbers` string[], required — The DOT numbers the action applies to.
  - `activate` boolean, nullable — The desired active state of the affected carriers. Required and non-null for Add and Update; must be omitted or null for Remove. See the schema description for full conditional rules.

## Response `200`

The bulk operations were processed. The response contains one result per operation group in the request, reporting affected and skipped DOT numbers.

- NetworkCarrierBulkOperationResult[]
  - `action` 'Add' | 'Remove' | 'Update', required — The action to perform on the supplied DOT numbers
  - `affected` string[], required — DOT numbers whose action was performed exactly as requested. For Add these are DOT numbers that were newly added to the requested list; for Update, those that were updated to the requested state; for Remove, those that were removed.
  - `adjusted` NetworkCarrierBulkAdjusted[], required — DOT numbers whose action was performed but altered from what was requested, with a reason and code for each. Currently used by Add when the broker's active-network limit is exceeded - the overflow DOTs are added to the inactive list and reported here. May be empty.
    - `dot` string, required — The DOT number whose action was adjusted
    - `reason` 'OverLimitAddedInactive' | 'Other', required — The reason an action on a DOT number was performed but altered from what was requested. Additional detail may be conveyed via the accompanying `code` field.
    - `code` string, required — A stable, machine-readable code providing additional detail beyond `reason`. New codes may be introduced without changes to `reason`.
  - `skipped` NetworkCarrierBulkSkipped[], required — DOT numbers that were not affected by the action, with a reason and code for each. For Add these are already present, invalid, or otherwise not added. For Update these are not present, invalid, or otherwise not updated. For Remove these are already absent, invalid, or otherwise not removed.
    - `dot` string, required — The DOT number that was skipped
    - `reason` 'InvalidDot' | 'AddDuplicate' | 'RemoveNotFound' | 'UpdateNotFound' | 'Other', required — The reason a DOT number was not affected by its bulk operation. Additional detail may be conveyed via the accompanying `code` field.
    - `code` string, required — A stable, machine-readable code providing additional detail beyond `reason`. New codes may be introduced without changes to `reason`.

## Other responses

- `400` — There was a problem with the data provided for this request.
- `401` — Authorization was denied for this request.
- `403` — Access to the requested resource is forbidden.
- `500` — A server side error occurred.

---

[API](https://skmtc.net/truckstop/apis/authentication.md) · [All operations](https://skmtc.net/truckstop/apis/authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/truckstop/authentication/revisions/da4fa196575d/schema)
