Skip to main content
POST
/
carrier_accounts
cURL
curl --location --request POST 'https://api.goshippo.com/carrier_accounts/' \
--header 'Authorization: ShippoToken {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "account_id": "string",
  "active": true,
  "carrier": "ups",
  "metadata": "UPS Account",
  "parameters": {
    "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",
    "company": "Shippo",
    "email": "hippo@shippo.com",
    "full_name": "Thorn Hall",
    "phone": "1112223333",
    "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
  },
  "test": false
}'
{
  "account_id": "****",
  "carrier": "usps",
  "active": true,
  "parameters": {},
  "carrier_name": "USPS",
  "is_shippo_account": false,
  "metadata": "<string>",
  "object_id": "6aa34d5f6865448fbb1ee93636e98999",
  "object_owner": "bob+22@gmail.com",
  "service_levels": [
    {
      "name": "Priority Mail Express",
      "token": "usps_priority_express",
      "supports_return_labels": true
    }
  ],
  "test": false
}

Authorizations

Authorization
string
header
default:ShippoToken shippo_test_d41a6f04796998570c521a50828eae8e3cccf0eb
required

API key authentication using the ShippoToken scheme. Format: Authorization: ShippoToken <API_TOKEN> Example: Authorization: ShippoToken shippo_live_abc123

Headers

SHIPPO-API-VERSION
string
default:2018-02-08

Optional string used to pick a non-default API version to use. See our API version guide.

Example:

"2018-02-08"

Body

application/json

Examples.

account_id
string
required
Example:

"321123"

carrier
string
required
Example:

"fedex"

parameters
Account parameters · object
required

An array of additional parameters for the account, such as e.g. password or token. Please check our carrier accounts guide for the parameters per carrier. To protect account information, this field will be masked in any API response. In the case of masked fields, they should be handled carefully.

Fields also must consider:

  • Not providing a fields in parameters will not result in a change to any configured value
  • Providing a value in a masked field with ****** (exactly 6 asterisks) will not change the configured value
  • Providing field with null will clear the configured value
  • Providing field with any other value will change the configured value and may affect the behavior of the account.
active
boolean
metadata
string
Example:

"FEDEX Account"

test
boolean
Example:

false

Response

Carrier account

account_id
string
required

Unique identifier of the account. Please check the carrier accounts tutorial page for the account_id per carrier.
To protect account information, this field will be masked in any API response.

Example:

"****"

carrier
string
required

Carrier token, see Carriers
Please check the carrier accounts tutorial page for all supported carriers.

Example:

"usps"

active
boolean

Determines whether the account is active. When creating a shipment, if no carrier_accounts are explicitly passed Shippo will query all carrier accounts that have this field set. By default, this is set to True.

parameters
Account parameters · object

An array of additional parameters for the account, such as e.g. password or token. Please check our carrier accounts guide for the parameters per carrier. To protect account information, this field will be masked in any API response. In the case of masked fields, they should be handled carefully.

Fields also must consider:

  • Not providing a fields in parameters will not result in a change to any configured value
  • Providing a value in a masked field with ****** (exactly 6 asterisks) will not change the configured value
  • Providing field with null will clear the configured value
  • Providing field with any other value will change the configured value and may affect the behavior of the account.
carrier_name
any

Carrier name, see Carriers

Example:

"USPS"

is_shippo_account
boolean
Example:

false

metadata
string
object_id
string

Unique identifier of the carrier account object.

Example:

"6aa34d5f6865448fbb1ee93636e98999"

object_owner
string

Username of the user who created the carrier account object.

Example:

"bob+22@gmail.com"

service_levels
object[]
test
boolean

Indicates whether the object has been created in test mode.

Example:

false