PostNL
v0.3.1Create shipments, generate barcodes, track parcels, and find pickup locations via the PostNL API
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_barcode Generate Barcode
Generate a PostNL barcode for shipping. The barcode is required before creating a shipment. Types: 2S (mailbox parcel), 3S (domestic NL parcels), CC/CP/CD/CF (EU parcels), LA (EU letter), RI (registered international), UE (non-EU parcels).
| Parameter | Type | Description |
|---|---|---|
range | string | Customer code override (defaults to env POSTNL_CUSTOMER_CODE) |
serie | string | Barcode serie range |
type | string | Barcode type. 2S = mailbox parcel, 3S = domestic, CC = EU consumer parcel, CP = EU compact, CD = EU parcel, CF = EU bulk, LA = EU letter, RI = registered international, UE = non-EU |
create_shipment Create Shipment
Create a PostNL shipment and generate a shipping label. Requires a barcode (use generate_barcode first), sender address (AddressType 02), and receiver address (AddressType 01). Returns a PDF label as base64. Common product codes: 3085 (standard), 3385 (stated address only), 3090 (neighbour + return), 3087 (extra cover), 3089 (signature on delivery), 3533/3534 (pickup point). Evening delivery: use product option {Characteristic: '118', Option: '006'} with a DeliveryDate. WARNING: Creating a shipment incurs shipping costs. Always confirm with the user before calling this tool.
| Parameter | Type | Description |
|---|---|---|
addresses * | array | Array of addresses. Must include sender (AddressType 02) and receiver (AddressType 01) |
barcode * | string | The barcode for this shipment (use generate_barcode to create one) |
confirm | boolean | Confirm the shipment immediately (true) or save as concept (false) |
contacts | array | Contact information for notifications |
customs | object | Customs information (required for international shipments) |
deliveryDate | string | Requested delivery date (format: dd-MM-yyyy HH:mm:ss) |
dimension | object | Package dimensions |
printerType | string | Label output format |
productCodeDelivery | string | Product code: 3085 (standard), 3385 (evening), 3090 (pickup), 3087 (extra@home), 3089 (signature) |
productOptions | array | Additional product options |
reference | string | Your reference for this shipment |
remark | string | Remark for the shipment |
get_shipment_status Get Shipment Status
Track a PostNL shipment by barcode. Returns the current status, expected delivery date, and status history of the shipment.
| Parameter | Type | Description |
|---|---|---|
barcode * | string | The PostNL barcode/tracking number of the shipment |
get_delivery_date Get Delivery Date
Calculate the expected delivery date for a shipment based on the shipping date, postal code, and delivery options. Useful for showing customers when they can expect their parcel.
| Parameter | Type | Description |
|---|---|---|
postalCode * | string | Destination postal code (Dutch format: 1234AB) |
shippingDate * | string | Shipping date in format dd-MM-yyyy HH:mm:ss (e.g. '29-06-2024 14:00:00') |
city | string | Destination city |
countryCode | string | Destination country code (ISO 3166-1 alpha-2) |
cutOffTime | string | Cut-off time for same-day processing (format: HH:mm:ss) |
houseNr | string | Destination house number |
houseNrExt | string | House number extension |
options | array | Delivery options: Daytime, Evening, Morning, Noon, Sunday, Sameday |
originCountryCode | string | Origin country code (ISO 3166-1 alpha-2) |
shippingDuration | integer | Number of days for shipping (default depends on destination) |
get_delivery_options Get Delivery Options
Get available delivery time windows for a specific address and date range. Returns available timeframes including daytime, evening, and morning delivery options.
| Parameter | Type | Description |
|---|---|---|
endDate * | string | End date for the timeframe calculation (format: dd-MM-yyyy) |
postalCode * | string | Destination postal code (Dutch format: 1234AB) |
startDate * | string | Start date for the timeframe calculation (format: dd-MM-yyyy) |
allowSundaySorting | boolean | Allow Sunday sorting for delivery |
city | string | Destination city |
countryCode | string | Destination country code (ISO 3166-1 alpha-2) |
houseNrExt | string | House number extension |
houseNumber | integer | Destination house number |
options | array | Delivery options to query: Daytime, Evening, Morning, Noon, Sunday, Sameday |
street | string | Destination street name |
find_locations Find PostNL Locations
Find nearby PostNL pickup/drop-off points (post offices, parcel lockers, retail points). Search by postal code, city, coordinates, or a combination. Useful for finding the nearest place to drop off or collect a parcel.
| Parameter | Type | Description |
|---|---|---|
city | string | City to search in |
countryCode | string | Country code (ISO 3166-1 alpha-2) |
deliveryDate | string | Delivery date (format: dd-MM-yyyy) |
deliveryOptions | array | Filter by delivery options: PG (pickup), PGE (early pickup), PA (parcel automat) |
houseNumber | integer | House number |
latitude | number | Latitude for geo-search |
longitude | number | Longitude for geo-search |
openingTime | string | Required opening time (format: HH:mm:ss) |
postalCode | string | Postal code to search near (Dutch format: 1234AB) |
street | string | Street name |
get_location Get PostNL Location
Get detailed information about a specific PostNL location by its location code. Returns address, opening hours, available delivery options, and contact information.
| Parameter | Type | Description |
|---|---|---|
locationCode * | string | The PostNL location code |
retailNetworkID | string | Retail network ID (default: PNPNL-01 for PostNL Netherlands) |