Carrier accounts

The Shippo API uses carrier accounts to connect to carriers to use their services, such as purchasing a label. You can use the Shippo API to add, modify, and deactivate which carriers your Shippo account uses. Using the Shippo API, you can connect multiple carrier accounts giving you rates from multiple carriers when you create a shipment.

Shippo supports two types of carrier accounts.

  1. Shippo carrier account. These are Shippo’s accounts with specific carriers. Using Shippo carrier accounts you can purchase labels immediately, without creating your account with a carrier. The cost to purchase labels is billed through your Shippo account. Using Shippo carrier accounts you can benefit from discounts negotiated by Shippo.
  2. Your own carrier accounts. These are accounts that you have created yourself with a supported carrier. You can add your carrier account details to your Shippo account, allowing Shippo to manage your label creation. The cost of purchasing labels is billed through the account you created with your carrier.

Connecting Shippo carrier accounts

By default, you have access to Shippo's carrier accounts for U.S. outbound shipments to retrieve shipping rates and purchase labels. When Shippo adds new carrier accounts, they are automatically enabled on your account.

note

UPS requires Terms and Conditions to be accepted, so you must use the Shippo Web App and navigate to the Carriers Settings page and click "Activate Account" for UPS to view and accept the Terms and Conditions.

Connecting your own carrier account

You can connect your own carrier accounts using the Shippo Web App or through the API.

Follow this guide to learn about connecting your carriers using the Shippo API. Shippo supports all carriers listed below for your own carrier accounts.

To connect your carrier account to your Shippo account, you must create a carrier account object. Each carrier account has different properties that must be shared with Shippo. Refer to the list below to identify which properties are required for your chosen carrier.

Note

Before continuing, you must have created your account with your chosen carrier and obtained the required properties as listed below.

The Carrier Account object can be created (POST), modified or de-activated (PUT), or retrieved (GET). You can also list (GET) all accounts.

To connect your own carrier account and create a carrier account object, follow this example.

cURLRubyPythonPHPtypescriptJavaC#
Copy
Copied
curl https://api.goshippo.com/carrier_accounts/\
    -H "Authorization: ShippoToken <API_TOKEN>"\
    -d carrier="fedex"\
    -d account_id="<YOUR-FEDEX-ACCOUNT-NUMBER>"\
    -d parameters='{"first_name": "<YOUR_FIRST_NAME>", "last_name": "YOUR_LAST_NAME", "phone_number": "<YOUR_PHONE_NUMBER>", "from_address_st": "<YOUR_STREET_ADDRESS>", "from_address_city": "<YOUR_CITY>", "from_address_state": "<YOUR_STATE>", "from_address_zip": "<YOUR_ZIP>", "from_address_country_iso2": "<YOUR_COUNTRY>"}'
Copy
Copied
fedex_account = Shippo::CarrierAccount.create(
    :carrier => 'fedex',
    :account_id => '<YOUR-FEDEX-ACCOUNT-NUMBER>',
    :parameters => {:first_name => '<YOUR_FIRST_NAME>', :last_name => 'YOUR_LAST_NAME', :phone_number => '<YOUR_PHONE_NUMBER>', :from_address_st => '<YOUR_STREET_ADDRESS>', :from_address_city => '<YOUR_CITY>', :from_address_state => '<YOUR_STATE>', :from_address_zip => '<YOUR_ZIP>', :from_address_country_iso2 => '<YOUR_COUNTRY>'},
    :test => false,
    :active => true)
