Checkout

Documentation

The Checkout API combines the functionality of the DeliveryDate, Location and Timeframe API’s. So  you only need 1 API for showing all PostNL delivery options in your checkout. In this way it becomes easier to implement the delivery options and there is also less overhead in requesting the PostNL services by using this 3-in-1 API.

Why use the Checkout API?

Delivery options
This API provides the possible day(s) of delivery, timeframes and PostNL pickup locations to display in the checkout of a webshop. Based on the address of the customer, orderdate and specified delivery options, you get timeframes and nearest PostNL pickup locations in the response.

Customers convenience
Enhance your customer's online shopping experience by providing more control over the delivery of their purchased product. Integrate the PostNL frontend webservices into your checkout and empower your customers to choose the delivery option that suits them best.

More information and control 
Using the Checkout API gives your customers more information and control about the arrival of the parcels. But it is good to realize that it gives you, the webshop, also a responsibility to deliver the parcel on time by PostNL.

Get started

Request your (Sandbox) API Key and start using the API.
As soon as you have an API key, it is recommended to run our Postman collections. Here you can find code examples of the various services and products we offer. This makes implementing the APIs much easier.


Start using the API

Development

On this page you will find all the necessary information for implementing this API.
Please check the Guidelines for useful information.
Descriptions, formats and examples of the API attributes are also very useful to look at.

Method

Call details

Versioning

Guidelines

Example

curl --location --request POST 
'https://api-sandbox.postnl.nl/shipment/v1/checkout' \
--header 'apikey: ***' \
--header 'Content-Type: application/json' \
--data-raw '{
  "OrderDate": "04-09-2022 12:00:00",
  "ShippingDuration": "1",
  "CutOffTimes": [
    {
      "Day": "00",
      "Available": "true",
      "Type": "regular",
      "Time": "20:00:00"
    }
  ],
  "HolidaySorting": "true",
  "Options": [
    "Daytime",
    "Pickup"
  ],
  "Locations": "3",
  "Days": "5",
  "Addresses": [
    {
      "AddressType": "01",
      "Street": "Molengraaffplantsoen",
      "HouseNr": "74",
      "HouseNrExt": "",
      "Zipcode": "3571ZZ",
      "City": "Utrecht",
      "Countrycode": "NL"
    }
  ]
}'

Response:

