KEMBAR78
Oktana Shipping Component Sample API Callouts | PDF | United States Postal Service | Transport
0% found this document useful (0 votes)
235 views6 pages

Oktana Shipping Component Sample API Callouts

The document provides examples of API calls and responses for tracking shipments and packages from several carriers including DHL, FedEx, UPS, and USPS. A request is made to each carrier's tracking API with parameters like the tracking number. The response returns shipment details like status, location, and events for the given tracking number.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
235 views6 pages

Oktana Shipping Component Sample API Callouts

The document provides examples of API calls and responses for tracking shipments and packages from several carriers including DHL, FedEx, UPS, and USPS. A request is made to each carrier's tracking API with parameters like the tracking number. The response returns shipment details like status, location, and events for the given tracking number.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Sample API Callouts

DHL

Request:

https://api-eu.dhl.com/track/shipments?trackingNumber=7777777770

Headers:

DHL-API-Key: 9qioA8vJc51DSvchQX461UnZzNWTxxxx

Response:

{
"shipments": [
{
"id": "7777777770",
"service": "express",
"origin": {
"address": {
"addressLocality": "MILAN - PESCHIERA BORROMEO - ITALY"
}
},
"destination": {
"address": {
"addressLocality": "ZURICH - UNTERENGSTRINGEN - SWITZERLAND"
}
},
"status": {
"timestamp": "2020-12-07T21:30:00",
"location": {
"address": {
"addressLocality": "MILAN - ITALY"
}
},
"description": "Please contact DHL"
},
"details": {
"proofOfDelivery": {
"signatureUrl": "https://webpod.dhl.com/webPOD/DHLePODRequest?hwb=j9810tDFU8HZ2FQiTvG7Tg
%3D%3D&pudate=jiNPeY6aSw7abZB9N5hG3w%3D%3D&appuid=NeQLZmL2WBPaKWVDPTi1%2FA%3D
%3D&language=en&country=G0",
"documentUrl": "https://webpod.dhl.com/webPOD/DHLePODRequest?hwb=j9810tDFU8HZ2FQiTvG7Tg
%3D%3D&pudate=jiNPeY6aSw7abZB9N5hG3w%3D%3D&appuid=NeQLZmL2WBPaKWVDPTi1%2FA%3D
%3D&language=en&country=G0"
},
"totalNumberOfPieces": 1
},
"events": [
{
"timestamp": "2020-12-07T21:30:00",
"location": {
"address": {
"addressLocality": "MILAN - ITALY"
}
},
"description": "Please contact DHL"
},
{
"timestamp": "2020-12-07T21:00:00",
"location": {
"address": {
"addressLocality": "MILAN - ITALY"
}
},
"description": "Shipper has generated a shipment label, but the shipment has not yet been handed over
to DHL"
}
]
}
],
"possibleAdditionalShipmentsUrl": [
"/track/shipments?trackingNumber=7777777770&service=freight",
"/track/shipments?trackingNumber=7777777770&service=dgf",
"/track/shipments?trackingNumber=7777777770&service=ecommerce",
"/track/shipments?trackingNumber=7777777770&service=parcel-de",
"/track/shipments?trackingNumber=7777777770&service=parcel-nl",
"/track/shipments?trackingNumber=7777777770&service=parcel-pl"
]
}
FedEx

Request:

Response:
UPS

Request:

https://wwwcie.ups.com/track/v1/details/1Z5338FF0107231059

Headers:

transactionSrc: A_Test
AccessLicenseNumber: 2D916189F6E5xxxx
Content-Type: application/json
Accept: application/json

Response:

{
"trackResponse": {
"shipment": [
{
"package": [
{
"trackingNumber": "1Z5338FF0107231059",
"activity": [
{
"location": {
"address": {
"city": "BALDWIN",
"stateProvince": "MD",
"postalCode": "",
"country": "US"
}
},
"status": {
"type": "X",
"description": "DeliveryAttempted",
"code": "48"
},
"date": "20191121",
"time": "140400"
},
{
"location": {
"address": {
"city": "Sparks",
"stateProvince": "MD",
"postalCode": "",
"country": "US"
}
},
"status": {
"type": "X",
"description":
"Thereceiverwasnotavailablefordelivery.We'llmakeasecondattemptthenextbusinessday.",
"code": "48"
},
"date": "20191121",
"time": "135800"
},
{
"location": {
"address": {
"city": "",
"stateProvince": "",
"postalCode": "",
"country": "US"
}
},
"status": {
"type": "M",
"description": "OrderProcessed:ReadyforUPS",
"code": "MP"
},
"date": "20191119",
"time": "132642"
}
]
}
]
}
]
}
}
USPS

Request:

https://secure.shippingapis.com/shippingapi.dll?API=TrackV2&XML=<TrackRequest
USERID="863OKTANxxxx"><TrackID ID="9505511755661034338575"/></TrackRequest>

Response:

<?xml version="1.0" encoding="UTF-8"?>


<TrackResponse>
<TrackInfo ID="9505511755661034338575">
<TrackSummary>Your item was delivered at the front door or porch at 1:47 pm on February 5, 2021 in CASA
GRANDE, AZ 85122.</TrackSummary>
<TrackDetail>Out for Delivery, 02/05/2021, 7:38 am, CASA GRANDE, AZ 85122</TrackDetail>
<TrackDetail>Arrived at Post Office, February 5, 2021, 7:27 am, CASA GRANDE, AZ 85122</TrackDetail>
<TrackDetail>Departed USPS Regional Facility, 02/05/2021, 5:00 am, PHOENIX AZ DISTRIBUTION CENTER
ANNEX</TrackDetail>
<TrackDetail>Arrived at USPS Regional Destination Facility, 02/05/2021, 1:33 am, PHOENIX AZ
DISTRIBUTION CENTER ANNEX</TrackDetail>
<TrackDetail>Departed USPS Regional Facility, February 4, 2021, 4:19 am, CHARLESTON WV PROCESSING
CENTER</TrackDetail>
<TrackDetail>Arrived at USPS Regional Origin Facility, 02/03/2021, 8:13 pm, CHARLESTON WV PROCESSING
CENTER</TrackDetail>
<TrackDetail>Departed Post Office, February 3, 2021, 5:04 pm, WINFIELD, WV 25213</TrackDetail>
<TrackDetail>USPS in possession of item, February 3, 2021, 4:01 pm, WINFIELD, WV 25213</TrackDetail>
</TrackInfo>
</TrackResponse>

You might also like