API docs Endpoints
List and search your address book
Find saved addresses in the address book of your ParcelParcel account.
https://services.parcelparcel.com/partners-api/v1/address-bookExample request
Search the address book
curl --request GET 'https://services.parcelparcel.com/partners-api/v1/address-book?search=acme&country=US' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'const response = await fetch("https://services.parcelparcel.com/partners-api/v1/address-book?search=acme&country=US", {
method: "GET",
headers: {
"X-PP-API": "{YourAPIKey}@{YourAPISecret}",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.get(
"https://services.parcelparcel.com/partners-api/v1/address-book?search=acme&country=US",
headers={
"X-PP-API": "{YourAPIKey}@{YourAPISecret}",
"Content-Type": "application/json",
},
)
print(response.json())Tip: copy the cURL and paste it in Postman under Import, or straight into the URL bar of a new request. Postman fills in the method, headers and body for you. Replace {YourAPIKey}@{YourAPISecret} with your own API key and secret (use your sandbox key while testing), or import the whole Postman Collection.
This endpoint lists the addresses in the address book of your account. These are the same addresses you see under Address book in MyParcelParcel. You can search them, for example by company name or city.
You only see the addresses of your own account.
Use the id of an address to get one address, to update it, or as addressBookId when you create a shipment.
Header
Add the following headers:
| Name | Value |
|---|---|
Content-Type | application/json |
X-PP-API | {YourAPIKey}@{YourAPISecret} |
Don't have an API Key and API Secret yet? Check our Authentication page to see how to get them in under a minute.
Body
This endpoint does not need a request body. All filters are query parameters.
For example:
https://services.parcelparcel.com/partners-api/v1/address-book?search=acmehttps://services.parcelparcel.com/partners-api/v1/address-book?search=acme&country=US&page=1&perPage=50Query Parameters
All query parameters are optional and can be combined.
| Name | Type | Description |
|---|---|---|
search | string | Searches the company name, contact person, address line 1, zipcode, city and country name. |
country | string | Only addresses in this country. Use ISO 3166-1 alpha-2 codes (e.g. NL, DE, US). An unknown country code gives an empty list. |
page | integer | Page number. Defaults to 1. |
perPage | integer | Number of addresses per page. Defaults to 25, maximum 100. |
Response
The response body is a JSON object with the following elements:
| Name | Value | Comments |
|---|---|---|
data | (array) | The addresses on this page. An empty array if nothing matches. |
data.id | (int) | The id of the address. Use it as addressBookId in a shipment. |
data.company | (string | null) | Company name. |
data.contactPerson | (string | null) | Full name of the contact person. |
data.phone | (string | null) | Phone number. |
data.email | (string | null) | Email address. |
data.addressLine1 | (string) | First line of the street address. |
data.addressLine2 | (string | null) | Second line of the street address. |
data.zipcode | (string | null) | Postal code. |
data.city | (string) | City. |
data.stateOrProvince | (string | null) | State or province code, for example TX. |
data.country | (string) | ISO 3166-1 alpha-2 country code, for example NL. |
data.vatNumber | (string | null) | VAT number. |
data.eoriNumber | (string | null) | EORI number (used for customs clearance). |
data.defaultPickup | (bool) | true if this is the default pickup address of your account. |
meta.total | (int) | Total number of addresses that match your filters. |
meta.page | (int) | The current page number. |
meta.perPage | (int) | The number of addresses per page. |
The address fields have the same names as the addresses in List your shipments.
Status codes
| Status code | Meaning |
|---|---|
| 200 OK | The search worked. data is an empty array if no address matches. |
Examples
Don't know how to test these requests? Check our guide.
Request example - Search the address book
curl --location --request GET 'https://services.parcelparcel.com/partners-api/v1/address-book?search=acme&country=US' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'GET /partners-api/v1/address-book?search=acme&country=US HTTP/1.1
Host: services.parcelparcel.com
X-PP-API: {YourAPIKey}@{YourAPISecret}
Content-Type: application/jsonDon't forget to change the X-PP-API element in the header, or this request will not work. Leave out the query parameters to list all your addresses.
Response example - Addresses found (200)
{
"data": [
{
"id": 456,
"company": "Acme Inc.",
"contactPerson": "Jane Smith",
"phone": "+12125550100",
"email": "[email protected]",
"addressLine1": "350 5th Ave",
"addressLine2": null,
"zipcode": "10118",
"city": "New York",
"stateOrProvince": "NY",
"country": "US",
"vatNumber": null,
"eoriNumber": null,
"defaultPickup": false
}
],
"meta": {
"total": 1,
"page": 1,
"perPage": 25
}
}Response example - Nothing found (200)
{
"data": [],
"meta": {
"total": 0,
"page": 1,
"perPage": 25
}
}