Carrier Authentication
To prevent abuse most shipping carriers require that you send a developer API key with each request. Since RocketShipIt connects from your servers directly to the shipping carrier, RocketShipIt requires these API credentials for each carrier you wish to connect to.
Please refer to the chart below and supply these parameters for each request.
Parameters
Code | Description | Required By |
---|---|---|
key | Carrier API key | UPS, FedEx, Asendia |
username | Carrier API Username | UPS, USPS, Stamps, DHL, Canada, Purolator, GSO, Asendia |
password | Carrier API Password | UPS, FedEx, Stamps, DHL, Canada, Purolator, GSO, OnTrac, Asendia |
account_number | Carrier shipping account number | UPS, FedEx, DHL, Canada, OnTrac, Asendia |
meter_number | Carrier shipping meter number | FedEx, Asendia |
{
"carrier": "GSO",
"action": "track",
"params": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD",
...
}
}
Obtaining API Keys
To use RocketShipIt you will need to sign up for a developer account with each shipping carrier you intend to use (except Stamps.com). Once you have signed up you will be given a developer key which you will use in each RocketShipIt request.
UPS
Start by registering for a UPS developer's account.
Once you have an account with UPS you will need to login to the UPS Online Tools website and request an XML access key. AKA Developer Key.
FedEx
To use the FedEx services you will register for a FedEx developer's account.
Once you have an account with FedEx you will need to login to the Developer Resource Center and request a Developer XML access key. AKA Developer Key.
Production label access
FedEx is a little behind other carriers, they're the only shipping carrier that still requires that you certify your API use before making production shippable labels.
Fortunately, this process is easy. You simply need to send FedEx some sample XML API request/responses along with a label. You can get this info from RocketShipIt by adding "debug": true,
to your requests.
If you need help passing certification please let us know as we are happy to help.
USPS
USPS services are separated into two different carriers, USPS and Stamps.com. USPS is usually used for interacting with Rates and Tracking only as it cannot produce postage paid labels. A Stamps.com account is required if you wish to produce labels that have postage. If you want to create a USPS label with a tracking number but without postage you can use USPS. We usually recommend using Stamps.com for all API requests if you need postage paid labels.
If you wish to use only the USPS rates and tracking services you don't need a Stamps.com account simply register for a USPS developer's account.
If you are using Stamps.com with RocketShipIt you do not need a Stamps.com developer account. You will use your production Stamps.com username and password to connect.
DHL
You can signup for the DHL XML-PI API at https://xmlportal.dhl.com/login.
If you run into any trouble please email xmlrequests@dhl.com and tell him that RocketShipIt sent you.
OnTrac
You can sign up for their API at: https://www.ontrac.com/onlineShipAPI.asp.
Purolator
You can sign up for their API at: https://eship.purolator.com/site/en/default.aspx
Authentication Failed Errors
"errors": [
{
"code": "1000",
"description": "Authentication Failed",
"type": "ERROR"
}
],
This error simply means that the carrier credentials you are using are invalid.
Make sure you are using the correct credentials for the environment you are using. FedEx for example has separate credentials for test/production mode. The RocketShipIt test
parameter toggles which endpoint RocketShipIt sends requests to. FedEx may also invalidate previously generated credentials when you create a new pair. So, if you generate a new pair you need to update your app to use the new set of credentials. In addition, FedEx requires additional authorization to use their label generation and address validation APIs. Your credentials may not grant access to these services. If you suspect this, try your credentials to fetch rates or track a package.
You can also verify that RocketShipIt is sending the correct credentials by inspecting the request send to the carrier by looking at the debug info.