The Track and Trace API gives the client the possibility to get information about a current shipment based on the shipments barcode information. The API is based on a WCF Service with a RESTFUL implementation.
Following is a description of the API and its functionalities.
For access and testing of the Track and Trace API please call the following web address:
https://ubapimanagement.azure-api.net/trackandtrace/[function-name]
For easy testing, an extension like the Postman extension for the Chrome Browser can be used. For usable data contracts see examples later in this document (Under function descriptions).
The main execution layer presents the access point for the client to call the service. There is one function to be called. Following examples of data contracts are given in JSON.
Gets tracking information about the shipment
The track and trace API is design in the way that the specific carrier defined in the carrier field is contacted firstly for track and trace information. If this fails, the API continues to contact Consignor (Booking System Provider) if used in the setup to retrieve information here. If this also fails, United Broker own systems are contacted to retrieve the track and trace info. This way we always make sure that information is available.
https://ubapimanagement.azure-api.net/trackandtracetest/GetTrackAndTraceJSON
https://ubapimanagement.azure-api.net/trackandtrace/GetTrackAndTraceJSON
GET
http://ubapimanagement.azure-api.net/trackandtrace/GetTrackAndTraceJSON?carrier=1&countryCode=dk&barCode=00370720684126597722
Name | Type | Required | Description |
---|---|---|---|
Carrier | int |
The specific carrier you wish to see track and trace from. | |
CountryCode | string |
The country code of the receiver for the specific shipment. | |
BarCode | string |
The bar code (Shipment AWB) of the shipment. | |
OrderNumber | string |
For some GLS shipments this is also needed. | |
LangCode | string |
Two letter ISO language code. Works with limited range of products and languages. Works with PostNord and GLS DK carriers. |
Carrier | Carrier Name |
---|---|
0 |
GLS |
1 |
PostNord |
2 |
DHL |
3 |
United Broker |
4 |
Consignor |
5 |
AfterShip |
6 |
Bring |
7 |
Posti |
8 |
Carelog |
9 |
TNT |
10 |
Logika |
11 |
Schenker |
12 |
Fastway |
If request was successful, system will return json response with information about the shipment.
InformationSource
field shows which provider was contacted for retrieving the information. By this you can provide information to the end user on where you have the information from, as the richness of information differs from source system to system. As an example the GLS track and trace system provides an image of the receivers signature on receiving the shipment, whereas PostNord and Consignor do not.
You will receive a status code Ok
in the StatusCode
field if the request went well, else you will receive error in this field, and an error message in the ErrorMessage
field.
{"Carrier":0,"CustomerReference":null,"DeliveryDate":null,"ErrorMessage":"Error finding any parcels","InformationSource":null,"LangCode": "en","OrderNumber":null,"PackageNumber":null,"PickUpDate":null,"Product":null,"Receiver":null,"Scans":null,"SendersReference":null,"SignatureImage":null,"SignatureName":null,"StatusCode":"Error","Weight":0}
{ "Carrier": 1, "CarrierWeight": 9999, "CustomerReference": "00370720684126597722", "DeliveryDate": "2017-09-14T11:46:48", "ErrorMessage": null, "InformationSource": "Post Nord", "LangCode": "en", "OrderNumber": "10330168", "OriginalCarrier": 1, "PackageNumber": "", "PickUpDate": "2017-09-14T11:46:48", "Product": "PostNord Return Pickup", "Receiver": { "Address": "Edv.Egebergs Vej 27", "BusinessName": "Pernille Kvorning", "City": "Silkeborg", "ContactName": "", "Country": "DK", "Zip": "8600" }, "Scans": [ { "Code": "z96", "Location": "Silkeborg", "ScanDate": "2017-09-14T11:46:48", "ScanText": "The shipment item has been delivered to the recipients mailbox." }, { "Code": "z65", "Location": "Silkeborg", "ScanDate": "2017-09-14T07:46:09", "ScanText": "The shipment item has arrived at the distribution terminal" }, { "Code": "355", "Location": "Risskov", "ScanDate": "2017-09-14T04:12:24", "ScanText": "The shipment item is under transportation" }, { "Code": "31", "Location": "Fredericia", "ScanDate": "2017-09-14T02:02:25", "ScanText": "The shipment item is under transportation" }, { "Code": "13", "Location": "Køge", "ScanDate": "2017-09-13T13:12:45", "ScanText": "The shipment item has been picked-up for transportation" }, { "Code": "68", "Location": "", "ScanDate": "2017-09-12T11:30:00", "ScanText": "The electronic shipping instructions have been received" }, { "Code": null, "Location": "United Broker", "ScanDate": "9/12/2017 9:35:26 AM", "ScanText": "Information Received At UnitedBroker" } ], "SendersReference": "(10330168) ", "SignatureImage": "", "SignatureName": "Pernille Kvorning", "StatusCode": "Ok", "Weight": 9999 }
Adds tracking information to the shipment
https://ubapimanagement.azure-api.net/trackandtracetest/PostTrackAndTrace
https://ubapimanagement.azure-api.net/trackandtrace/PostTrackAndTrace
POST
{ "ShipmentAwb":"00257028800261580785", "ScanDate": "2016-10-20 15:46:30.5854767", "ScanServerTime": "2016-10-20 15:46:30.5854767", "ScanLocation": 0, "GPSLatitude": "", "GPSLongtitude": "", "ScanSignature": "", "ScanText": "Text test", "ScanCode":"2000", "BookingSystemStatus": "", "Origin": "", "CarrierWeight": 0.0, "CarrierVolume": 0.0, "CarrierLength": 0.0, "CarrierWidth": 0.0, "CarrierHeight": 0.0, "CarrierLoadmeter": 0.0, "CarrierColliWeight": 0.0, "CarrierColliVolume": 0.0, "CarrierColliLength": 0.0, "CarrierColliWidth": 0.0, "CarrierColliHeight": 0.0, "CarrierColliLoadmeter": 0.0, "ScanTypeId": 1, "ScanTypeName": "TrackAndTrace Test", "Credentials":{ "Username":"TestUser", "Password":"vDiSLNlkxEH5byq6" } }
Name | Type | Required | Description |
---|---|---|---|
ShipmentAwb | string |
Shipment identification number on our system (Barcode/ShipmentAwb/Reference) | |
Credentials | object |
Authentication details | |
ScanDate | string |
Example: 2016-10-07 18:05:10 | |
ScanServerTime | string |
Example: 2016-10-07 18:05:10 | |
ScanLocation | int |
||
GpsLatitude | string |
||
GpsLongtitude | string |
||
ScanSignature | string |
||
ScanText | string |
Scan message, which will be visible to the end user | |
ScanCode | string |
Scan code, which is unique per ScanText. | |
BookingSystemStatus | string |
Defines the state of the shipment. For example: InProgress,Delivered, ToBePickedUp | |
Origin | string |
Origin of the information. Can be the name of the carrier. | |
CarrierWeight | decimal |
||
CarrierVolume | decimal |
||
CarrierLength | decimal |
||
CarrierWidth | decimal |
||
CarrierHeight | decimal |
||
CarrierLoadmeter | decimal |
||
CarrierColliWeight | decimal |
||
CarrierColliLength | decimal |
||
CarrierColliHeight | decimal |
||
CarrierColliLoadmeter | decimal |
||
ScanTypeId | int |
Used to group information about the scans. If in doubt, please use 17 |
|
ScanTypeName | string |
Used to group information about the scans. If in doubt, please use TrackAndTrace |
Name | Type | Required | Description |
---|---|---|---|
Username | string |
Your username for your account in United Broker, which will let you to have access to the API. For testing purposes, please use TestUser |
|
Password | string |
Your username for your account in United Broker, which will let you to have access to the API. For testing purposes, please use vDiSLNlkxEH5byq6 |
Response is allways a json object, with StatusCode
and Message
if any error accured.
You will receive a status code 200
in the StatusCode
field if the request went well, else you will receive other error code in this field, and an error message in the Message
field.
{ "Message": "Booking line was not found. Was unable to insert the scan", "StatusCode": 404 }
{ "Message": "Scan processed successfully", "StatusCode": 200 }
Copyright © UBsend 2025. Alle rettigheder forbeholdes.