For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Carts
        • Carts
        • Channels
        • Checkouts
        • Currencies
        • Customer Segmentation
        • Geography
        • Infrastructure Hosting
        • Inventory
        • Orders
        • Order Operations
        • Pickup
        • Pickup Methods
        • Pickup Options
        • Pricing
        • Price Lists
        • Promotions
        • Promotion Settings
        • Redirects
        • Scripts
        • Settings
        • Shipping
              • POSTCreate Carrier Connection
              • PUTUpdate Carrier Connection
              • DELDelete Carrier Connection
        • Sites
        • Subscribers
        • System Logs
        • Tax
        • Wishlists
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminManagementShippingV2Shipping Carrier

Create Carrier Connection

POST
https://api.bigcommerce.com/stores/:store_hash/v2/shipping/carrier/connection
POST
/stores/:store_hash/v2/shipping/carrier/connection
$curl -X POST https://api.bigcommerce.com/stores/store_hash/v2/shipping/carrier/connection \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "carrier_id": "auspost",
> "connection": {
> "auth_key": "yourAusPostAuthKey",
> "test_mode": false
> }
>}'
Creates a *Carrier Connection*. Carrier connections refer to specific settings required to connect to a specific shipping carrier. Each carrier requires your app to supply a unique set of properties/fields to establish a connection with that carrier. *Notes:* - There is no `GET` with this resource. It has `PUT`, `POST` and `DELETE`. * `PUT` is used to update. The connection can be updated by API. - Connections created here do not enable the shipping method. To enable the carrier for a shipping zone, use the Shipping Methods API. - The Carrier Connection resource returns a 204 for both successful and unsuccessful attempts to connect. If a field is missing, it will return a 400. ### Australia Post PUT or POST example request: ```json { "carrier_id" : "auspost", "connection" : { "auth_key" : "yourAusPostAuthKey", "test_mode" : false } } ``` DELETE example request: ```json { "carrier_id" : "auspost" } ``` #### Australia Post Connection Object – Properties Australia Post `PUT` or `POST` requests require all of the following properties. (These requests won’t be fulfilled unless these properties are valid.) `DELETE` requests require only a `carrier_id`. | Property | Type | Description | | - | - | - | | auth_key | string | Australia Post authorization key. | | test_mode | boolean | Whether or not to use Australia Post test-mode settings. Acceptable values are `true` or `false`. | ### Endicia USPS is connected through Endicia. PUT or POST example request: ```json { "carrier_id" : "endicia", "connection": { "account_id" : "yourEndiciaAccountId", "pass_phrase" : "yourEndiciaPassphrase" } } ``` DELETE example request: ```json { "carrier_id" : "endicia" } ``` #### Endicia Connection Object – Properties Endicia `PUT` or `POST` requests require all of the following properties. (These requests won’t be fulfilled unless these properties are valid.) `DELETE` requests require only a `carrier_id`. | Property | Type | Description | | - | - | - | | account_id | string | Endicia account ID. | | passphrase | string | Endicia passphrase. | ### FedEx PUT or POST example request: ```json { "carrier_id" : "fedex", "connection" : { "key" : "yourFedexKey", "password" : "yourFedexPassword", "account_number" : "yourFedexAccountNumber", "meter_number" : "yourFedexMeterNumber" } } ``` DELETE example request: ```json { "carrier_id" : "fedex" } ``` #### FedEx Connection Object – Properties FedEx `PUT` or `POST` requests require all of the following properties. (These requests won’t be fulfilled unless these properties are valid.) `DELETE` requests require only a `carrier_id`. | Property | Type | Description | | - | - | - | | key | string | FedEx account ID. | | password | string | FedEx passphrase. | | account_number | string | FedEx account number. | | meter_number | string | FedEx meter number. | ### Royal Mail PUT or POST example request: ```json { "carrier_id" : "royalmail", "connection" : { } } ``` DELETE example request: ```json { "carrier_id" : "royalmail" } ``` #### Royal Mail Connection Object - Properties Royal Mail has no connection object properties. ### Shipping Provider API Please note that this endpoint is not intended for adding connection settings. Its purpose is solely to establish a connection between your BigCommerce store and the carrier. If the carrier has no connection settings configured, please leave the connection property empty. However, if the carrier already has connection settings configured, you can utilize this endpoint to establish the connection using the existing connection properties. PUT or POST example request when your carrier is not configured with any connection settings: ```json filename="No connection settings configured" showLineNumbers copy { "carrier_id" : "carrier_{your_carrier_id}", "connection" : {} } ``` PUT or POST example request when your carrier is configured with connection settings: ```json filename="Connection settings configured" showLineNumbers copy { "carrier_id" : "carrier_{your_carrier_id}", "connection" : { "your_configured_key_1": "value_1", "your_configured_key_2": "value_2 } } ``` ### Zoom2U PUT or POST example request: ```json { "carrier_id" : "zoom2u", "connection" : { "auth_key" : "yourZoom2uAuthKey", "test_mode" : false } } ``` DELETE example request: ```json { "carrier_id" : "zoom2u" } ``` #### Zoom2U Connection Object – Properties Zoom2U `PUT` or `POST` requests require all of the following properties. (These requests won’t be fulfilled unless these properties are valid.) `DELETE` requests require only a `carrier_id`. | Property | Type | Description | | - | - | - | | auth_key | string | Zoom2U authorization key. | | test_mode | boolean | Whether or not to use Zoom2U test-mode settings. Acceptable values are `true` or `false`. |
Was this page helpful?
Previous