Copy
Copied
fedex_account = shippo_sdk.carrier_accounts.create(
    components.ConnectExistingOwnAccountRequest(
        carrier="fedex",
        account_id="<YOUR-FEDEX-ACCOUNT-NUMBER>",
        parameters={
            "first_name": "<YOUR_FIRST_NAME>",
            "last_name": "<YOUR_LAST_NAME>",
            "phone_number": "<YOUR_PHONE_NUMBER>",
            "from_address_st": "<YOUR_STREET_ADDRESS>",
            "from_address_city": "<YOUR_CITY>",
            "from_address_state": "<YOUR_STATE>",
            "from_address_zip": "<YOUR_ZIP>",
            "from_address_country_iso2": "<YOUR_COUNTRY>"
        },
        active=True
    )
)
Copy
Copied
$fedex_account = Shippo_CarrierAccount::create(array(
    'carrier' => 'fedex',
    'account_id' => '<YOUR-FEDEX-ACCOUNT-NUMBER>',
    'parameters' => array('first_name' => '<YOUR_FIRST_NAME>', 'last_name' => 'YOUR_LAST_NAME', 'phone_number' => '<YOUR_PHONE_NUMBER>', 'from_address_st' => '<YOUR_STREET_ADDRESS>', 'from_address_city' => '<YOUR_CITY>', 'from_address_state' => '<YOUR_STATE>', 'from_address_zip' => '<YOUR_ZIP>', 'from_address_country_iso2' => '<YOUR_COUNTRY>'),
    'test' => false,
    'active' => true
));
Copy
Copied
const fedExParameters: FedExConnectExistingOwnAccountParameters = {
    firstName: "<YOUR_FIRST_NAME>",
    lastName: "<YOUR_LAST_NAME>",
    phoneNumber: "<YOUR_PHONE_NUMBER>",
    fromAddressSt: "<YOUR_STREET_ADDRESS>",
    fromAddressCity: "<YOUR_CITY>",
    fromAddressState: "<YOUR_STATE>",
    fromAddressZip: "<YOUR_ZIP>",
    fromAddressCountryIso2: "<YOUR_COUNTRY>"
}
const fedExAccount = await shippo.carrierAccounts.create({
    carrier: CarriersEnum.Fedex.valueOf(),
    accountId: "<YOUR-FEDEX-ACCOUNT-NUMBER>",
    parameters: fedExParameters,
    test: true,
    active: true
});
Copy
Copied
HashMap<String, Object> accountMap = new HashMap<String, Object>();
accountMap.put("carrier", "fedex");
accountMap.put("account_id", "<YOUR-FEDEX-ACCOUNT-NUMBER>"); 
accountMap.put("parameters", new HashMap<String, Object>() {
    {
        put("first_name", "<YOUR_FIRST_NAME>");
        put("last_name", "YOUR_LAST_NAME");
        put("phone_number", "<YOUR_PHONE_NUMBER>");
        put("from_address_st", "<YOUR_STREET_ADDRESS>");
        put("from_address_city", "<YOUR_CITY>");
        put("from_address_state", "<YOUR_STATE>");
        put("from_address_zip", "<YOUR_ZIP>");
        put("from_address_country_iso2", "<YOUR_COUNTRY>");
    }
});
accountMap.put("test", Boolean.FALSE);
accountMap.put("active", Boolean.TRUE);

CarrierAccount fedex_account = CarrierAccount.create(accountMap);
Copy
Copied
CarrierAccount fedexAccount = await sdk.CarrierAccounts.CreateAsync(
    new ConnectExistingOwnAccountRequest()
    {
        Carrier = CarriersEnum.Fedex.Value(),
        AccountId = "<YOUR-FEDEX-ACCOUNT-NUMBER>",
        Parameters = ConnectExistingOwnAccountRequestParameters.CreateFedExConnectExistingOwnAccountParameters(
            new FedExConnectExistingOwnAccountParameters()
            {
                FirstName = "<YOUR_FIRST_NAME>",
                LastName = "<YOUR_LAST_NAME>",
                PhoneNumber = "<YOUR_PHONE_NUMBER>",
                FromAddressSt = "<YOUR_STREET_ADDRESS>",
                FromAddressCity = "<YOUR_CITY>",
                FromAddressState = "<YOUR_STATE>",
                FromAddressZip = "<YOUR_ZIP>",
                FromAddressCountryIso2 = "<YOUR_COUNTRY>",
            }
        ),
        Active = true,
        Test = false,
    }
);

The API will respond with the JSON serialized carrier account object:

