# Get Carrier Accounts

The operation retrieves onboarded carriers with their Carrier Account IDs, which uniquely identify multiple accounts of the same carrier.
**Note:** To receive a paginated response, provide both the optional `page` and `size` query parameters. Else, the API returns all carrier accounts in response as a default behavior.

Endpoint: GET /api/v1/carrierAccounts
Version: 1.0.0
Security: bearerAuth

## Query parameters:

  - `page` (string)
    The page of the Shipments search result list.

  - `size` (string)
    The size/count of the searched result list.

## Header parameters:

  - `X-PB-Developer-Partner-Id` (string)
    The Developer Partner ID is assigned by PB to uniquely identify a Developer's strategic business partners. If the developer is the sole business partner, this field isn't required.

  - `X-PB-LocationId` (string)
    When the `X-PB-LocationId` header is provided, the API returns only the carrier accounts associated with the specified Location ID. If the header is not provided, API will return all carrier accounts.

## Response 200 fields (application/json):

  - `pageInfo` (object)

  - `pageInfo.total` (integer)
    Defines Total number of records.
    Example: 78

  - `pageInfo.pages` (integer)
    Defines Total number of pages.
    Example: 8

  - `pageInfo.page` (integer)
    Defines Current page number.
    Example: 1

  - `data` (object)

  - `data.carrierAccounts` (array)

  - `data.carrierAccounts.carrierAccountId` (string)
    A unique identifier assigned to the specific carrier account.
    Example: abcd12

  - `data.carrierAccounts.carrierName` (string)
    Name of the carrier.
    Example: FedEx

## Response 400 fields (application/json):

  - `errorCode` (string)
    Error code(s) that appear due to HTTP  400- Invalid or Bad Request, e.g., validation-error.
    Example: validation_error

  - `errorDescription` (string)
    The HTTP 400 Bad Request response status code indicates that the server cannot process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
    Example: string

  - `additionalCode` (string)
    A unique identifier for the error, for example 1101055, 0100008, or 1021126.

  - `additionalInfo` (string)
    This is an additional information about the error. This error 'Invalid Request' might appear due to invalid dimension, weight, or serviceID, or if the information is missing.

  - `additionalParameters` (array)

## Response 401 fields (application/json):

  - `message` (string, required)
    This is HTTP 401 Unauthorized response status code, which indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.

## Response 500 fields (application/json):

  - `message` (string, required)
    This is HTTP 500 Internal Server Error response status code, which indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

