ParcelParcelAPI docs

API docs Endpoints

Get an address

Markdown

Get one saved address from the address book of your ParcelParcel account.

GEThttps://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'

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.

Add the following headers:

NameValue
Content-Typeapplication/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:

NameValueComments
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 codeMeaning
200 OKThe address is in the response.
404 Not FoundWe 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'

Don't forget to change the X-PP-API element in the header, or this request will not work.

Response example - Address found (200)

JSON
{
  "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)

JSON
"Address not found"