Page tree
Skip to end of metadata
Go to start of metadata

Various expected flows (expected_flow) may apply for each type of shipment.


The Tracking resource represents an object with information about the current status of a shipment in the logistic process. It can be used to obtain information on the newly created shipment, the last status change or history of the statuses.

On this page

 

Structure

The Tracking resource has the following attributes:

AttributeTypeDescription
tracking_numberStringShipment number
typeStringShipment type. Available types are described on page API Przesyłka.
serviceStringShipment type. Available types are described on page Usługi i wymiary dla przesyłek.
custom_attributesObject

Additional attributes for parcel station shipments.

AttributeTypeDescription
sizeStringShipment size [A, B, C]
target_machine_idStringName of the receiving automatic parcel station.
target_machine_detailHashAdditional parameters of the receiving automatic parcel station.
dropoff_machine_id StringName of the sending parcel station.
dropoff_machine_detailHashAdditional parameters of the sending parcel station.
statusStringThe status the shipment is currently at.
created_atDateTimeShipment created date.
updated_atDateTimeDate of the last update of the status change notice.
tracking_detailsArray

Table of objects containing the status change history, sorted chronologically in the descending order (the last status is first on the list).

AttributeTypeDescription
statusStringStatus name
origin_statusString Status symbol
agency String Name of agency
datetimeString Status change time
expected_flowArrayTable of the anticipated statuses which the given shipment can still take.

Sample Tracker resource in the JSON format:

{
	"tracking_number": "612345678901234567890123",
	"type": "inpost_locker_standard",
    "service": "inpost_locker_standard",
    "status": "dispatched_by_sender",
	"custom_attributes": {
        "size": "A"
		"target_point_id": "KRA000",
        "target_machine_detail": {
            "href": "https://api-pl-points.easypack24.net/v1/points/AAA000",
            "name": "AAA000",
            "opening_hours": "PN-PT 09:00-16:00",
            "location_description": "Beta Agencja Usługowo-Finansowa",
            "location": {
                "latitude": 50.26899,
                "longitude": 18.97812
            },
            "address": {
                "line1": "ul.Reymonta 999",
                "line2": "33-333 Kraków"
            },
            "type": [
                "parcel_locker"
            ]
        },
	},
	"tracking_details": [
		{
			"status": "dispatched_by_sender",
            "origin_status": "NWP",
            "agency": "Kraków",
			"datetime": "2015-09-17T11:28:00.000+02:00"
		},
		{
			"status": "confirmed",
            "origin_status": "PPN",
            "agency": null,
			"datetime": "2015-09-17T10:28:00.000+02:00"
		}
	],
	"expected_flow": [],
    "created_at": "2015-09-17T08:00:00.000+02:00",
	"updated_at": "2015-09-17T11:28:00.000+02:00",
}

 

Specify the type of query and the path to functionality, e.g.
GET /v1/machines

Parameters

ParameterTypeDescription

Sample request

GET W_TYM_MIEJSCU_WSTAW_SCIEZKE_DO_FUNKCJI HTTP/1.1
Host: api-shipx-pl.easypack24.net
Content-Type: application/json
Authorization: Bearer lkfjasd9f70y43ohriw...[ommited for brevity]...
 
Jeśli zasób wywoływany jest metodą POST, umieść tutaj przykład przesyłanych danych w odpowiednim formacie (najczęściej JSON).

Response

HTTP/1.1 200 OK
Content-Type: application/json
 
Przykład odpowiedzi (JSON) - dla sukcesu (HTTP Status Code 200)

 

 

Authentication

The Tracking resource is not authenticated, it is not necessary to provide the token.

 

Shipment history

Collecting information about status changes for the given shipment:

GET /v1/tracking/:tracking_number

Sample request

curl -X GET https://api-shipx-pl.easypack24.net/v1/tracking/612345678901234567890123 -H 'content-type: application/json' 

Response

When the shipment number provided is correct and information about the shipment has been found, the server will return a response as specified below:

HTTP/1.1 200 OK
Content-Type: application/json
 
{
	"tracking_number": "612345678901234567890123",
	"type": "inpost_locker_standard",
    "service": "inpost_locker_standard",
    "status": "dispatched_by_sender",
	"custom_attributes": {
        "size": "A"
		"target_point_id": "KRA000",
        "target_machine_detail": {
            "href": "https://api-pl-points.easypack24.net/v1/points/AAA000",
            "name": "AAA000",
            "opening_hours": "PN-PT 09:00-16:00",
            "location_description": "Beta Agencja Usługowo-Finansowa",
            "location": {
                "latitude": 50.26899,
                "longitude": 18.97812
            },
            "address": {
                "line1": "ul.Reymonta 999",
                "line2": "33-333 Kraków"
            },
            "type": [
                "parcel_locker"
            ]
        },
	},
	"tracking_details": [
		{
			"status": "dispatched_by_sender",
            "origin_status": "NWP",
			"datetime": "2015-09-17T11:28:00.000+02:00"
		},
		{
			"status": "confirmed",
            "origin_status": "PPN",
			"datetime": "2015-09-17T10:28:00.000+02:00"
		}
	],
	"expected_flow": [],
    "created_at": "2015-09-17T08:00:00.000+02:00",
	"updated_at": "2015-09-17T11:28:00.000+02:00",
}

 

Sample response if information about the shipment has not been found:

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
}

 Sample response when the system is not able to recognize the type of shipment based on the number provided:


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 flow (deprecated)

Various expected flows (expected_flow) may apply for each type of shipment.

Collecting a flow for the particular kind of shipment

/v1/tracking/flow/:shipment_type

Possible values for the parameter: shipment_type are defined on page API Przesyłka.

Sample request

curl -X GET https://api-shipx-pl.easypack24.net/v1/tracking/flow/inpost_locker_standard -H 'content-type: application/json' 

Sample response

HTTP/1.1 200 OK
Content-Type: application/json
 
{}

 

 

Shipment service history


Mixed parcels may change their service throughout the logistic process. The history of the parcel's last service can be viewed by requesting the following resource:

Sample request

curl -X GET https://api-shipx-pl.easypack24.net/v1/tracking/523000015802677003881245/service_history -H 'content-type: application/json'

Sample response

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"
    }
}

 

 

  • No labels