{
    "DeliveryOptions": [
        {
            "DeliveryDate": "05-09-2022",
            "Timeframe": [
                {
                    "From": "10:30:00",
                    "To": "13:00:00",
                    "Options": [
                        "Daytime"
                    ],
                    "ShippingDate": null
                }
            ]
        },
        {
            "DeliveryDate": "06-09-2022",
            "Timeframe": [
                {
                    "From": "12:15:00",
                    "To": "14:45:00",
                    "Options": [
                        "Daytime"
                    ],
                    "ShippingDate": null
                }
            ]
        },
        {
            "DeliveryDate": "07-09-2022",
            "Timeframe": [
                {
                    "From": "12:00:00",
                    "To": "14:30:00",
                    "Options": [
                        "Daytime"
                    ],
                    "ShippingDate": null
                }
            ]
        },
        {
            "DeliveryDate": "08-09-2022",
            "Timeframe": [
                {
                    "From": "11:30:00",
                    "To": "14:00:00",
                    "Options": [
                        "Daytime"
                    ],
                    "ShippingDate": null
                }
            ]
        },
        {
            "DeliveryDate": "09-09-2022",
            "Timeframe": [
                {
                    "From": "11:15:00",
                    "To": "13:45:00",
                    "Options": [
                        "Daytime"
                    ],
                    "ShippingDate": null
                }
            ]
        }
    ],
    "PickupOptions": [
        {
            "PickupDate": "05-09-2022",
            "Option": "Pickup",
            "Locations": [
                {
                    "PartnerID": "PNPNL-01",
                    "LocationCode": "163043",
                    "Address": {
                        "CompanyName": "Tabakszaak Vroon",
                        "Street": "Jan van Galenstraat",
                        "HouseNr": 93,
                        "HouseNrExt": "",
                        "Zipcode": "3572LD",
                        "City": "Utrecht",
                        "Countrycode": "NL"
                    },
                    "PickupTime": "15:00",
                    "Distance": 138,
                    "OpeningHours": {
                        "Monday": {
                            "From": "08:00:00",
                            "To": "18:00:00"
                        },
                        "Tuesday": {
                            "From": "08:00:00",
                            "To": "18:00:00"
                        },
                        "Wednesday": {
                            "From": "08:00:00",
                            "To": "18:00:00"
                        },
                        "Thursday": {
                            "From": "08:00:00",
                            "To": "18:00:00"
                        },
                        "Friday": {
                            "From": "08:00:00",
                            "To": "18:00:00"
                        },
                        "Saturday": {
                            "From": "08:00:00",
                            "To": "17:00:00"
                        }
                    }
                },
                {
                    "PartnerID": "PNPNL-01",
                    "LocationCode": "214646",
                    "Address": {
                        "CompanyName": "Primera",
                        "Street": "Troosterhof",
                        "HouseNr": 12,
                        "HouseNrExt": "",
                        "Zipcode": "3571NC",
                        "City": "Utrecht",
                        "Countrycode": "NL"
                    },
                    "PickupTime": "15:00",
                    "Distance": 400,
                    "OpeningHours": {
                        "Monday": {
                            "From": "08:30:00",
                            "To": "18:00:00"
                        },
                        "Tuesday": {
                            "From": "08:30:00",
                            "To": "18:00:00"
                        },
                        "Wednesday": {
                            "From": "08:30:00",
                            "To": "18:00:00"
                        },
                        "Thursday": {
                            "From": "08:30:00",
                            "To": "18:00:00"
                        },
                        "Friday": {
                            "From": "08:30:00",
                            "To": "18:00:00"
                        },
                        "Saturday": {
                            "From": "08:30:00",
                            "To": "17:00:00"
                        }
                    }
                },
                {
                    "PartnerID": "PNPNL-01",
                    "LocationCode": "220852",
                    "Address": {
                        "CompanyName": "030 fietsen",
                        "Street": "Nobelstraat",
                        "HouseNr": 3,
                        "HouseNrExt": "",
                        "Zipcode": "3512EK",
                        "City": "UTRECHT",
                        "Countrycode": "NL"
                    },
                    "PickupTime": "15:00",
                    "Distance": 1481,
                    "OpeningHours": {
                        "Monday": {
                            "From": "09:00:00",
                            "To": "18:00:00"
                        },
                        "Tuesday": {
                            "From": "09:00:00",
                            "To": "18:00:00"
                        },
                        "Wednesday": {
                            "From": "09:00:00",
                            "To": "18:00:00"
                        },
                        "Thursday": {
                            "From": "09:00:00",
                            "To": "18:00:00"
                        },
                        "Friday": {
                            "From": "09:00:00",
                            "To": "18:00:00"
                        },
                        "Saturday": {
                            "From": "09:00:00",
                            "To": "18:00:00"
                        },
                        "Sunday": {
                            "From": "10:00:00",
                            "To": "17:00:00"
                        }
                    }
                }
            ]
        },
        {
            "PickupDate": "05-09-2022",
            "Option": "ParcelMachine",
            "Locations": []
        }
    ],
    "Warnings": [
        {
            "DeliveryDate": "04-09-2022",
            "Code": "5034",
            "Description": "No delivery option found on date",
            "Options": [
                "Daytime"
            ]
        }
    ]
}

Request Checkout

/v1/checkout