Copy
Copied
{
    "account_id": "<YOUR-FEDEX-ACCOUNT-NUMBER>",
    "active": true,
    "carrier": "fedex",
    "object_id": "b741b99f95e841639b54272834bc478c",
    "object_owner": "shippotle@shippo.com",
    "parameters": {
        "first_name": "<YOUR_FIRST_NAME>",
        "last_name": "YOUR_LAST_NAME",
        "phone_number": "<YOUR_PHONE_NUMBER>",
        "from_address_st": "<YOUR_STREET_ADDRESS>",
        "from_address_city": "<YOUR_CITY>",
        "from_address_state": "<YOUR_STATE>",
        "from_address_zip": "<YOUR_ZIP>",
        "from_address_country_iso2": "<YOUR_COUNTRY>"
    },
    "test": false,
    "active": true,
    "is_shippo_account": false,
    "metadata": ""
}

Refer to our carrier capabilities for a full list of supported carriers and their capabilities.

Using carrier accounts in Shipments

You can specify which carrier accounts you want to use on a per-shipment basis by passing in each account's object_id in the shipment's carrier_accounts field as a list. If you don't specify which accounts to use, Shippo will use all your active accounts for this shipment.

cURLRubyPythonPHPtypescriptJavaC#
Copy
Copied
curl https://api.goshippo.com/shipments/\
    -H "Authorization: ShippoToken <API_TOKEN>"\
    -d address_from="d799c2679e644279b59fe661ac8fa488"\
    -d address_to="42236bcf36214f62bcc6d7f12f02a849"\
    -d parcels=["7df2ecf8b4224763ab7c71fae7ec8274"]\
    -d carrier_accounts=["b741b99f95e841639b54272834bc478c", "b741b99f95e841639b54272834bc478c" ]\
    -d async=false
Copy
Copied
shipment = Shippo::Shipment.create(
	:address_from => address_from,
	:address_to => address_to,
	:parcels => parcel,
	:carrier_accounts => ["b741b99f95e841639b54272834bc478c"],
	:async => false)
Copy
Copied
shipment = shippo_sdk.shipments.create(
    components.ShipmentCreateRequest(
        address_from=address_from,
        address_to=address_to,
        parcels=[parcel],
        carrier_accounts=['b741b99f95e841639b54272834bc478c'],
        async_=False
    )
)
Copy
Copied
$shipment = Shippo_Shipment::create(array(
    'address_from'=> $fromAddress,
    'address_to'=> $toAddress,
    'parcels'=> array($parcel),
    'carrier_accounts' => array('b741b99f95e841639b54272834bc478c'),
    'async' => false
));
Copy
Copied
const shipment = await shippo.shipments.create({
    addressFrom: addressFrom,
    addressTo: addressTo,
    parcels: [parcel],
    carrierAccounts: ['b741b99f95e841639b54272834bc478c'],
    async: false
});
Copy
Copied
HashMap<String, Object> shipmentMap = new HashMap<String, Object>();
shipmentMap.put("address_to", toAddressMap);
shipmentMap.put("address_from", fromAddressMap);
shipmentMap.put("parcels", parcelMap);
shipmentMap.put("carrier_accounts", new String[]{"b741b99f95e841639b54272834bc478c"});
shipmentMap.put("async", false);

Shipment shipment = Shipment.create(shipmentMap);
Copy
Copied
Shipment shipment = await sdk.Shipments.CreateAsync(
    new ShipmentCreateRequest()
    {
        AddressFrom = addressFrom,
        AddressTo = addressTo,
        Parcels = new List<Shippo.Models.Components.Parcels>() { parcel },
        CarrierAccounts = new List<string>() { "b741b99f95e841639b54272834bc478c" },
        Async = false,
    }
);

Filtering carrier accounts

You can filter carrier accounts by carrier and account_id:

cURLRubyPythonPHPtypescriptJavaC#
Copy
Copied
curl https://api.goshippo.com/carrier_accounts/?carrier=fedex\
    -H "Authorization: ShippoToken <API_TOKEN>"\
