# Update Carrier

The Update Carrier operation enables you to update a carrier account and specifies its usable capabilities. By default, all available services, parcel types, and special services provided by the carrier are accessible. With this API, you can specify only the capabilities (services, parcel types, special services) that should be available for Rate Shop and Create Shipment operations. If a shipment request attempts to use a capability not enabled through this API, an error will be returned.

Endpoint: PUT /api/v1/carrierAccounts/{carrierAccountID}
Version: 0.1
Security: bearerAuth

## Path parameters:

  - `carrierAccountID` (string, required)
    Unique identifier of carrier account created

## Header parameters:

  - `X-PB-Developer-Partner-ID` (string)

## Request fields (application/json):

  - `accountNumber` (string)
    Unique identifier of the account
    Example: 123338

  - `carrierID` (string)
    It defines the carrier ID, can be get from `Get Carriers API`
    Enum: "FEDEX", "UPS", "DHLEXP", "SPEEDEE", "NORATE"

  - `description` (string)
    It defines the carrier account name
    Example: FedEx Account

  - `parameters` (object)
    It lists the additional details required adding carrier account

  - `parameters.username` (string)
    Username for the account, required for DHL Express
    Example: abcjsk

  - `parameters.password` (string)
    Password for the account, required for DHL Express
    Example: *******

  - `parameters.accountAddress` (object)
    It includes the account address details

  - `parameters.accountAddress.addressLine1` (string)
    The addressLine1 can contain the Flat number, Building or Apartment Name/number (if any) or company name (if not residential).
    Example: 27 Watervw Dr

  - `parameters.accountAddress.city` (string)
    The name of the city or town to where the address belongs.
    Example: shelton

  - `parameters.accountAddress.state` (string)
    The State or Province of the address. For a US or Canadian address, it is the 2-letter state or province code.
    Example: CT

  - `parameters.accountAddress.postalCode` (string)
    The postal code or ZIP code of the address. For US addresses, use either the 5-digit or 9-digit ZIP code in one of the following formats: '12345' or '12345-6789'. If you use a different format, such as 12345- or 123451234, will receive an error.
    Example: 06484

  - `parameters.accountAddress.countryCode` (string)
    This indicates the two-character ISO code of the source country from the ISO country list.
    Example: US

  - `parameters.accountAddress.email` (string)
    The email address of the sender. It can be person's email address or company email address (for non-residential).

  - `parameters.accountAddress.company` (string)
    This indicates the name of the company, in case if  address is not residential.

  - `parameters.accountAddress.name` (string)
    Name of the sender to which this address points.

  - `parameters.accountAddress.phone` (string)
    This is sender's phone number. Enter the digits with or without spaces or hyphens. The maximum characters for Phone number is 10 digits.

  - `parameters.contactAddress` (object)
    It includes the contact address details

  - `parameters.contactAddress.addressLine1` (string)
    The addressLine1 can contain the Flat number, Building or Apartment Name/number (if any) or company name (if not residential).
    Example: 27 Watervw Dr

  - `parameters.contactAddress.city` (string)
    The name of the city or town to where the address belongs.
    Example: shelton

  - `parameters.contactAddress.state` (string)
    The State or Province of the address. For a US or Canadian address, it is the 2-letter state or province code.
    Example: CT

  - `parameters.contactAddress.postalCode` (string)
    The postal code or ZIP code of the address. For US addresses, use either the 5-digit or 9-digit ZIP code in one of the following formats: '12345' or '12345-6789'. If you use a different format, such as 12345- or 123451234, will receive an error.
    Example: 06484

  - `parameters.contactAddress.countryCode` (string)
    This indicates the two-character ISO code of the source country from the ISO country list.
    Example: US

  - `parameters.contactAddress.email` (string)
    The email address of the sender. It can be person's email address or company email address (for non-residential).

  - `parameters.contactAddress.company` (string)
    This indicates the name of the company, in case if  address is not residential.

  - `parameters.contactAddress.name` (string)
    Name of the sender to which this address points.

  - `parameters.contactAddress.phone` (string)
    This is sender's phone number. Enter the digits with or without spaces or hyphens. The maximum characters for Phone number is 10 digits.

  - `parameters.hubID` (string)
    It defines FedEx Smartpost hub ID, required only for FedEx Smartpost account, it can be referred from response of `Get FedEx Smartpost hub details`
    Example: 1544

  - `parameters.invoiceAmount` (string)
    It defines the invoice amount ,Only for UPS acccount
    Example: 2121

  - `parameters.invoiceControlID` (string)
    It defines the invoice controlID ,Only for UPS acccount
    Example: 123D

  - `parameters.invoiceDate` (string)
    It defines the date of the invoice in the format YYYYMMDD., Only for UPS account
    Example: 20201203

  - `parameters.invoiceNumber` (string)
    It defines the invoice number ,Only for UPS acccount
    Example: saas212121

  - `parameters.hostName` (string)
    It is required for SpeeDee. Manifest Details are provided by the carrier and these are required for end-of-day manifesting. Please contact your carrier relationship person for more details
    Example: gppprt2ftp-ext.test.com

  - `parameters.manifestUserId` (string)
    It is required for SpeeDee. Manifest Details are provided by the carrier and these are required for end-of-day manifesting. Please contact your carrier relationship person for more details
    Example: testuser

  - `parameters.manifestPassword` (string)
    It is required for SpeeDee. Manifest Details are provided by the carrier and these are required for end-of-day manifesting. Please contact your carrier relationship person for more details
    Example: testpassword

  - `parameters.manifestPath` (string)
    It is required for SpeeDee. Manifest Details are provided by the carrier and these are required for end-of-day manifesting. Please contact your carrier relationship person for more details
    Example: /in

  - `parameters.capabilities` (object)
    Defines the allowed capabilities for this carrier account. By default, all
