How does it work?
Using the Shippo API works exactly the same with a Platform Account as it did with your Shippo account before, except you will be making API calls for your customers instead of for yourself. To make an API call for your customer’s Shippo Account, add their Shippo Account ID to the header of the call with the key value pairSHIPPO-ACCOUNT-ID: <ShippoAccountID>.
NoteThis is different from making authorized API calls on behalf of your customers through an OAuth integration. In an OAuth integration, the experience is co-branded where your customers manage their own Shippo Accounts and have a direct billing relationship with Shippo. With a Platform Account integration, you fully manage your customers’ Shippo Accounts behind the scenes and they do not need to have any awareness of Shippo.
Using Managed Shippo Accounts
In this example you will learn how to do the following. Note: The examples assume you have migrated your Shippo Account to a Platform Account- Create a shippo account for your customer. This is a Shippo Account that you fully manage within your environment and it is opaque to your end customer.
- Add a carrier account. This enables the customer’s Shippo Account to request rates and generates labels from that carrier. You must do this for every customer’s Shippo Account.
- Create a Shipment and Generate rates.
- Purchase a label.
Create a Managed Shippo Account for your customer
Request:Create account request
Create account response
object_id is the customer’s Shippo Account ID. To make an API call for this account, set this ID in the SHIPPO-ACCOUNT-ID header of the call. In the following example, you will replace <ShippoAccountID> with this object_id.
Add a Carrier Account
For every customer’s Managed Shippo Account, you must enable at least one carrier account. When the shipping rates are generated for the customer’s Managed Shippo Account, only rates from enabled carriers are returned. To specify which Managed Shippo Account is being enabled with a carrier, use theobject_id of the account in the SHIPPO-ACCOUNT-ID header.
You have two options for enabling carrier accounts for your customer. You can use a Shippo carrier account that benefits from rates that Shippo have negotiated or you can use your own account that uses rates that you have agreed with a carrier.
Adding a Shippo carrier account
If you want your customers to use a Shippo carrier account, use the Add a Shippo carrier account endpoint. Request:Add a Shippo carrier account request
Add a Shippo carrier account response
Adding your own carrier account
If you have your own carrier account and want your customer’s Managed Shippo Account to use that account, use the Create a new carrier account endpoint. If your user has their own carrier account, you can also choose to add that account for them to use using the same endpoint.NoteThis step requires you to have your account set up with your preferred carrier. Depending on the carrier you choose, there may be different parameters required to enable that carrier for your Managed Shippo Account.
Use our carrier accounts guide to identify which parameters are required for your carrier.
Add your own carrier account request
Add your own carrier account response
Create a Shipment and generate Rates
To create a Shipment and generate a rate on behalf of a customer’s Managed Shippo Account, add theobject_id of the account in the SHIPPO-ACCOUNT-ID key value pair.
Request:
Create a Shipment request for a Managed Account
Create a Shipment for a Managed Account response
Purchase a label
Using a selected rate, you can now purchase a label. Request:Purchase a label for a Managed Account request
Purchase a label for a Managed Account response