Copy
Copied
Shippo::CarrierAccount.all(:carrier => "fedex")
Copy
Copied
shippo_sdk.carrier_accounts.list(
    operations.ListCarrierAccountsRequest(
        carrier=components.CarriersEnum.FEDEX
    )
)
Copy
Copied
Shippo_CarrierAccount::all(array('carrier'=> 'fedex'))
Copy
Copied
shippo.carrierAccounts.list({ carrier: CarriersEnum.Fedex });
Copy
Copied
CarrierAccount.getByCarrier("fedex");
Copy
Copied
await sdk.CarrierAccounts.ListAsync(
    new ListCarrierAccountsRequest()
    {
        Carrier = CarriersEnum.Fedex,
    }
);

Account structure by carrier

Each carrier has its own type of fields. Browse the list below to find the required fields for the carriers you want to use.

APC Postal


Copy
Copied
{
    "carrier": "apc_postal",
    "account_id": "12345", // APC Postal Account ID
    "parameters": {
              "processing_site": "NJ" // APC Postal Processing Site
               },
    ...
}

APG


Copy
Copied
{
   "carrier": "apg",
   "account_id": "12345", // Unique identificator of account
   "parameters": {
       "account_id": "shippo", // APG Account username
       "password": "shippo", // APG Account password
       "sender_code": "sti.us.sender_code" // APG Sender Code
    }
}

Asendia


Copy
Copied
{
    "carrier": "asendia_us",
    "account_id": "123", // Asendia account number
    "parameters": {
        "asendia_user_login": "usertesting",  // Asendia user login
        "asendia_user_password": "1234512345",  // Asendia user password
        "ftp_username": "testtest",
        "ftp_password": "xyz123",
        "company_name": "Your Company Name", // Required (displays on manifest)
        "permit_no": "234"
    },
    ...
}

Australia Post


Australia Post eParcel

Copy
Copied
{
    "carrier": "australia_post",
    "account_id": "123456", // Australia Post account number
    "parameters": {
        "api_key": "yourapikey", // Australia Post API key
        "password": "testpass" // Australia Post password
    },
    ...
}

Australia Post MyPost

Copy
Copied
{
  "account_id": "12345",
  "carrier": "australia_post",
  "parameters": {
    "is_mypost": true,
    "merchant_token": "yourPartnerToken"
  },
  "test": false,
  "active": true
}

BetterTrucks


Copy
Copied
{
    "carrier": "better_trucks",
    "account_id": "100", // unique identifier of account
    "parameters": {
        "api_key": "XXXX-XXXXX-XXXXX",  // API Key provided by BetterTrucks
        "account_id": "100"  // Identifier for account
    },
    "test": false,
    "active": true
}

Canada Post


Copy
Copied
{
    "carrier": "canada_post",
    "account_id": "shippo_api", // Canada Post API username
    "parameters": {
        "api_password": "HipposDontLie!", // Canada Post API password
        "customer_number": "413781", // Canada Post customer number
        "contract_id": "910412", // Canada Post contract number (optional)
        "payment_method": "Account" // Payment method for account, 'CreditCard' or 'Account' (optional)
        "use_manifests": true // Indicates that shipments will be linked with a manifest (contract customers only; optional)
    },
    ...
}

CouriersPlease


Copy
Copied
{
    "carrier": "couriersplease",
    "account_id": "123456", // CouriersPlease account number
    "parameters": {
        "api_key": "yourapikey" // CouriersPlease API key
    },
    ...
}

Deutsche Post


Copy
Copied
{
    "carrier": "deutsche_post",
    "account_id": "test@test.com", // Deutsche Post username
    "parameters": {
        "password": "testpass" // Deutsche Post password
    },
    ...
}

DHL eCommerce


Copy
Copied
{
    "carrier": "dhl_ecommerce",
    "account_id": "dhl_ecommerce", // Custom account identifier
    "parameters": {
        "username": "HipposDontLie!", // DHL eCommerce client ID
        "password": "shipshippo", // DHL eCommerce client secret
        "pickup_no": "123123", // DHL eCommerce pickup number
        "facility_code": "23" // DHL eCommerce facility code
    },
    ...
}

DHL Express


Copy
Copied
{
    "carrier": "dhl_express",
    "account_id": "123456789", // DHL account number
    "parameters": {
        "password": "", // Password from DHL Express
        "site_id": "", // Site ID from DHL Express (from DHL account manager/rep or email)
        "payment_country": "US" // ISO2 code of the country associated with the account
    },
    "active": true,
    "is_shippo_account": false
}