available services, parcel types, and special services of the carrier are accessible.
If you specify capabilities here, only the selected ones can be used in Rate Shop
and Create Shipment APIs. Any attempt to use capabilities not listed will result in an error.
> Note: Support for this capability in the Create Shipment API is under active development. It is targeted for this release, but availability and behavior may change before general availability.

  - `parameters.capabilities.services` (array)
    List of enabled services for this carrier account.
    Example: ["NDA"]

  - `parameters.capabilities.parcelTypes` (array)
    List of enabled parcel types for this carrier account.
    Example: ["LTR"]

  - `parameters.capabilities.specialServices` (array)
    List of enabled special services for this carrier account.
    Example: ["INS"]

## Response 200 fields (application/json):

  - `carrierAccountID` (string)
    Unique identifier of carrier account created
    Example: abc3849

  - `accountNumber` (string)
    Unique identifier of the account
    Example: 123338

  - `carrierID` (string)
    It defines the carrier ID, can be get from `Get Carriers API`
    Enum: "FEDEX", "UPS", "DHLEXP"

  - `description` (string)
    It defines the carrier account name
    Example: FedEx Account

  - `carrierAccountType` (string)
    This defines carrier account type
    Example: Shipping

  - `provisioningType` (string)
    It defines the provisioning method
    Example: API

  - `parameters` (object)
    It lists the additional details required adding carrier account

  - `parameters.username` (string)
    Username for the account, required for DHL Express
    Example: abcjsk

  - `parameters.accountAddress` (object)
    It includes the account address details

  - `parameters.accountAddress.addressLine1` (string)
    The addressLine1 can contain the Flat number, Building or Apartment Name/number (if any) or company name (if not residential).
    Example: 27 Watervw Dr

  - `parameters.accountAddress.city` (string)
    The name of the city or town to where the address belongs.
    Example: shelton

  - `parameters.accountAddress.state` (string)
    The State or Province of the address. For a US or Canadian address, it is the 2-letter state or province code.
    Example: CT

  - `parameters.accountAddress.postalCode` (string)
    The postal code or ZIP code of the address. For US addresses, use either the 5-digit or 9-digit ZIP code in one of the following formats: '12345' or '12345-6789'. If you use a different format, such as 12345- or 123451234, will receive an error.
    Example: 06484

  - `parameters.accountAddress.countryCode` (string)
    This indicates the two-character ISO code of the source country from the ISO country list.
    Example: US

  - `parameters.accountAddress.email` (string)
    The email address of the sender. It can be person's email address or company email address (for non-residential).

  - `parameters.accountAddress.company` (string)
    This indicates the name of the company, in case if  address is not residential.

  - `parameters.accountAddress.name` (string)
    Name of the sender to which this address points.

  - `parameters.accountAddress.phone` (string)
    This is sender's phone number. Enter the digits with or without spaces or hyphens. The maximum characters for Phone number is 10 digits.

  - `parameters.contactAddress` (object)
    It includes the contact address details

  - `parameters.contactAddress.addressLine1` (string)
    The addressLine1 can contain the Flat number, Building or Apartment Name/number (if any) or company name (if not residential).
    Example: 27 Watervw Dr

  - `parameters.contactAddress.city` (string)
    The name of the city or town to where the address belongs.
    Example: shelton

  - `parameters.contactAddress.state` (string)
    The State or Province of the address. For a US or Canadian address, it is the 2-letter state or province code.
    Example: CT

  - `parameters.contactAddress.postalCode` (string)
    The postal code or ZIP code of the address. For US addresses, use either the 5-digit or 9-digit ZIP code in one of the following formats: '12345' or '12345-6789'. If you use a different format, such as 12345- or 123451234, will receive an error.
    Example: 06484

  - `parameters.contactAddress.countryCode` (string)
    This indicates the two-character ISO code of the source country from the ISO country list.
    Example: US

  - `parameters.contactAddress.email` (string)
    The email address of the sender. It can be person's email address or company email address (for non-residential).

  - `parameters.contactAddress.company` (string)
    This indicates the name of the company, in case if  address is not residential.

  - `parameters.contactAddress.name` (string)
    Name of the sender to which this address points.

  - `parameters.contactAddress.phone` (string)
    This is sender's phone number. Enter the digits with or without spaces or hyphens. The maximum characters for Phone number is 10 digits.

  - `parameters.hubID` (string)
    It defines FedEx Smartpost hub ID, required only for FedEx Smartpost account
    Example: 1544

  - `parameters.invoiceAmount` (string)
    It defines the invoice amount ,Only for UPS acccount
    Example: 2121

  - `parameters.invoiceControlID` (string)
    It defines the invoice controlID ,Only for UPS acccount
    Example: 123D

  - `parameters.invoiceDate` (string)
    It defines the date of the invoice in the format YYYYMMDD., Only for UPS account
    Example: 20201203

  - `parameters.invoiceNumber` (string)
    It defines the invoice number ,Only for UPS acccount
    Example: saas212121

  - `parameters.capabilities` (object)
    The allowed capabilities added for this carrier account.

  - `parameters.capabilities.services` (array)
    List of enabled services added to this carrier account.
    Example: ["NDA"]

  - `parameters.capabilities.parcelTypes` (array)
    List of enabled parcel types added to this carrier account.
    Example: ["LTR"]

  - `parameters.capabilities.specialServices` (array)
    List of enabled special services added to this carrier account.
    Example: ["INS"]

  - `permission` (object)
    Permission details that define access control for this carrier account.

  - `permission.permissionByEntity` (string)
    Entity or scope for which the permission applies.
    Example: ORG

  - `permission.permissionByValue` (string)
    Specific value tied to the entity that determines permission. Can be null if not applicable.
    Example: 12345

## Response 400 fields (application/json):

  - `errors` (array)

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

  - `errors.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: Error while getting rates for carrier with carrierAccount eRMnRx4mzPP.

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

  - `errors.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.

  - `errors.additionalParameters` (array)

## Response 401 fields (application/json):

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

