Location
Documentation
Documentation
Method: GET
Path | Description |
/locations/nearest | Returns locations nearest to the supplied location. |
/locations/area | Returns locations within the supplied area. |
/locations/lookup | Returns location information of the supplied location code. |
Interface version | 2_1 |
Sandbox endpoint | https://api-sandbox.postnl.nl/shipment/v2_1/locations |
Sandbox wsdl | https://api-sandbox.postnl.nl/shipment/v2_1/locations/soap.wsdl |
Sandbox swagger | https://api-sandbox.postnl.nl/shipment/v2_1/locations/swagger.json |
Production endpoint | https://api.postnl.nl/shipment/v2_1/locations |
Production wsdl | https://api.postnl.nl/shipment/v2_1/locations/soap.wsdl |
Production swagger | https://api.postnl.nl/shipment/v2_2/locations/swagger.json |
REST:
API
| Version | Release Date | Status | Release Notes | Schema Changes |
Location | 2_1 | May 10, 2016 | Current version | IN COMPARISON TO THE 2_0 SOAP VERSION,
| N/A |
API
| Version | Release Date | Status | Release Notes | Schema Changes |
Location | 1_0 | Jul 22, 2013 | Not supported |
|
|
1_1 | Aug 21, 2014 | Supported | Different namespaces
The operation GetLocationsInArea has been updated with new request properties:
The operation GetBLSLocation has been removed The operation GetLocation has been added The Location Type has been extended with international address properties. | Yes | |
2_0 | Aug 14, 2015 | Not supported | A number of new fields have been added to the data types. To access these new fields, a new webservice client has to be generated based on the new WSDL version.
| Yes | |
2_1 | May 10, 2016 | Current Version | The Location Type has been extended with PartnerLocationCodes (ResponseLocationCode). | No |
Difference between the methods
You can use the GetNearestLocation method if you want to show the nearest pick up points for the consumer based on their postal code or specific latitude/longitude coordinates combination. If you want to show a map with the nearest pick up points, then you can use the GetLocationInArea method. This provides you an overview of the nearest pick up points.
GetLocation can be used if you know the LocationCode. This method provides you with the information of the retailer. You can find the location code in the response of the GetNearestLocations and GetLocationsInArea. The RetailNetworkID is PNPNL-01, this code can be used for all Dutch locations.
Google Maps / GetLocationsInArea
If you want to show the pick up points through Google Maps, you will need to apply an API key of Google Maps. You can get find more information at the following site: https://developers.google.com/maps/.
The GetLocationsInArea method retrieves all locations in a specific area. When a map is displayed with Google Maps, a so-called "bounding box" of the given area can be requested. The Google Maps API then returns them in NorthWest/SouthEast (NW/SE) form that you can use to retrieve the locations.
Please note that the GetLocationsInArea method accepts the coordinates in NorthWest / Southeast (NW / SE) form. This can be converted as follows:
Code | Decscription |
PG | Pick up at PostNL location (in Dutch: Ophalen bij PostNL Locatie) |
Best practice
Integrate all three PostNL frontend webservices into your checkout and empower your customers to choose the delivery option that suits them best.
First use the Deliverydate webservice (Get deliverydate method) to determine the available and possible delivery date(s), based on your shipping date. Use the received date from this service as a starting point in the Timeframe webservice to show customers the possible day and time of arrival. In this way you avoid showing not possible deliverydates. The postal code that customers enter by placing their order, determine the timeframes that apply to their address.
Use the Location webservice to show the nearest pickup point(s) based on the postal code or coordinates of the customers. The location(s) can be shown in a map if you want to make it visually more appealing.
The (below) visual assets can be useful to create a delivery options frame in your checkout.
Visual assets
To show pins of PostNL locations in a map you can use the assets on this page. Here you can also find other useful icons.
Pickup at PostNL Location Belgium
If you deliver your parcels directly to pick up points in Belgium, some extra information is required for the Labelling API request.
DownPartnerID: Use the data from the Location API response; attribute RetailNetworkID.
DownPartnerLocation: Use the data from the Location API response; attribute LocationCode.
Error codes
Error codes have been specified in the below PDF file. Errors from the backend services will be caught and returned as standard API errors according to the generic error handling procedures in the API.
Attribute | Mandatory | Format | Description | Example |
Countrycode | M | String [2] | The ISO2 country codes Always NL for Dutch locations. For Belgium locations use BE. | NL |
Attribute | Mandatory | Format | Description | Example |
AllowSundaySorting | M | Boolean [true/false] | Whether or not the requesting party allows for Sunday sorting (which leads to delivery on Monday). | true |
DeliveryDate | M | Date [10] | The date of the earliest delivery date. Format: dd-mm-yyyy
Note: this date cannot be in the past, otherwise an error is returned. | 29-06-2016 |
DeliveryOptions | M | String [2-3] | One or more delivery options (related to the product). See Guidelines on this page for possible values. | PG |
Options | M | String [1-15] | The delivery options (timeframes) for which locations should
be returned. | Daytime |
OpeningTime | O | Time [8] | Time of opening. Format: hh:mm:ss. This field will be used to filter the locations on opening hours. | 09:00:00 |
Coordinates | O-M | Double [1-15] | The coordinates of the location.
Mandatory when postal code is empty. Latitude / Longitude. | 52.290344
4.7086662 |
City | O | String [0-35] | City of the address | Hoofddorp |
HouseNr. | O | String [0-35] | The house number of the delivery address | 42 |
HouseNrExt | O | String [0-35] | House number extension | A |
Postalcode | O-M | String [4-10] | Zipcode of the address
Mandatory when no coordinates are entered | 2132WT |
Street | O | String [0-95] | The street name of the delivery address | Siriusdreef |
Attribute | Mandatory | Format | Description | Example |
MessageID | M | String [1-12] | ID of the message. | 1 |
MessageTimeStamp | M | Datetime [19] | Date/time of sending the message. Format: dd-mm-yyyy hh:mm:ss | 29-06-2016 12:00:00 |
Attribute | Description | Example | ||
Area | Area of the address | Beukenhorst | ||
Buildingname | Name of the building of the address | AA | ||
City | City of the address | Hoofddorp | ||
Countrycode | The ISO2 country codes | NL | ||
Department | Specific department of a company | IT | ||
Doorcode | Door code of address | 123 | ||
Floor | Specific floor of a company | 4 | ||
HouseNr | Housenumber of the address | 10 | ||
HouseNrExt | House number extension | A | ||
Remark | Remark of the location | Dit is een Business Point. Post en pakketten die u op werkdagen vóór de lichtingstijd afgeeft, bezorgen we binnen Nederland de volgende dag. | ||
Street | The streetname of the address | Jacobus Spijkerdreef | ||
Zipcode | The zipcode of the address | 2132PZ |
Attribute | Mandatory | Format | Description | Example |
Deliveryoptions | One or more delivery options. See the Guidelines for possible values. | PG |
Attribute | Description | Example | ||
Distance | The distance from this location to the address entered in the request (in meters). | 355 | ||
Latitude | The latitude of the location | 52.2864669620795 | ||
LocationCode | LocationCode information | 173187 | ||
Longitude | The longitude of the location | 4.68239055845954 | ||
Name | Name of the location | Gamma | ||
Openingshours | Openinghours of the location, split by Day. | 08:00-18:30 | ||
PartnerName | Partnername of the location | PostNL | ||
PhoneNumber | Phone number of the location | 023-5576310 | ||
RetailNetworkID | The network ID used for this retail location | PNPNL-01 | ||
Saleschannel | The sales channel used for this location | PKT XL | ||
TerminalType | The terminal type used by this location | NRS |
Attribute | Description | Example | ||
Code | Code of the warning | 501 | ||
Description | Description of the warning | No locations found |
Attribute | Mandatory | Format | Description | Example |
Countrycode | M | String [2] | The ISO2 country codes | NL |
Attribute | Mandatory | Format | Description | Example |
DeliveryDate | M | Date [10] | The date of the earliest delivery date. Format: dd-mm-yyyy
Note: this date cannot be in the past, otherwise an error is returned. | 29-06-2016 |
DeliveryOptions | M | String [2-3] | The delivery options (timeframes) for which locations should
be returned. See Guidelines | PG |
Options | M | String [1-15] | The delivery options (timeframes) for which locations should
be returned. See Guidelines for possible values. | Daytime |
OpeningTime | O | Time [8] | Time of opening. Format: hh:mm:ss. This field will be used to filter the locations on opening hours. | 09:00:00 |
CoordinatesNorthWest | M | Double [1-15] | The coordinates of the north west point of the area.
Latitude / Longitude. | 52.156439
5.015643 |
CoordinatesSouthEast | M | Double [1-15] | The coordinates of the south east point of the area.
Latitude / Longitude. | 52.017473
5.065254 |
Attribute | Mandatory | Format | Description | Example |
MessageID | M | String [1-12] | ID of the message. | 1 |
MessageTimeStamp | M | Datetime [19] | Date/time of sending the message. Format: dd-mm-yyyy hh:mm:ss | 29-06-2016 12:00:00 |