DHL Germany


Copy
Copied
{
    "carrier": "dhl_germany",
    "account_id": "2222222222", // The first 10 digits of your DHL account number
    "parameters": {
        "business_customer_portal_username": "dhl_shippo", // DHL username for www.dhl-geschaeftskundenportal.de
        "business_customer_portal_password": "HipposDontLie!", // DHL password for www.dhl-geschaeftskundenportal.de
        "default_participation_code": "01", // The last 2 digits of your DHL account number
        "tracking_account": "978346", // DHL tracking account (optional)
        "tracking_password": "HipposAreBack!" // DHL tracking password (optional)
    },
    ...
}

DPD UK


Copy
Copied
{
  "carrier": "dpd_uk",
  "account_id": "abc123", // DPD UK Account Name
  "parameters": {
    "username": "USERNAME", // DPD UK Username
    "password": "PASSWORD" // DPD UK Password
  },
  ...
}

ePost Global


Copy
Copied
{
  "carrier": "rr_donnelley",
  "account_id": "1111",
  "parameters": {
    "processing_site": "LAX"
    "company_name": "Company"
  },
  ...
}

EVRi UK


Note

Hermes UK have changed their name to EVRi. To support existing customers already using this carrier, we have continued to use the hermes name in our API configuration.

Copy
Copied
{
    "carrier": "hermes_uk",
    "account_id": "hermes_account_1",
    "parameters": {
              "hermes_uk_api_user": "user-name",
              "hermes_uk_api_password": "1234qwerty",
              "hermes_uk_client_id": 123,
              "hermes_uk_client_name": "CompanyName",
              "hermes_uk_parcel_shop_api_user": "ABC1234",
              "hermes_uk_parcel_shop_api_password": "12345678"
               },
    ...
}

FedEx


Copy
Copied
{
  "carrier": "fedex",
  "account_id": "321123", //Fedex account number
  "parameters": {
    "first_name": "Hippo",  //Your first name
    "last_name": "Hippovich", // Your last name
    "phone_number": "1234567890", // Your phone number
    "from_address_st": "250 Union St", // Shipping address must match what you have on file with FedEx (see fedex.com profile)
    "from_address_city": "San Francisco",
    "from_address_state": "CA",
    "from_address_zip": "94133",
    "from_address_country_iso2": "US",
    "use_multi_factor_registration": true, //Determines use of the multi-factor registration workflow. If true, the account will be registered using the multi-factor registration workflow. If false, the account will be registered using the standard registration workflow.
    "verification_option": "SMS", //(optional) Determines the verification option to use for the account registration (Enum: SMS, EMAIL, CALL, INVOICE).
    "verification_pin": "12345", //(optional) The PIN to verify the account.
    "verification_invoice_number": "9922232", //(optional) The invoice number to verify the account.
    "verification_invoice_amount": "340", //(optional) The invoice amount to verify the account.
    "verification_invoice_date": "2024-03-09", //(optional) The invoice date to verify the account. In the format `YYYY-MM-DD`.
    "verification_invoice_currency": "12345" //(optional) The invoice currency to verify the account.
  },
  "active": true,
  "test": false
}

Globegistics


Copy
Copied
{
    "carrier": "globegistics",
    "account_id": "Name of this account", // The name of this account on Shippo
    "parameters": {
              "account_number": "123456", // Globegistics Account Number
              "api_key": "123456789", // Globegistics API Key
               },
    ...
}

GLS US


Copy
Copied
{
    "carrier": "gls_us",
    "account_id": "1111", // GLS US account number
    "parameters": {
    	"api_token": "your_account_pw", // GLS US account password
	"username": "your_account_username", // GLS US account username
    },
...
}

LaserShip


Copy
Copied
{
    "carrier": "lasership",
    "account_id": "01isf7yzmpsbfy02172gyu2ek78", // LaserShip API key
    "parameters": {
        "lasership_apiid": "c27908r07cc20r893270adsc0402", // LaserShip API ID
        "critical_pull_time": "16:00"
    },
    ...
}

