ShipStation's Partner APIs allow platforms to manage individual ShipStation API accounts and make calls on their behalf. This workflow is useful if your customers are paying for their own shipping costs, as it supports the creation of individual account balances and provides logical separation for customer accounts.
In order to use some of the API calls outlined in this section, you will need a Partner Key. Partner Keys are provisioned by the ShipStation API team and are available on request. You will need to provide us an email address that will be associated with the partner key - this email address will be the default on all accounts and can be overridden on account creation. It will also be the primary contact email in case of technical issues where our team may need to get in touch.
You will be provided with two credentials: one for testing, and one for production. The accessible endpoints and functions will be identical for both credentials. However, account access is exclusive to the credential set being used. Credentials can be cycled on request.
The first step to access the ShipStation API as a partner is to create a ShipStation API account. An account created through the Partners API has full access to our production APIs, but limited access to the UI.
The following functions are available to manage the accounts created through the partners API:
- Get Account by ID
- Get Account by External ID
- List your Accounts
- Enable a ShipStation API Account
- Disable a ShipStation API Account
- Create ShipStation API Key
- Disable API Key
All calls to the ShipStation API will require the following two headers:
| Header Name | Description |
|---|---|
API-Key | This is your ShipStation Partner API key. See the Getting Started page for details. |
On-Behalf-Of | This is the Account ID of the ShipStation API account that you are operating on behalf of. |
You can enable the UPS Ground Saver service for users who have already established their UPS account. This step is only required if the UPS account was created prior to UPS Ground Saver being enabled for your platform. This allows them to access this cost-effective shipping option for residential shipping.
PUT /v1/connections/carriers/ups_walleted/{carrier_id}/settings HTTP/1.1
Host: api.shipengine.com
API-Key: __YOUR_SHIPENGINE_PARTNER_API_KEY__
On-Behalf-Of: __PAYPAL_ACCOUNT_ID__
Content-Type: application/json
{
"nickname": "My UPS Account",
"is_primary_account": true,
"use_ground_freight_pricing": false,
"enable_ground_saver_service": true
}Labels created via the account balance are pre-paid, meaning that there must be enough funds in the balance to create the label. To check the current balance, List Carriers - Connect carrier accounts.
POST /v1/connections/carriers/stamps_com/::carrier_id/add_funds HTTP/1.1
Host: api.shipengine.com
API-Key: __PARTNER_API_KEY_HERE__
On-Behalf-Of: se-123456
Content-Type: application/json
{
"currency": "usd",
"amount": 10.0
}
{
"balance": {
"amount": {
"balance": 14.0400,
"postage_payment_id": "297745C13332000"
},
"currency": "usd"
},
"transaction_id": "6622440"
}Some merchants prefer not to manually manage their balance. To facilitate a more seamless workflow we offer the option to setup auto-funding for the account balance, which will add funds when the balance gets below a certain threshold. Please note the balance must start at an amount over the low_balance_purchase_threshold to trigger auto-funding.
POST /v1/carriers/::carrier_id/auto_funding HTTP/1.1
Host: api.shipengine.com
API-Key: __PARTNER_API_KEY_HERE__
On-Behalf-Of: se-123456
Content-Type: application/json
{
"is_enabled":true,
"low_balance_purchase_threshold": {
"currency":"usd",
"amount":"10.0"
},
"purchase_amount":{
"currency":"usd",
"amount":"100.0"
},
"maximum_purchases_per_day":10
}