API docs Getting started
Authentication
Get your API key and secret, and test safely with your sandbox key.
Every request needs your API Key and API Secret. You find both in MyParcelParcel, together with a separate sandbox pair to test your integration without booking real shipments.
Get your API key and secret
- Log in to MyParcelParcel. Don't have an account? Create one here.
- Click Settings at the bottom of the menu on the left.
- Under Developers, click API keys. You can also go there directly: my.parcelparcel.com/account/partners-api.
- No credentials yet? Click Generate API credentials.
- Click Copy next to your API Key and API Secret.
Don't see API keys under Settings?
API access is for business accounts. If API keys is missing under Developers, email [email protected] and we'll check your account.
Put your credentials in the request
Add your API Key and API Secret to the X-PP-API header of every request, with an @ between them:
| Name | Value |
|---|---|
X-PP-API | {YourAPIKey}@{YourAPISecret} |
So it could look something like this:
X-PP-API: nube0b:1pdahsptd10kw848cccgkckogcgss0@0gw0ssw4-g4ks00ko-48w0sosc-cckwTest with your sandbox key
Under Test your integration on the same page, click Generate sandbox key. You get a second key pair; the sandbox API Key starts with sbx_. Use it in the X-PP-API header exactly like your live key.
With the sandbox key:
- Rates, tracking, duties and all other calls use live data, so you test against real prices and transit times.
- Shipments are never sent to the carrier. You can create drafts and even book with
bookShipment: true: you get a sample label and a test tracking number (SANDBOXfollowed by the shipment id), and nothing is charged. - Cancelling a sandbox shipment only cancels it in your account.
- Sandbox shipments show up in API shipments in MyParcelParcel with a Sandbox badge.
A booking made with the sandbox key returns the same response as a real booking, with "sandbox": true:
{
"errors": [],
"message": "Your shipment has been booked (sandbox: not sent to the carrier)",
"data": {
"id": 1588448,
"status": "created_at_carrier",
"carrier": "FedEx",
"product": "FedEx - FedEx Economy",
"productId": 79,
"price": 86.41,
"trackingNumber": "SANDBOX1588448",
"trackingUrl": null,
"labels": "=== base64 encoded sample label ===",
"sandbox": true
}
}When your integration works, swap the sandbox key for your live key. Nothing else changes.
Rotate your credentials
Click Rotate credentials to get a new key and secret, for example on a routine schedule or right away if your credentials may have been exposed. Your current pair stops working immediately, and the new pair is shown only once, so copy it straight away and update your integration. The sandbox pair has its own Rotate sandbox key button.
Test your authentication
The quickest test is Check your API key: it returns the email address of the account your key belongs to, or X-PP-API header not valid if something is wrong. After that, try Compare shipping options with your sandbox key, or import the whole Postman Collection.