Mondial Relay


Copy
Copied
{
    "carrier": "mondialrelay",
    "account_id": "9328271", // Mondial Relay merchant ID
    "parameters": {
        "key": "JBHOS29JH19N7V6SJ89MK10K" // Mondial Relay key
    },
    ...
}

OnTrac


Copy
Copied
{
    "carrier": "ontrac",
    "account_id": "37", // OnTrac account number
    "parameters": {
        "password": "testpass" // OnTrac provided password
    },
    ...
}

Purolator


Copy
Copied
    "carrier": "purolator",
    "account_id": "shippo_purolator", // Purolator account number
    "parameters": {
        "production_key": "345345", // Purolator production key
        "production_key_password": "abcdef" // Purolator production key password
    },
    ...
}

Royal Mail


Copy
Copied
{
    "carrier": "royal_mail_sf",
    "account_id": "royal_mail_sf_01",
    "parameters": {
        "client_id": "12345abcde-1234-abcd-1234-12345abcde",
        "client_secret": "dklasjdlkhasdasdshadkjshaksadjhgaskjda",
        "partner_token": "kdsjaoisdasdasdjbw"
    }
},
...

Sendle


Copy
Copied
{
    "carrier": "sendle",
    "account_id": "sendle_account_1",
    "parameters": {
              "sendle_id": "1234",
              "api_key": "123456789",
               },
    ...
}

Swyft


Copy
Copied
{
    "carrier": "swyft",
    "object_owner": "user@shippo.com",
    "account_id": "unique_account_id",
    "parameters": {
        "api_key": "11111-22222-33333-44444" // Swyft API Key
    },
    "test": false,
    "active": true,
    "is_shippo_account": false,
    "metadata": "Account Name",
    "carrier_name": "Swyft"
}

UDS


Copy
Copied
{
    "carrier": "uds",
    "account_id": "12345", // UDS Client ID
    "parameters": {
      "client_key": "grteehj54tjgf", // UDS Client Key
      "UDS_TRACK_API_USER_ID": "shippo", // UDS Username for tracking
      "UDS_TRACK_API_PASSWORD": "shippo", // UDS Password for tracking
    }
}

UPS


Copy
Copied
{
    "carrier": "ups",
    "active": true,
    "metadata": "UPS Account",
    "account_id": "myupsuser", // UPS user ID
    "parameters": {
        "account_number": "AB1234", // UPS account number
        "aia_country_iso2": "US",
        "billing_address_city": "San Francisco",
        "billing_address_country_iso2": "US",
        "billing_address_state": "CA",
        "billing_address_street1": "731 Market St",
        "billing_address_street2": "STE 200",
        "billing_address_zip": 94103,
        "collec_country_iso2": "US",
        "collec_zip": 94103,
        "company": "Shippo",
        "currency_code": "USD",
        "email": "hippo@shippo.com",
        "full_name": "Shippo Meister",
        "has_invoice": false,
        "invoice_controlid": 1234,
        "invoice_date": 20210529,
        "invoice_number": 1112234,
        "invoice_value": 11.23,
        "phone": 1112223333,
        "title": "Manager",
        "ups_agreements": true,
        "pickup_address_city": "San Francisco",
        "pickup_address_country_iso2": "US",
        "pickup_address_same_as_billing_address": false,
        "pickup_address_state": "CA",
        "pickup_address_street1": "731 Market St",
        "pickup_address_street2": "STE 200",
        "pickup_address_zip": "94103",
        "ups_agreements": true,
        "surepost": false, // Add Surepost rating (optional)
        "cost_center": "shippo", // Mail Innovations cost center (optional)
        "usps_endorsement": "3", // Mail Innovations USPS endorsement (optional)
        "customer_id": "1234", // Mail Innovations UPS customer ID (optional)
        "customer_guid": "1234-abcde" // Mail Innovations UPS customer GUID (optional)
    },
    "test": false
}

Veho


Copy
Copied
{
    "carrier": “veho”,
    "account_id": "Name of this account", // The name of this account on Shippo
    "parameters": {
              "api_key": "123456789", // Veho API Key
               },
    "test": false,
    "active": true,
}