PostNL Generate Return Label
Generates a return shipping label via the PostNL Labelling API (SOAP v2.2). Returns the label as a base64-encoded PDF along with the tracking number.
What it does
- Authenticates with the PostNL API using the provided API key.
- Sends a SOAP XML request to the Labelling endpoint with sender and receiver address details.
- Parses the XML response to extract the PDF label content and barcode (tracking number).
Notes
- The label is returned as a base64-encoded PDF string. Decode it to get the printable PDF.
- Uses PostNL's SOAP v2.2 Labelling endpoint (
https://api.postnl.nl/shipment/v2_2/label). - The Product Code Delivery determines the shipment type (e.g. 3085 for standard returns).
- Weight should be provided in grams.
Inputs
| Name | Type | Description |
|---|---|---|
| API Key | String (sensitive) | PostNL API key |
| Sender City | String | City of the sender (customer returning the item) |
| Sender Country Code | String | ISO country code of the sender |
| Sender House Number | String | House number of the sender |
| Sender Name | String | Name of the sender |
| Sender Street | String | Street of the sender |
| Sender Zip Code | String | Postal code of the sender |
| Collection Location | String | PostNL collection location code |
| Customer Code | String | PostNL customer code |
| Customer Number | String | PostNL customer number |
| Receiver City | String | City of the receiver (warehouse/return centre) |
| Receiver Company Name | String | Company name of the receiver |
| Receiver Country Code | String | ISO country code of the receiver |
| Receiver House Number | String | House number of the receiver |
| Receiver Street | String | Street of the receiver |
| Receiver Zip Code | String | Postal code of the receiver |
| Package Weight | String | Weight in grams |
| Product Code Delivery | String | PostNL product code for the shipment type |
Outputs
| Name | Type | Description |
|---|---|---|
| Label Generated? | Boolean | Whether the return label was successfully generated |
| Return Label | String | Base64-encoded PDF label |
| Tracking Number | String | Barcode/tracking number for the shipment |
API reference
Updated about 1 month ago
Did this page help you?