Download OpenAPI specification:Download
This API specification is documented in OpenAPI format and defines the processes and steps that are used to: Find the location of an InPost Locker, Create a Label/QR Code or Track a Parcel.
InPost provide a network of Automated Parcel Machines (APMs) in the thousands across the UK, allowing customers to Send, Return and Collect parcels conveniently at a time that suits them.
InPost APMs contain compartments, better known as lockers. Lockers come in 3 sizes – detailed below. Each locker compartment can hold a maximum weight of 15kg.
APM: Automated Parcel Machine, an InPost Locker bank
Compartment: A single compartment within an APM, available in sizes:
A - Small - 8cm x 38cm x 64cm
B - Medium - 19cm x 38cm x 64cm
C - Large - 41cm x 38cm x 64cm
The InPost API set is divided into the following three main components:
APM Locations API: This provides the method to obtain APM/Locker location data.
Parcel Creation APIs: These endpoints are used to obtain book parcels and obtain labels or QR codes. These APIs are used to access the following products:
Tracking API: Used to obtain tracking information for parcels across services, using the consignment ID or tracking number.
The API's described above can be used together to support the key InPost customer journeys. This section defines how they can be sequenced to deliver each journey.
The Address to Locker (A2L) service is the Click & Collect service - allowing parcels to be collected from an address and delivered into an APM. This service allows retailers to manifest parcel data via API and obtain InPost labels back in pdf format, which can be used to send outbound parcels to the customer’s chosen InPost Locker.
The retailer/client should affix the parcel label to the parcel as part of the standard warehouse dispatch process.
The parcel will go through the carrier network and out for delivery to the chosen APM. Upon delivery the customer will receive a confirmation SMS and email from InPost containing their unique collection QR code. The customer will have 72hrs to collect their parcel from the locker. If uncollected within 72hrs, the parcel will expire, be collected by the carrier and be returned to the retailer within 3-5 working days.
The sequence of requests for this journey are as follows:
The API's used on this journey are:
The Locker to Address (L2A) service allows customers to obtain an InPost label, which can be used to Send or Return a parcel to an address.
The customer should affix the parcel label to the parcel. They can then take their parcel to any InPost APM across the UK and deposit the parcel in one of the lockers by scanning the barcode at the bottom of the parcel label. Once the parcel is deposited in the locker, the customer will receive an email and/or SMS containing a tracking link – enabling them to track their parcels journey.
The sequence of requests for this journey are as follows:
The API's used on this journey are:
The InPost Instant Returns service allows customers to obtain an Instant Returns QR Code, which can be used to return a parcel to a retailer. No printer is required for this service.
The customer can then take their parcel to any InPost APM across the UK and deposit the parcel in one of the lockers by scanning the QR Code from their smartphone. Once the parcel is deposited in the locker, the customer will receive an email and/or SMS containing a tracking link – enabling them to track their parcels journey.
The sequence of requests for this journey are as follows:
The API's used on this journey are:
The APM Locations API and Tracking API can be used across all of the customer journeys.
The following endpoints are publicy available endpoints which do not have any authentication. These endpoints are only available in the LIVE production environment:
The Parcel Creation endpoints have the following authentication required:
To get your API key please contact InPost on the following email: integrations@inpost.co.uk
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | bearer |
InPost will provide the following credentials for either or both stage (TEST) / production (LIVE) environments:
API Token (Bearer YOUR_TOKEN): This can be created at request, by contacting your InPost Account Manager.
Retailer Account ID: Will be provided by InPost and is in an email address format. This is a dummy email address that InPost use when setting up your client account – it is not a real mailbox. Throughout this document this value would replace "YOUR_retailer_PARAMETER".
This operation gets the location data of the APM when the user searches by Postcode or GPS Coordinates. The response is cached for 10 minutes.
OK
curl -i -X GET \ 'https://api-uk-points.easypack24.net/v1/points?status=Operating&relative_point=string&relative_post_code=string&max_distance=0&per_page=0'
{- "href": "string",
- "count": 0,
- "page": 0,
- "per_page": 0,
- "total_pages": 0,
- "meta": {
- "href": "string",
- "count": 0,
- "page": 0,
- "per_page": 0,
- "total_pages": 0
}, - "items": [
- {
- "name": "UK00013874",
- "type": [
- "parcel_locker"
], - "status": "Operating",
- "opening_hours": "24/7",
- "location": {
- "longitude": -0.34753,
- "latitude": 51.45358
}, - "location_description": "To left hand side of shop entrance in front of window",
- "address": {
- "line1": "37 Kneller Road InPost Locker - Alton Stores",
- "line2": "TW2 7DF Twickenham"
}, - "address_details": {
- "city": "Twickenham",
- "province": "Twickenham",
- "post_code": "TW2 7DF",
- "street": "37 Kneller Road",
- "building_number": "InPost Locker - Alton Stores"
}, - "functions": [
- "parcel",
- "parcel_collect",
- "parcel_send"
], - "payment_type": {
- "3": "Payment by cash and card"
}, - "location_247": true
}
]
}
The A2L booking request is a POST request and is the first request that must be made to create a parcel within the InPost systems.
Body of the Address to Locker operation.
OK
{- "size": "A",
- "target_machine_id": "UKLON10965",
- "customer_reference": "Customer Order 12345",
- "receiver_email": "joebloggs@inpost.co.uk",
- "receiver_phone": "7000000000",
- "service_type": "NDAY",
- "weight": 1000
}
{- "id": "5116821000000334",
- "created_at": "2021-03-08T22:14:02.098+00:00",
- "status": "created",
- "status_updated_at": null,
- "additional1": null,
- "additional2"": null,
- "avizo_time": 2880,
- "cod_amount": "0.0",
- "customer_reference": "Customer Order 12345",
- "expiration_time": 1440,
- "insurance_amount": null,
- "letter_type": null,
- "pickup_expiration_time": null,
- "primary_parcel_id": null,
- "receiver": {
- "receiver_phone": "7000000000",
- "receiver_email": "joebloggs@inpost.co.uk"
}, - "return_address": { },
- "sender_address": {
- "building_no": "Unit A",
- "city": "London",
- "company_name": "Retailer Name",
- "email": "retailer@inpost.co.uk",
- "first_name": "Retailer Name",
- "flat_no": null,
- "last_name": null,
- "phone": "7000000000",
- "post_code": "AB1 123",
- "province": null,
- "street": "Industrial Estate"
}, - "sender_email": "retailer@inpost.co.uk",
- "sender_phone": "7000000000",
- "service": "STANDARD",
- "size": "A",
- "skip_pickup_point": false,
- "source_machine_id": null,
- "target_machine_id": "UKLON10965",
- "parcel_attributes": [ ],
- "service_type": "NDAY",
- "calculated_amount": "0.0",
- "charged_amount": "0.0",
- "dropoff_code": "0"
}
pay for the parcel for which the label was created.
OK
Not enough funds.
curl -i -X POST \ 'https://api-uk.easypack24.net/v4/parcels/{a2lconsignmentId}/pay' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "id": "5116821000000334",
- "created_at": "2021-03-08T22:14:02.098+00:00",
- "status": "created",
- "status_updated_at": null,
- "additional1": null,
- "additional2"": null,
- "avizo_time": 2880,
- "cod_amount": "0.0",
- "customer_reference": "Customer Order 12345",
- "expiration_time": 1440,
- "insurance_amount": null,
- "letter_type": null,
- "pickup_expiration_time": null,
- "primary_parcel_id": null,
- "receiver": {
- "receiver_phone": "7000000000",
- "receiver_email": "joebloggs@inpost.co.uk"
}, - "return_address": { },
- "sender_address": {
- "building_no": "Unit A",
- "city": "London",
- "company_name": "Retailer Name",
- "email": "retailer@inpost.co.uk",
- "first_name": "Retailer Name",
- "flat_no": null,
- "last_name": null,
- "phone": "7000000000",
- "post_code": "AB1 123",
- "province": null,
- "street": "Industrial Estate"
}, - "sender_email": "retailer@inpost.co.uk",
- "sender_phone": "7000000000",
- "service": "STANDARD",
- "size": "A",
- "skip_pickup_point": false,
- "source_machine_id": null,
- "target_machine_id": "UKLON10965",
- "parcel_attributes": [ ],
- "service_type": "NDAY",
- "calculated_amount": "0.0",
- "charged_amount": "0.0",
- "dropoff_code": "0"
}
get the label. The return is a pdf document.
OK
Data Not found.
Validation Failed due to invalid request data.
curl -i -X GET \ 'https://api-uk.easypack24.net/v4/parcels/{a2lconsignmentId}/sticker?type=normal' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "status_code": 0,
- "error_code": "string",
- "message": "string",
- "errors": {
- "type": "string"
}
}
The L2A booking request is a POST request and is the first request that must be made to create a parcel within the InPost systems.
Body of the L2A operation.
OK
{- "size": "A",
- "target_machine_id": "ADDRESS",
- "source_machine_id": "ANY-PM",
- "customer_reference": "Order 12345",
- "receiver_email": "joebloggs@inpost.co.uk",
- "receiver_phone": "7000000000",
- "service_type": "2DAY",
- "weight": 5000,
- "receiver": {
- "address": {
- "building_no": 2,
- "city": "London",
- "flat_no": null,
- "post_code": "EC1V 1NY",
- "province": "UK",
- "street": "Angel Square"
}, - "company_name": "InPost UK",
- "email": "joebloggs@inpost.co.uk",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "phone": "7000000000"
}, - "sender_address": {
- "building_no": "Unit C",
- "city": "Hertfordshire",
- "company_name": "",
- "email": "sender@inpost.co.uk",
- "first_name": "Sam",
- "flat_no": null,
- "last_name": "Smith",
- "phone": "null,",
- "post_code": "HP2 7GE",
- "province": "Hemel Hempstead",
- "street": "Boundary Way"
}
}
{- "id": "0301361507070979",
- "created_at": "2021-07-14T13:02:35.755+01:00",
- "status": "created",
- "status_updated_at": null,
- "additional1": null,
- "additional2": null,
- "avizo_time": 2880,
- "cod_amount": "0.0",
- "customer_reference": "Order 12345",
- "expiration_time": 1440,
- "insurance_amount": null,
- "letter_type": null,
- "pickup_expiration_time": null,
- "primary_parcel_id": null,
- "receiver": {
- "address": {
- "building_no": "2",
- "city": "London",
- "flat_no": null,
- "post_code": "EC1V 1NY",
- "province": "UK",
- "street": "Angel Square"
}, - "company_name": "InPost UK",
- "email": "joebloggs@inpost.co.uk",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "phone": "7000000000"
}, - "receiver_phone": "7000000000",
- "receiver_email": "joebloggs@inpost.co.uk",
- "return_address": { },
- "sender_address": {
- "building_no": "Unit C",
- "city": "Hertfordshire",
- "company_name": null,
- "email": "sender@inpost.co.uk",
- "first_name": "Sam",
- "flat_no": null,
- "last_name": "Smith",
- "phone": null,
- "post_code": "HP2 7GE",
- "province": "Hemel Hempstead",
- "street": "Boundary Way"
}, - "sender_email": "retailer@inpost.co.uk",
- "sender_phone": "7000000000",
- "service": "ADDRESS",
- "size": "A",
- "skip_pickup_point": false,
- "source_machine_id": "ANY-PM",
- "target_machine_id": "ADDRESS",
- "parcel_attributes": [ ],
- "service_type": "2DAY",
- "calculated_amount": "0.0",
- "charged_amount": "0.0",
- "dropoff_code": "0"
}
pay for the parcel for which the label was created.
OK
Not enough funds.
curl -i -X POST \ 'https://api-uk.easypack24.net/v4/parcels/{l2aconsignmentId}/pay' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "id": "0301361507070979",
- "created_at": "2021-07-14T13:02:35.755+01:00",
- "status": "created",
- "status_updated_at": null,
- "additional1": null,
- "additional2": null,
- "avizo_time": 2880,
- "cod_amount": "0.0",
- "customer_reference": "Order 12345",
- "expiration_time": 1440,
- "insurance_amount": null,
- "letter_type": null,
- "pickup_expiration_time": null,
- "primary_parcel_id": null,
- "receiver": {
- "address": {
- "building_no": "2",
- "city": "London",
- "flat_no": null,
- "post_code": "EC1V 1NY",
- "province": "UK",
- "street": "Angel Square"
}, - "company_name": "InPost UK",
- "email": "joebloggs@inpost.co.uk",
- "first_name": "Joe",
- "last_name": "Bloggs",
- "phone": "7000000000"
}, - "receiver_phone": "7000000000",
- "receiver_email": "joebloggs@inpost.co.uk",
- "return_address": { },
- "sender_address": {
- "building_no": "Unit C",
- "city": "Hertfordshire",
- "company_name": null,
- "email": "sender@inpost.co.uk",
- "first_name": "Sam",
- "flat_no": null,
- "last_name": "Smith",
- "phone": null,
- "post_code": "HP2 7GE",
- "province": "Hemel Hempstead",
- "street": "Boundary Way"
}, - "sender_email": "retailer@inpost.co.uk",
- "sender_phone": "7000000000",
- "service": "ADDRESS",
- "size": "A",
- "skip_pickup_point": false,
- "source_machine_id": "ANY-PM",
- "target_machine_id": "ADDRESS",
- "parcel_attributes": [ ],
- "service_type": "2DAY",
- "calculated_amount": "0.0",
- "charged_amount": "0.0",
- "dropoff_code": "0"
}
get the label. The return is a pdf document.
OK
Data Not found.
Validation Failed due to invalid request data.
curl -i -X GET \ 'https://api-uk.easypack24.net/v4/parcels/{l2aconsignmentId}/sticker?type=normal' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "status_code": 0,
- "error_code": "string",
- "message": "string",
- "errors": {
- "type": "string"
}
}
Initiate a returns request.
Body of the returns.
OK
no have permission for reverse return.
{- "sender_email": "customer_email@inpost.co.uk",
- "sender_phone": "7000000000",
- "size": "A",
- "customer_reference": "customer reference number",
- "show_quick_send_code": "true"
}
{- "id": "3400003000111803",
- "sender_email": "customer_email@inpost.co.uk",
- "sender_phone": "7000000000",
- "size": "A",
- "status": "customer_delivering",
- "customer_reference": "customer reference number",
- "created_at": "2021-07-16T09:48:13.815+01:00",
- "quick_send_code"": "405524059"
}
This request, will respond with the Returns QR Code as a PDF, or as raw data where show_quick_send_code has been set to true in the Create a Returns Request.
OK
Data Not found.
Validation Failed due to invalid request data.
curl -i -X GET \ 'https://api-uk.easypack24.net/v4/returns/v2/{consignmentId}/sticker?type=normal' \ -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{- "status_code": 0,
- "error_code": "string",
- "message": "string",
- "errors": {
- "type": "string"
}
}
Obtain the details of all the parcel ids in the consignmentData. If tracking is required for more than one Consigment, the Consignment data is a list of ids separated by ;
OK
curl -i -X GET \ 'https://tracking.inpost.co.uk/api/v2.0/{consignmentData}'
{- "property1": {
- "error": "string"
}, - "property2": {
- "error": "string"
}, - "5934024283154413": [
- {
- "ts": "12/03/2020 19:48:58pm",
- "code": "PCA",
- "description": "Data Received / File Created"
}, - {
- "ts": "12/03/2020 19:49:03pm",
- "code": "PRD",
- "description": "Ready For Dispatch"
}
]
}