Tutorial: Simulating a postal transportation process with tracking events

Add tracking events with Tracking API

Send Tracking events

To simulate a postal transportation process you can add some tracking events to your shipment.

Typical postal process consists of following events:

  • LAJ = Item in sorting
  • HYL = Item ready for pick up at a Post Office collection point against a notice of arrival or item code
  • LUO = Item delivered to the recipient

Sometimes a deviation might occur at some point in the process:

  • POI = A deviation has been detected in the items delivery. Delivery may be delayed

You can send tracking events to Tracking API by issuing the following method:

PUThttps://krypton.api.posti.fi/tracking/1/shipments/{tracking_code}/events
{
    "EventType" : "HYL",
    "SavedTime" : "20151022141900",
    "EventTime" : "20151022132418",
    "EventLocation" : "9876543"
}

You can modify the timestamps to reflect a real world situation. EventLocation can be anything.

Tracking API will return a status code 200 to confirm that an tracking event has been successfully placed. You can also view the tracking events of your shipment by issuing a GET request:

GEThttps://krypton.api.posti.fi/tracking/1/shipments/{tracking_code}