Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Tracking resource is an object representing information about the current status of the shipment in the logistics system. It can be utilized to get information about the creation, status change and status history of the shipment.

Info

You can download a list of statuses occurring in tracking using [1.2.0] Statuses

Info

Tracking is not available on the sandbox environment. No statuses are returned


On this page

Table of Contents

Structure

Tracking resource consists of the following attributes:

Attribute

Type

Description

tracking_number

String

Shipment number.

type

String

Shipment type. Available types can be found here: [1.9.1] Shipment sizes and services.

service

String

Shipment type (service). Available types can be found here [1.9.1] Shipment sizes and services.

custom_attributes

Object

Additional attributes for locker shipments.

status

String

Current shipment status.

created_at

DateTime

Shipment creation date and time.

updated_at

DateTime

Last shipment update date and time.

tracking_details

Array

An array containing the history of shipment status changes in chronological descending order.

(Last status change appears first on the list)

expected_flow

Array

An array containing the predicted statuses through which the given shipment might change.

Additional attributes for parcel locker custom_attributes

Attribute

Type

Description

target_machine_detail

Hash

Additional receiver locker parameters.

dropoff_machine_detail

Hash

Additional sender locker parameters.

size

String

Shipment size [A, B, C]

target_machine_id

String

Receiver locker name.

dropoff_machine_id 

String

Sender locker name.

An array of objects containing the history of status changes, sorted chronologically in descending order (the last status is the first in the list) tracking_details

Attribute

Type

Description

status

String

Status name

origin_status

String 

Status symbol List of statuses that have origin_status assigned to them

agency 

String 

Agency name

datetime

String 

Time of change

Tracker resource example JSON format:

Code Block
languagejson
{
    "tracking_number": "632085946340007012341234",
    "service": "inpost_locker_standard",
    "type": "inpost_locker_standard",
    "status": "delivered",
    "custom_attributes": {
        "size": "A",
        "target_machine_id": "KAT07A",
        "target_machine_detail": {
            "name": "KAT07A",
            "opening_hours": "24/7",
            "location_description": "Przy Instytucie Matematyki UŚ",
            "location": {
                "latitude": 50.26219,
                "longitude": 19.02902
            },
            "address": {
                "line1": "Bankowa 14",
                "line2": "40-007 Katowice"
            },
            "type": [
                "parcel_locker"
            ],
            "location247": true
        },
        "end_of_week_collection": false
    },
    "tracking_details": [
        {
            "origin_status": "DOR",
            "status": "delivered",
            "agency": null,
            "location": null,
            "datetime": "2023-12-18T11:20:06.000+01:00"
        },
        {
            "origin_status": "UWP",
            "status": "ready_to_pickup",
            "agency": null,
            "location": null,
            "datetime": "2023-12-18T10:14:01.000+01:00"
        },
        {
            "origin_status": "PDD_2",
            "status": "out_for_delivery",
            "agency": null,
            "location": null,
            "datetime": "2023-12-18T08:37:45.000+01:00"
        },
        {
            "origin_status": "PWO",
            "status": "adopted_at_source_branch",
            "agency": null,
            "location": null,
            "datetime": "2023-12-18T05:56:59.000+01:00"
        },
        {
            "origin_status": "WZO",
            "status": "sent_from_source_branch",
            "agency": null,
            "location": null,
            "datetime": "2023-12-17T19:10:51.000+01:00"
        },
        {
            "origin_status": "PWO",
            "status": "adopted_at_source_branch",
            "agency": null,
            "location": null,
            "datetime": "2023-12-17T17:39:59.000+01:00"
        },
        {
            "origin_status": "PPN",
            "status": "confirmed",
            "agency": null,
            "location": null,
            "datetime": "2023-12-17T12:58:39.000+01:00"
        }
    ],
    "expected_flow": [],
    "created_at": "2023-12-17T12:58:39.539+01:00",
    "updated_at": "2023-12-18T11:20:07.005+01:00"
}

Authentication

Resource access does not require authentication.