ParameterMandatoryFormatDescriptionExample
ApikeyMString [32] Authenticate using your API key. R6bZ****************dX
OrderDateMString[19] The order date of the shipment11-07-2019 12:34:54
ShippingDurationOString [2] The amount of days it takes for a parcel to be received by PostN. If you delivery the parcel the same day as the order is placed on the webshop, please use the value of 1. A value of 2 means the parcel will arrive at PostNL a day later etc.1
CutOffTimesMString [2] Array of CutOffTimes Type
HolidaySortingOBoolean Specifies whether you are available during holidays true
OptionsMArray of stringSpecifies the delivery and pickup options. For a list of possible values please refer to the guidelinesDaytime
LocationsMInteger [2]Specifies the number of locations you want returned. This can be a value of 1-33
DaysMInteger [2] Specifies the number of days for which the timeframes are returned. This can be a value of 1-95
AddressesMArrayArray of Address type

CutOffTimes type

ParameterMandatoryFormatDescriptionExample
DayMString [2] The day for which the cutoff time applies. The following values can be used:
00: default
01: Monday
02: Tuesday
07: Sunday
00
AvailableOBoolean Specifies whether you are available to process shipments during the selected day.true
TimeO-MString [8] Specifies the cutoff time (mandatory when Available is true)23:00:00
Type0String [0-10] Specifies the type belonging to the cutoff time. Possible values:
Regular and Sameday.
Multiple types can be used in one call.
Regular



Address type

ParameterMandatoryFormatDescriptionExample
AddressTypeMString [2] Address type. Possible values are:
01: receiver address
02: sender address
01


StreetOString[0-35] Street name; for Belgian addresses, it is strongly recommended to fill in the  street valueSiriusdreef
HouseNrMInteger [1-5] The house number of the delivery address42
HouseNrExtOString [0-7] House number extensionA
ZipcodeMString [4-6]Zipcode of the address2132WT
CityOString [0-35]City of the address Hoofddorp
CountrycodeMString[2]ISO2 country code. Limited to NL and BE. NL

Response Checkout service

Parameter  DescriptionExample
DeliveryOptions  Array of DeliveryOption type
PickupOptions  Array of PickupOption type
Warnings  Array of Warning type

DeliveryOption type

Parameter  DescriptionExample
Deliverydate  String09-07-2019
Timeframe  Array of Timeframe type

Timeframe type

Parameter  DescriptionExample
ShippingDate  The date when you need to deliver the shipment to PostNL to ensure the expected delivery date is achieved08-07-2019
From   Format hh:mm:ss18:00:00
Options  The delivery options applicable to the timeframe information. See Guidelines for possible values.Evening
To   Format hh:mm:ss21:30:00

PickupOptions type

Attribute  DescriptionExample
PickupDate  Date from which the parcel can be picked up at the PostNL location09-07-2019
ShippingDate  The date when you need to deliver the shipment to PostNL to ensure the expected delivery date is achieved08-07-2019
Option  The pickup option
Pickup at PostNL locations. 
Pickup
Locations  Array of Location type

Location type

Parameter  DescriptionExample
Address  Address type 
PickupTime  Time from when the parcel can be retrieved at the pickup location15:00
OpeningHours  OpeningHours type
Distance  The calculated distance (in meters) between the location specified and the address provided in the request138
LocationCode  The location identifier8101163043
PartnerID  The partner identifierPNPNL-01

OpeningHours type

ParameterDescriptionExample
MondayOpeningHour type
TuesdayOpeningHour type
WednesdayOpeningHour type
ThursdayOpeningHour type
FridayOpeningHour type
SaturdayOpeningHour type
SundayOpeningHour type


OpeningHours type

ParameterDescriptionExample
FromStart time09:00:00
CodeWarning code (for a possible list of warnings, see the generic error codes page)18:00:00

Warning type

ParameterDescriptionExample
DeliveryDateDeliverydate that triggered the warning07-07-2019
CodeWarning code (for a possible list of warnings, see the generic error codes page)03
DescriptionWarning description (for a possible list of warnings, see the generic error codes page)Dag uitgesloten van tijdvak
OptionsArray of options. Delivery option that triggered the warningDaytime