API docs Endpoints
Get an address
Get one saved address from the address book of your ParcelParcel account.
https://services.parcelparcel.com/partners-api/v1/address-book/{addressId}Example request
Get an address
curl --request GET 'https://services.parcelparcel.com/partners-api/v1/address-book/456' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'const response = await fetch("https://services.parcelparcel.com/partners-api/v1/address-book/456", {
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/456",
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 returns one address from the address book of your account.
Replace {addressId} with the id of the address. You get this id when you list your addresses or save an address.
You can only get addresses of your own account. An address of another account gives the same 404 as an unknown id.
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.
Response
The response body is the address, a JSON object with the following elements:
| Name | Value | Comments |
|---|---|---|
id | (int) | The id of the address. Use it as addressBookId in a shipment. |
company | (string | null) | Company name. |
contactPerson | (string | null) | Full name of the contact person. |
phone | (string | null) | Phone number. |
email | (string | null) | Email address. |
addressLine1 | (string) | First line of the street address. |
addressLine2 | (string | null) | Second line of the street address. |
zipcode | (string | null) | Postal code. |
city | (string) | City. |
stateOrProvince | (string | null) | State or province code, for example TX. |
country | (string) | ISO 3166-1 alpha-2 country code, for example NL. |
vatNumber | (string | null) | VAT number. |
eoriNumber | (string | null) | EORI number (used for customs clearance). |
defaultPickup | (bool) | true if this is the default pickup address of your account. |
Status codes
| Status code | Meaning |
|---|---|
| 200 OK | The address is in the response. |
| 404 Not Found | We could not find the address in your account. Make sure that the addressId is correct. |
Examples
Don't know how to test these requests? Check our guide.
Request example - Get an address
curl --location --request GET 'https://services.parcelparcel.com/partners-api/v1/address-book/456' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'GET /partners-api/v1/address-book/456 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.
Response example - Address found (200)
{
"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
}Response example - Address not found (404)
"Address not found"