Shipment History

Retrieving information about shipment status changes:

Code Block
languagejson
GET /v1/tracking/:tracking_number

Example request:

Code Block
languagejson
curl -X GET https://api-shipx-pl.easypack24.net/v1/tracking/632085946340007012341234 -H 'Content-Type: application/json' 

Response:

If the given tracking number is correct and the shipment has been found, the following information is returned:

Code Block
languagejson
HTTP/1.1 200 OK 
Content-Type: application/json

{
    "tracking_number": "632085946340007012341234",
    "service": "inpost_locker_standard",
    "type": "inpost_locker_standard",
    "status": "delivered",
    "custom_attributes": {
        "size": "A",
        "target_machine_id": "KAT07A",
        "target_machine_detail": {
            "name": "KAT07A",
            "opening_hours": "24/7",
            "location_description": "Przy Instytucie Matematyki UŚ",
            "location": {
                "latitude": 50.26219,
                "longitude": 19.02902
            },
            "address": {
                "line1": "Bankowa 14",
                "line2": "40-007 Katowice"
            },
            "type": [
                "parcel_locker"
            ],
            "location247": true
        },
        "end_of_week_collection": false
    },
    "tracking_details": [
        {
            "origin_status": "DOR",
            "status": "delivered",
            "agency": null,
            "location": null,
            "datetime": "2023-12-18T11:20:06.000+01:00"
        },
        {
            "origin_status": "UWP",
            "status": "ready_to_pickup",
            "agency": null,
            "location": null,
            "datetime": "2023-12-18T10:14:01.000+01:00"
        },
        {
            "origin_status": "PDD_2",
            "status": "out_for_delivery",
            "agency": null,
            "location": null,
            "datetime": "2023-12-18T08:37:45.000+01:00"
        },
        {
            "origin_status": "PWO",
            "status": "adopted_at_source_branch",
            "agency": null,
            "location": null,
            "datetime": "2023-12-18T05:56:59.000+01:00"
        },
        {
            "origin_status": "WZO",
            "status": "sent_from_source_branch",
            "agency": null,
            "location": null,
            "datetime": "2023-12-17T19:10:51.000+01:00"
        },
        {
            "origin_status": "PWO",
            "status": "adopted_at_source_branch",
            "agency": null,
            "location": null,
            "datetime": "2023-12-17T17:39:59.000+01:00"
        },
        {
            "origin_status": "PPN",
            "status": "confirmed",
            "agency": null,
            "location": null,
            "datetime": "2023-12-17T12:58:39.000+01:00"
        }
    ],
    "expected_flow": [],
    "created_at": "2023-12-17T12:58:39.539+01:00",
    "updated_at": "2023-12-18T11:20:07.005+01:00"
}

Response example of a shipment that has not been found:

Code Block
languagejson
HTTP/1.1 404 Not Found
Content-Type: application/json
{
	"status": 404,
	"error": "resource_not_found",
	"description": "Tracking information about 612345678901234567890123 InPost Locker shipment has not been found.",
	"details": null
}

Response example for a tracking number for which the shipment type could not be determined:

Code Block
languagejson
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
    "status": 400,
    "error": "uknown_tracking_number",
    "message": "Cannot identify type of shipment by given tracking number (612345678901234567890123)",
    "details": null
}

Shipment service history

Mixed shipments services can be changed during the logistics processing.
Shipments service history can be retrieved using the following resource:

Code Block
languagejson
GET v1/tracking/:tracking_number/service_history

Request example:

Code Block
languagejson
curl -X GET https://api-shipx-pl.easypack24.net/v1/tracking/523000015802677003881245/service_history -H 'Content-Type: application/json'

Response:

Code Block
languagejson
HTTP/1.1 200 OK
Content-Type: application/json
{
	"href": "https://api-shipx-pl.easypack24.net/v1/shipments/120"
	"id": "120"
	"service_history": {
		"last_service": "inpost_courier_standard",
		"updated_at": "2017-10-27T12:39:02.125+02:00"
    }
}