{"swagger":"2.0","info":{"title":"Location API","version":"v2_1"},"host":"api-sandbox.postnl.nl","schemes":["https"],"basePath":"/shipment","produces":["application/json"],"paths":{"/v2_1/locations/nearest":{"get":{"summary":"Returns locations nearest to the supplied location.","parameters":[{"name":"apikey","in":"header","description":"Authenticate using your API key","required":true,"type":"string","pattern":"^[A-Za-z0-9]{32}$"},{"name":"CountryCode","in":"query","description":"The ISO2 country codes","required":true,"default":"NL","type":"string","enum":["NL","BE"]},{"name":"PostalCode","in":"query","description":"Zipcode of the address. Mandatory when no coordinates are entered","required":true,"default":"2132WT","type":"string","pattern":"^[0-9]{4}(\\s?[A-Z]{2})?$"},{"name":"City","in":"query","description":"City of the address","required":false,"type":"string","default":"Hoofddorp"},{"name":"Street","in":"query","description":"The street name of the delivery address","required":false,"type":"string","default":"Siriusdreef"},{"name":"HouseNumber","in":"query","description":"The house number of the delivery address","required":false,"default":42,"type":"integer","format":"int32"},{"name":"DeliveryDate","in":"query","description":"The date of the earliest delivery date. Format: dd-mm-yyyy Note: this date cannot be in the past, otherwise an error is returned.","required":false,"type":"string","default":"01-01-2999","pattern":"^[0-3]\\d-[0-1]\\d-[1-2]\\d{3}$"},{"name":"OpeningTime","in":"query","description":"Time of opening. Format: hh:mm:ss. This field will be used to filter the locations on opening hours.","required":false,"type":"string","default":"09:00:00","pattern":"^[0-2]\\d:[0-5]\\d(:[0-5]\\d)?$"},{"name":"DeliveryOptions","in":"query","description":"One or more delivery options (related to the product). See Guidelines on this page for possible values.","required":true,"default":"PG","type":"array","items":{"type":"string","enum":["PG","PGE"]}}],"responses":{"200":{"description":"Nearest locations","schema":{"type":"array","items":{"$ref":"#/definitions/Location"}}},"400":{"description":"Invalid request","schema":{"type":"array","items":{"$ref":"#/definitions/Error"}}}}}},"/v2_1/locations/nearest/geocode":{"get":{"summary":"Returns the nearest location from a given geolocation.","parameters":[{"name":"apikey","in":"header","description":"Authenticate using your API key","required":true,"type":"string","pattern":"^[A-Za-z0-9]{32}$"},{"name":"Latitude","in":"query","description":"The latitude of the location","default":52.2864669620795,"required":true,"type":"number"},{"name":"Longitude","in":"query","description":"The longitude of the location","default":4.68239055845954,"required":true,"type":"number"},{"name":"CountryCode","in":"query","description":"The ISO2 country codes","required":true,"type":"string","enum":["NL","BE"]},{"name":"DeliveryDate","in":"query","description":"The date of the earliest delivery date. Format: dd-mm-yyyy Note: this date cannot be in the past, otherwise an error is returned.","required":false,"type":"string","default":"01-01-2999","pattern":"^[0-3]\\d-[0-1]\\d-[1-2]\\d{3}$"},{"name":"OpeningTime","in":"query","description":"Time of opening. Format: hh:mm:ss. This field will be used to filter the locations on opening hours.","required":false,"type":"string","default":"09:00:00","pattern":"^[0-2]\\d:[0-5]\\d(:[0-5]\\d)?$"},{"name":"DeliveryOptions","in":"query","description":"One or more delivery options (related to the product). See Guidelines on this page for possible values.","required":true,"default":"PG","type":"array","items":{"type":"string","enum":["PG","PGE"]}}],"responses":{"200":{"description":"Nearest locations","schema":{"type":"array","items":{"$ref":"#/definitions/Location"}}},"400":{"description":"Invalid request","schema":{"type":"array","items":{"$ref":"#/definitions/Error"}}}}}},"/v2_1/locations/area":{"get":{"summary":"Find locations in an area specified by geolocations","parameters":[{"name":"apikey","in":"header","description":"Authenticate using your API key","required":true,"type":"string","pattern":"^[A-Za-z0-9]{32}$"},{"name":"LatitudeNorth","in":"query","description":"The coordinates of the north point of the area.","default":52.156439,"required":true,"type":"number"},{"name":"LongitudeWest","in":"query","description":"The coordinates of the west point of the area.","default":5.015643,"required":true,"type":"number"},{"name":"LatitudeSouth","in":"query","description":"The coordinates of the south point of the area.","default":52.017473,"required":true,"type":"number"},{"name":"LongitudeEast","in":"query","description":"The coordinates of the east point of the area.","default":5.065254,"required":true,"type":"number"},{"name":"CountryCode","in":"query","default":"NL","required":true,"type":"string","enum":["NL","BE"]},{"name":"DeliveryDate","in":"query","description":"The date of the earliest delivery date. Format: dd-mm-yyyy Note: this date cannot be in the past, otherwise an error is returned.","required":false,"type":"string","default":"01-01-2999","pattern":"^[0-3]\\d-[0-1]\\d-[1-2]\\d{3}$"},{"name":"OpeningTime","in":"query","description":"Time of opening. Format: hh:mm:ss. This field will be used to filter the locations on opening hours.","required":false,"type":"string","default":"09:00:00","pattern":"^[0-2]\\d:[0-5]\\d(:[0-5]\\d)?$"},{"name":"DeliveryOptions","in":"query","description":"The delivery options (timeframes) for which locations should be returned. See Guidelines","required":true,"default":"PG","type":"array","items":{"type":"string","enum":["PG","PGE"]}}],"responses":{"200":{"description":"Locations in area","schema":{"type":"array","items":{"$ref":"#/definitions/Location"}}},"400":{"description":"Invalid request","schema":{"type":"array","items":{"$ref":"#/definitions/Error"}}}}}},"/v2_1/locations/lookup":{"get":{"summary":"Returns location information of the supplied location code.","parameters":[{"name":"apikey","in":"header","description":"Authenticate using your API key","required":true,"type":"string","pattern":"^[A-Za-z0-9]{32}$"},{"name":"LocationCode","in":"query","description":"LocationCode information","default":"161503","required":true,"type":"string"},{"name":"RetailNetworkID","in":"query","description":"RetailNetworkID information. Always PNPNL-01 for Dutch locations. For Belgium locations use LD-01.","required":true,"default":"PNPNL-01","type":"string"}],"responses":{"200":{"description":"Location information","schema":{"$ref":"#/definitions/Location"}},"400":{"description":"Invalid request","schema":{"type":"array","items":{"$ref":"#/definitions/Error"}}}}}}},"definitions":{"Error":{"type":"object","properties":{"ErrorMsg":{"type":"string"},"ErrorNumber":{"type":"integer","format":"int32"}}},"Location":{"type":"object","properties":{"LocationCode":{"type":"integer","format":"int32"},"Name":{"type":"string"},"Distance":{"type":"integer","format":"int32"},"Latitude":{"type":"number","format":"float"},"Longitude":{"type":"number","format":"float"},"Address":{"type":"object","properties":{"Countrycode":{"type":"string","enum":["NL","BE"]},"Zipcode":{"type":"string","pattern":"^[0-9]{4}(\\s?[A-Z]{2})?$"},"HouseNr":{"type":"integer","format":"int32"},"Street":{"type":"string"},"City":{"type":"string"},"Remark":{"type":"string"}}},"DeliveryOptions":{"type":"array","items":{"type":"string","enum":["UL","PU","DO"]}},"OpeningHours":{"type":"object","properties":{"Monday":{"type":"string","pattern":"^[0-2][0-9]:[0-5][0-9]-$[0-2][0-9]:[0-5][0-9]$"},"Tuesday":{"type":"string","pattern":"^[0-2][0-9]:[0-5][0-9]-$[0-2][0-9]:[0-5][0-9]$"},"Wednesday":{"type":"string","pattern":"^[0-2][0-9]:[0-5][0-9]-$[0-2][0-9]:[0-5][0-9]$"},"Thursday":{"type":"string","pattern":"^[0-2][0-9]:[0-5][0-9]-$[0-2][0-9]:[0-5][0-9]$"},"Friday":{"type":"string","pattern":"^[0-2][0-9]:[0-5][0-9]-$[0-2][0-9]:[0-5][0-9]$"},"Saturday":{"type":"string","pattern":"^[0-2][0-9]:[0-5][0-9]-$[0-2][0-9]:[0-5][0-9]$"},"Sunday":{"type":"string","pattern":"^[0-2][0-9]:[0-5][0-9]-$[0-2][0-9]:[0-5][0-9]$"}}},"PartnerName":{"type":"string"},"PhoneNumber":{"type":"string"},"RetailNetworkID":{"type":"string"},"Saleschannel":{"type":"string"},"TerminalType":{"type":"string"}}}}}