Tracking | Post Tracking Update

Purpose

The Cargobase tracking update end-point is available only to Provider companies for the purpose of posting tracking updates to Cargobase. This end-point allows a provider to post tracking events onto a shipment. At this moment, all events are posted 'as-is'.

Access

A provider can only post tracking updates for shipments associated with their account. POSTS for other shipments will be rejected.

An access token is required to POST to this end-point. Contact [email protected] to obtain your token.

Request URI

POST https://pluto.cargobase.com/api/1/tracking/
Content-Type: application/json
Authorization: Token 'your_token_here'

Message body definition

POST parameterValueRequired
primary_tracking_numberSTRING - tracking number as published to CargobaseYes
eventSTRING your eventYes
event_typeSTRING of the event category, limited options available see belowNo
event_timestampYYYY-MM-DDTHH:MM:SSNo

Event types

Event types are used to categorise your updates. You do not need to send an event-type, however if you do it has to be one of the following categories.

event_typedescription
InfoReceived(default value, if none is provided)
InTransitto share the in transit status of a shipment. In future, this will be used to update the 'status' of an actual shipment from 'Booked' too 'In Transit'.
OutForDeliveryto identify that your shipment will be delivered shortly. This will be used to send 'ad-hoc' notifications to the consignee.
Exceptionto identify an exception on the shipment. This is used to send additional notifications to the manager of the shipment.
DeliveredSubmit this event_type to close the shipment, does require additional details, see below.

Event type Delivered

The delivered event type is used to trigger the closure workflow in the platform. Closure, is only possible after shipment delivery, therefore it is required to include an acceptor and pod_timestamp in your body message, see the sample below.

An additional event description via the 'event' parameter is not required.

event_timestamp

You can include a timestamp for the events that you post. These timestamps are reflected on the platform. If you choose to include a timestamp, ensure you follow this format: YYYY-MM-DDTHH:MM:SS. Timestamp are displayed on the platform as ; YYYY-MM-DD HH:MM

Message body sample

Regular update

{
  "primary_tracking_number": "Your tracking number",
   "event": "This is the body message of your update",
   "event_type": "InTransit",
  "event_timestamp": "2019-04-11T09:00:00"
}

Delivered Shipment update/Submit POD

{
  "primary_tracking_number": "Your tracking number",
   "event_type": "Delivered",
   "acceptor":"Name of recipient",
  "pod_timestamp": "2019-05-28T09:00:00"
}

Status codes

StatusDescriptionResolution
201Post received--
304Data missingCheck if all mandatory fields are present
400Bad RequestCheck data types and event_type category
403Forbiddencheck Authentication credentials
415Unsupported media typeAdd Content-Type: application/json

Status code 201

Status code 201 signifies that the message is well received, and a confirmation number is provided in the response

{
    "success": "The update was posted on the shipment with tracking number: your_tracking_number"
}
Language
Credentials
http
Response
Click Try It! to start a request and see the response here!