Update Shipping Settings per Channel

Next

Update Carrier Connection

Built with

Creates a Carrier Connection.

Carrier connections refer to specific settings required to connect to a specific shipping carrier. Each carrier requires your app to supply a unique set of properties/fields to establish a connection with that carrier.

Notes:

  • There is no GET with this resource. It has PUT, POST and DELETE.

    • PUT is used to update. The connection can be updated by API.
  • Connections created here do not enable the shipping method. To enable the carrier for a shipping zone, use the Shipping Methods API.

  • The Carrier Connection resource returns a 204 for both successful and unsuccessful attempts to connect. If a field is missing, it will return a 400.

Australia Post

PUT or POST example request:

1{
2 "carrier_id" : "auspost",
3 "connection" : {
4 "auth_key" : "yourAusPostAuthKey",
5 "test_mode" : false
6 }
7}

DELETE example request:

1{
2 "carrier_id" : "auspost"
3}

Australia Post Connection Object – Properties

Australia Post PUT or POST requests require all of the following properties. (These requests won’t be fulfilled unless these properties are valid.) DELETE requests require only a carrier_id.

PropertyTypeDescription
auth_keystringAustralia Post authorization key.
test_modebooleanWhether or not to use Australia Post test-mode settings. Acceptable values are true or false.

Endicia

USPS is connected through Endicia.

PUT or POST example request:

1{ "carrier_id" : "endicia",
2 "connection": {
3 "account_id" : "yourEndiciaAccountId",
4 "pass_phrase" : "yourEndiciaPassphrase"
5 }
6}

DELETE example request:

1{
2 "carrier_id" : "endicia"
3}

Endicia Connection Object – Properties

Endicia PUT or POST requests require all of the following properties. (These requests won’t be fulfilled unless these properties are valid.) DELETE requests require only a carrier_id.

PropertyTypeDescription
account_idstringEndicia account ID.
passphrasestringEndicia passphrase.

FedEx

PUT or POST example request:

1{
2 "carrier_id" : "fedex",
3 "connection" : {
4 "key" : "yourFedexKey",
5 "password" : "yourFedexPassword",
6 "account_number" : "yourFedexAccountNumber",
7 "meter_number" : "yourFedexMeterNumber"
8 }
9}

DELETE example request:

1{
2 "carrier_id" : "fedex"
3}

FedEx Connection Object – Properties

FedEx PUT or POST requests require all of the following properties. (These requests won’t be fulfilled unless these properties are valid.) DELETE requests require only a carrier_id.

PropertyTypeDescription
keystringFedEx account ID.
passwordstringFedEx passphrase.
account_numberstringFedEx account number.
meter_numberstringFedEx meter number.

Royal Mail

PUT or POST example request:

1{
2 "carrier_id" : "royalmail",
3 "connection" : {
4
5 }
6}

DELETE example request:

1{
2 "carrier_id" : "royalmail"
3}

Royal Mail Connection Object - Properties

Royal Mail has no connection object properties.

Shipping Provider API

Please note that this endpoint is not intended for adding connection settings.

Its purpose is solely to establish a connection between your BigCommerce store and the carrier. If the carrier has no connection settings configured, please leave the connection property empty. However, if the carrier already has connection settings configured, you can utilize this endpoint to establish the connection using the existing connection properties.

PUT or POST example request when your carrier is not configured with any connection settings:

filename="No connection settings configured" showLineNumbers copy
1{
2 "carrier_id" : "carrier_{your_carrier_id}",
3 "connection" : {}
4}

PUT or POST example request when your carrier is configured with connection settings:

filename="Connection settings configured" showLineNumbers copy
1{
2 "carrier_id" : "carrier_{your_carrier_id}",
3 "connection" : {
4 "your_configured_key_1": "value_1",
5 "your_configured_key_2": "value_2
6 }
7}

Zoom2U

PUT or POST example request:

1{
2 "carrier_id" : "zoom2u",
3 "connection" : {
4 "auth_key" : "yourZoom2uAuthKey",
5 "test_mode" : false
6 }
7}

DELETE example request:

1{
2 "carrier_id" : "zoom2u"
3}

Zoom2U Connection Object – Properties

Zoom2U PUT or POST requests require all of the following properties. (These requests won’t be fulfilled unless these properties are valid.) DELETE requests require only a carrier_id.

PropertyTypeDescription
auth_keystringZoom2U authorization key.
test_modebooleanWhether or not to use Zoom2U test-mode settings. Acceptable values are true or false.

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Information & Settingsmodifystore_v2_information
Information & Settingsread-onlystore_v2_information_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects an object.
carrier_idstringOptional
connectionobjectOptional

The connection object varies by carrier.

Response

Returns if request was successful.

Errors

400
Bad Request Error