Back to Collection Items
#include <C_CkHttpW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkHttpResponseW.h>
#include <C_CkStringBuilderW.h>
void ChilkatSample(void)
{
HCkHttpW http;
BOOL success;
HCkJsonObjectW queryParams;
HCkHttpResponseW resp;
HCkStringBuilderW sbResponseBody;
HCkJsonObjectW jResp;
int respStatusCode;
const wchar_t *shipmentTrackingNumber;
const wchar_t *status;
const wchar_t *shipmentTimestamp;
const wchar_t *productCode;
const wchar_t *description;
const wchar_t *Name;
const wchar_t *CityName;
const wchar_t *CountyName;
const wchar_t *PostalCode;
const wchar_t *ProvinceCode;
const wchar_t *CountryCode;
const wchar_t *AccountNumber;
const wchar_t *receiverDetailsName;
const wchar_t *PostalAddressCityName;
const wchar_t *PostalAddressCountyName;
const wchar_t *PostalAddressPostalCode;
const wchar_t *PostalAddressProvinceCode;
const wchar_t *PostalAddressCountryCode;
int totalWeight;
const wchar_t *unitOfMeasurements;
int numberOfPieces;
const wchar_t *estimatedDeliveryDate;
int j;
int count_j;
const wchar_t *date;
const wchar_t *time;
const wchar_t *typeCode;
const wchar_t *signedBy;
int k;
int count_k;
const wchar_t *code;
const wchar_t *outboundSortCode;
const wchar_t *facilityCode;
const wchar_t *inboundSortCode;
const wchar_t *value;
int v_number;
const wchar_t *trackingNumber;
const wchar_t *weight;
const wchar_t *dimensionalWeight;
const wchar_t *actualWeight;
int Length;
int Width;
int Height;
int actualDimensionsLength;
int actualDimensionsWidth;
int actualDimensionsHeight;
HCkJsonObjectW json1;
int i1;
int count_i1;
const wchar_t *Value;
const wchar_t *descriptionValue;
const wchar_t *strVal;
int i;
int count_i;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http = CkHttpW_Create();
CkHttpW_putBasicAuth(http,TRUE);
CkHttpW_putLogin(http,L"<Basic Auth Username>");
CkHttpW_putPassword(http,L"<Basic Auth Password>");
queryParams = CkJsonObjectW_Create();
CkJsonObjectW_UpdateString(queryParams,L"trackingView",L"all-checkpoints");
CkJsonObjectW_UpdateString(queryParams,L"levelOfDetail",L"all");
CkHttpW_SetRequestHeader(http,L"Webstore-Platform-Name",L"");
CkHttpW_SetRequestHeader(http,L"Accept-Language",L"eng");
CkHttpW_SetRequestHeader(http,L"Shipping-System-Platform-Name",L"");
CkHttpW_SetRequestHeader(http,L"Message-Reference",L"d0e7832e-5c98-11ea-bc55-0242ac13");
CkHttpW_SetRequestHeader(http,L"Plugin-Version",L"");
CkHttpW_SetRequestHeader(http,L"Plugin-Name",L"");
CkHttpW_SetRequestHeader(http,L"Shipping-System-Platform-Version",L"");
CkHttpW_SetRequestHeader(http,L"Accept",L"application/json");
CkHttpW_SetRequestHeader(http,L"Message-Reference-Date",L"Wed, 21 Oct 2015 07:28:00 GMT");
CkHttpW_SetRequestHeader(http,L"Webstore-Platform-Version",L"");
resp = CkHttpW_QuickRequestParams(http,L"GET",L"https://api-mock.dhl.com/mydhlapi/shipments/:shipmentTrackingNumber/tracking",queryParams);
if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
wprintf(L"%s\n",CkHttpW_lastErrorText(http));
CkHttpW_Dispose(http);
CkJsonObjectW_Dispose(queryParams);
return;
}
sbResponseBody = CkStringBuilderW_Create();
CkHttpResponseW_GetBodySb(resp,sbResponseBody);
jResp = CkJsonObjectW_Create();
CkJsonObjectW_LoadSb(jResp,sbResponseBody);
CkJsonObjectW_putEmitCompact(jResp,FALSE);
wprintf(L"Response Body:\n");
wprintf(L"%s\n",CkJsonObjectW_emit(jResp));
respStatusCode = CkHttpResponseW_getStatusCode(resp);
wprintf(L"Response Status Code = %d\n",respStatusCode);
if (respStatusCode >= 400) {
wprintf(L"Response Header:\n");
wprintf(L"%s\n",CkHttpResponseW_header(resp));
wprintf(L"Failed.\n");
CkHttpResponseW_Dispose(resp);
CkHttpW_Dispose(http);
CkJsonObjectW_Dispose(queryParams);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
return;
}
CkHttpResponseW_Dispose(resp);
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "shipments": [
// {
// "events": [
// {
// "date": "2020-06-10",
// "time": "13:06:00",
// "typeCode": "PU",
// "description": "Shipment picked up",
// "serviceArea": [
// {
// "code": "BNE",
// "description": "Brisbane-AU"
// },
// {
// "code": "BNE",
// "description": "Brisbane-AU"
// }
// ],
// "signedBy": "Mr.Grey"
// },
// {
// "date": "2020-06-10",
// "time": "13:06:00",
// "typeCode": "PU",
// "description": "Shipment picked up",
// "serviceArea": [
// {
// "code": "BNE",
// "description": "Brisbane-AU"
// },
// {
// "code": "BNE",
// "description": "Brisbane-AU"
// }
// ],
// "signedBy": "Mr.Grey"
// }
// ],
// "shipmentTrackingNumber": "1234567890",
// "status": "Success",
// "shipmentTimestamp": "2020-05-14T18:00:31",
// "productCode": "N",
// "description": "Shipment Description",
// "shipperDetails": {
// "name": "SABO SKIRT",
// "postalAddress": {
// "cityName": "Brno",
// "countyName": "Moravia",
// "postalCode": "55500",
// "provinceCode": "CZ",
// "countryCode": "CZ"
// },
// "serviceArea": [
// {
// "code": "ABC",
// "description": "Alpha Beta Area",
// "outboundSortCode": "ullamco Duis"
// },
// {
// "code": "ABC",
// "description": "Alpha Beta Area",
// "outboundSortCode": "sunt eu"
// }
// ],
// "accountNumber": "ipsum sed officia"
// },
// "receiverDetails": {
// "name": "SABO SKIRT",
// "postalAddress": {
// "cityName": "Bratislava",
// "countyName": "Slovakia",
// "postalCode": "77777",
// "provinceCode": "SK",
// "countryCode": "SK"
// },
// "serviceArea": [
// {
// "code": "BSA",
// "description": "BSA Area",
// "facilityCode": "facil area",
// "inboundSortCode": "Dui"
// },
// {
// "code": "BSA",
// "description": "BSA Area",
// "facilityCode": "facil area",
// "inboundSortCode": "velit"
// }
// ]
// },
// "totalWeight": 10,
// "unitOfMeasurements": "metric",
// "shipperReferences": [
// {
// "value": "Customer reference",
// "typeCode": "CU"
// },
// {
// "value": "Customer reference",
// "typeCode": "CU"
// }
// ],
// "numberOfPieces": 1,
// "pieces": [
// {
// "events": [
// {
// "date": "labore sit exercitation",
// "time": "dolore enim",
// "typeCode": "Excepteur tempor enim paria",
// "description": "cupidatat commodo in nostrud",
// "serviceArea": [
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// },
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// }
// ],
// "signedBy": "magna Excepteur"
// },
// {
// "date": "aute nulla a",
// "time": "mollit",
// "typeCode": "id laborum ad sit",
// "description": "proident Ut i",
// "serviceArea": [
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// },
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// }
// ],
// "signedBy": "in eu veniam"
// }
// ],
// "number": 1,
// "typeCode": "ut veniam aliqua",
// "shipmentTrackingNumber": "velit ex ullamco",
// "trackingNumber": "nulla dolore nisi minim ea",
// "description": "aliqua aliquip sed in",
// "weight": 22.5,
// "dimensionalWeight": 22.5,
// "actualWeight": 22.5,
// "dimensions": {
// "length": 15,
// "width": 15,
// "height": 40
// },
// "actualDimensions": {
// "length": 15,
// "width": 15,
// "height": 40
// },
// "unitOfMeasurements": "est ea dolore sunt",
// "shipperReferences": [
// {
// "value": "Customer reference",
// "typeCode": "CU"
// },
// {
// "value": "Customer reference",
// "typeCode": "CU"
// }
// ]
// },
// {
// "events": [
// {
// "date": "Ut sit exercitation et",
// "time": "ut enim s",
// "typeCode": "e",
// "description": "in aliquip qui id",
// "serviceArea": [
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// },
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// }
// ],
// "signedBy": "ut sit aliquip veniam"
// },
// {
// "date": "ex adipisicing laborum in",
// "time": "ut tempor aliquip occaecat",
// "typeCode": "ad",
// "description": "irure sed aute",
// "serviceArea": [
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// },
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// }
// ],
// "signedBy": "sint laboris"
// }
// ],
// "number": 1,
// "typeCode": "amet ullamco eiusmod est in",
// "shipmentTrackingNumber": "do magna laboris ad",
// "trackingNumber": "dolor incididunt ad proident",
// "description": "exercitation in dolor",
// "weight": 22.5,
// "dimensionalWeight": 22.5,
// "actualWeight": 22.5,
// "dimensions": {
// "length": 15,
// "width": 15,
// "height": 40
// },
// "actualDimensions": {
// "length": 15,
// "width": 15,
// "height": 40
// },
// "unitOfMeasurements": "laboris",
// "shipperReferences": [
// {
// "value": "Customer reference",
// "typeCode": "CU"
// },
// {
// "value": "Customer reference",
// "typeCode": "CU"
// }
// ]
// }
// ],
// "estimatedDeliveryDate": "2020-06-12",
// "childrenShipmentIdentificationNumbers": [
// "1234567890",
// "1234567890"
// ]
// },
// {
// "events": [
// {
// "date": "2020-06-10",
// "time": "13:06:00",
// "typeCode": "PU",
// "description": "Shipment picked up",
// "serviceArea": [
// {
// "code": "BNE",
// "description": "Brisbane-AU"
// },
// {
// "code": "BNE",
// "description": "Brisbane-AU"
// }
// ],
// "signedBy": "Mr.Grey"
// },
// {
// "date": "2020-06-10",
// "time": "13:06:00",
// "typeCode": "PU",
// "description": "Shipment picked up",
// "serviceArea": [
// {
// "code": "BNE",
// "description": "Brisbane-AU"
// },
// {
// "code": "BNE",
// "description": "Brisbane-AU"
// }
// ],
// "signedBy": "Mr.Grey"
// }
// ],
// "shipmentTrackingNumber": "1234567890",
// "status": "Success",
// "shipmentTimestamp": "2020-05-14T18:00:31",
// "productCode": "N",
// "description": "Shipment Description",
// "shipperDetails": {
// "name": "SABO SKIRT",
// "postalAddress": {
// "cityName": "Brno",
// "countyName": "Moravia",
// "postalCode": "55500",
// "provinceCode": "CZ",
// "countryCode": "CZ"
// },
// "serviceArea": [
// {
// "code": "ABC",
// "description": "Alpha Beta Area",
// "outboundSortCode": "ut enim esse in incididunt"
// },
// {
// "code": "ABC",
// "description": "Alpha Beta Area",
// "outboundSortCode": "anim pariatur adipisicing ipsum"
// }
// ],
// "accountNumber": "nostrud"
// },
// "receiverDetails": {
// "name": "SABO SKIRT",
// "postalAddress": {
// "cityName": "Bratislava",
// "countyName": "Slovakia",
// "postalCode": "77777",
// "provinceCode": "SK",
// "countryCode": "SK"
// },
// "serviceArea": [
// {
// "code": "BSA",
// "description": "BSA Area",
// "facilityCode": "facil area",
// "inboundSortCode": "magna sit"
// },
// {
// "code": "BSA",
// "description": "BSA Area",
// "facilityCode": "facil area",
// "inboundSortCode": "ut nulla in occaecat"
// }
// ]
// },
// "totalWeight": 10,
// "unitOfMeasurements": "metric",
// "shipperReferences": [
// {
// "value": "Customer reference",
// "typeCode": "CU"
// },
// {
// "value": "Customer reference",
// "typeCode": "CU"
// }
// ],
// "numberOfPieces": 1,
// "pieces": [
// {
// "events": [
// {
// "date": "enim in",
// "time": "anim nostrud ad molli",
// "typeCode": "dolor consectetur",
// "description": "cillum reprehenderit incididunt es",
// "serviceArea": [
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// },
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// }
// ],
// "signedBy": "cupidatat esse quis Excepteur"
// },
// {
// "date": "",
// "time": "cupidatat",
// "typeCode": "ame",
// "description": "dolore nulla ",
// "serviceArea": [
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// },
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// }
// ],
// "signedBy": "nulla sint id sed"
// }
// ],
// "number": 1,
// "typeCode": "ea dolore dolore occaecat",
// "shipmentTrackingNumber": "do aliqua sit",
// "trackingNumber": "adipisicing veniam in",
// "description": "commodo fugiat",
// "weight": 22.5,
// "dimensionalWeight": 22.5,
// "actualWeight": 22.5,
// "dimensions": {
// "length": 15,
// "width": 15,
// "height": 40
// },
// "actualDimensions": {
// "length": 15,
// "width": 15,
// "height": 40
// },
// "unitOfMeasurements": "do esse fugiat",
// "shipperReferences": [
// {
// "value": "Customer reference",
// "typeCode": "CU"
// },
// {
// "value": "Customer reference",
// "typeCode": "CU"
// }
// ]
// },
// {
// "events": [
// {
// "date": "esse dolore",
// "time": "tempor deserunt proident",
// "typeCode": "sit do",
// "description": "ipsum commodo sunt officia",
// "serviceArea": [
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// },
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// }
// ],
// "signedBy": "irure culpa"
// },
// {
// "date": "Duis amet nostrud",
// "time": "sit eu id",
// "typeCode": "Lorem ad",
// "description": "amet",
// "serviceArea": [
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// },
// {
// "code": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// },
// "description": {
// "value": "<Error: Too many levels of nesting to fake this schema>"
// }
// }
// ],
// "signedBy": "minim occaec"
// }
// ],
// "number": 1,
// "typeCode": "dolor Duis reprehenderit",
// "shipmentTrackingNumber": "incididunt ",
// "trackingNumber": "cillum minim cupidatat",
// "description": "sed voluptate",
// "weight": 22.5,
// "dimensionalWeight": 22.5,
// "actualWeight": 22.5,
// "dimensions": {
// "length": 15,
// "width": 15,
// "height": 40
// },
// "actualDimensions": {
// "length": 15,
// "width": 15,
// "height": 40
// },
// "unitOfMeasurements": "consequat exercitation nulla",
// "shipperReferences": [
// {
// "value": "Customer reference",
// "typeCode": "CU"
// },
// {
// "value": "Customer reference",
// "typeCode": "CU"
// }
// ]
// }
// ],
// "estimatedDeliveryDate": "2020-06-12",
// "childrenShipmentIdentificationNumbers": [
// "1234567890",
// "1234567890"
// ]
// }
// ]
// }
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"shipments");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
shipmentTrackingNumber = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipmentTrackingNumber");
status = CkJsonObjectW_stringOf(jResp,L"shipments[i].status");
shipmentTimestamp = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipmentTimestamp");
productCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].productCode");
description = CkJsonObjectW_stringOf(jResp,L"shipments[i].description");
Name = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.name");
CityName = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.postalAddress.cityName");
CountyName = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.postalAddress.countyName");
PostalCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.postalAddress.postalCode");
ProvinceCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.postalAddress.provinceCode");
CountryCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.postalAddress.countryCode");
AccountNumber = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.accountNumber");
receiverDetailsName = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.name");
PostalAddressCityName = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.postalAddress.cityName");
PostalAddressCountyName = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.postalAddress.countyName");
PostalAddressPostalCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.postalAddress.postalCode");
PostalAddressProvinceCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.postalAddress.provinceCode");
PostalAddressCountryCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.postalAddress.countryCode");
totalWeight = CkJsonObjectW_IntOf(jResp,L"shipments[i].totalWeight");
unitOfMeasurements = CkJsonObjectW_stringOf(jResp,L"shipments[i].unitOfMeasurements");
numberOfPieces = CkJsonObjectW_IntOf(jResp,L"shipments[i].numberOfPieces");
estimatedDeliveryDate = CkJsonObjectW_stringOf(jResp,L"shipments[i].estimatedDeliveryDate");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].events");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
date = CkJsonObjectW_stringOf(jResp,L"shipments[i].events[j].date");
time = CkJsonObjectW_stringOf(jResp,L"shipments[i].events[j].time");
typeCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].events[j].typeCode");
description = CkJsonObjectW_stringOf(jResp,L"shipments[i].events[j].description");
signedBy = CkJsonObjectW_stringOf(jResp,L"shipments[i].events[j].signedBy");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].events[j].serviceArea");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
code = CkJsonObjectW_stringOf(jResp,L"shipments[i].events[j].serviceArea[k].code");
description = CkJsonObjectW_stringOf(jResp,L"shipments[i].events[j].serviceArea[k].description");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].shipperDetails.serviceArea");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
code = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.serviceArea[j].code");
description = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.serviceArea[j].description");
outboundSortCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperDetails.serviceArea[j].outboundSortCode");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].receiverDetails.serviceArea");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
code = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.serviceArea[j].code");
description = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.serviceArea[j].description");
facilityCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.serviceArea[j].facilityCode");
inboundSortCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].receiverDetails.serviceArea[j].inboundSortCode");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].shipperReferences");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
value = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperReferences[j].value");
typeCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].shipperReferences[j].typeCode");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].pieces");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
v_number = CkJsonObjectW_IntOf(jResp,L"shipments[i].pieces[j].number");
typeCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].typeCode");
shipmentTrackingNumber = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].shipmentTrackingNumber");
trackingNumber = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].trackingNumber");
description = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].description");
weight = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].weight");
dimensionalWeight = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].dimensionalWeight");
actualWeight = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].actualWeight");
Length = CkJsonObjectW_IntOf(jResp,L"shipments[i].pieces[j].dimensions.length");
Width = CkJsonObjectW_IntOf(jResp,L"shipments[i].pieces[j].dimensions.width");
Height = CkJsonObjectW_IntOf(jResp,L"shipments[i].pieces[j].dimensions.height");
actualDimensionsLength = CkJsonObjectW_IntOf(jResp,L"shipments[i].pieces[j].actualDimensions.length");
actualDimensionsWidth = CkJsonObjectW_IntOf(jResp,L"shipments[i].pieces[j].actualDimensions.width");
actualDimensionsHeight = CkJsonObjectW_IntOf(jResp,L"shipments[i].pieces[j].actualDimensions.height");
unitOfMeasurements = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].unitOfMeasurements");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].pieces[j].events");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
date = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].events[k].date");
time = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].events[k].time");
typeCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].events[k].typeCode");
description = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].events[k].description");
signedBy = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].events[k].signedBy");
json1 = CkJsonObjectW_ObjectOf(jResp,L"shipments[i].pieces[j].events[k]");
i1 = 0;
count_i1 = CkJsonObjectW_SizeOfArray(json1,L"serviceArea");
while (i1 < count_i1) {
CkJsonObjectW_putI(json1,i1);
Value = CkJsonObjectW_stringOf(json1,L"serviceArea[i].code.value");
descriptionValue = CkJsonObjectW_stringOf(json1,L"serviceArea[i].description.value");
i1 = i1 + 1;
}
CkJsonObjectW_Dispose(json1);
k = k + 1;
}
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].pieces[j].shipperReferences");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
value = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].shipperReferences[k].value");
typeCode = CkJsonObjectW_stringOf(jResp,L"shipments[i].pieces[j].shipperReferences[k].typeCode");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"shipments[i].childrenShipmentIdentificationNumbers");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"shipments[i].childrenShipmentIdentificationNumbers[j]");
j = j + 1;
}
i = i + 1;
}
CkHttpW_Dispose(http);
CkJsonObjectW_Dispose(queryParams);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
}
Curl Command
curl -G -d "trackingView=all-checkpoints"
-d "levelOfDetail=all"
-u '<Basic Auth Username>:<Basic Auth Password>'
-H "Message-Reference: d0e7832e-5c98-11ea-bc55-0242ac13"
-H "Message-Reference-Date: Wed, 21 Oct 2015 07:28:00 GMT"
-H "Accept-Language: eng"
-H "Plugin-Name: "
-H "Plugin-Version: "
-H "Shipping-System-Platform-Name: "
-H "Shipping-System-Platform-Version: "
-H "Webstore-Platform-Name: "
-H "Webstore-Platform-Version: "
-H "Accept: application/json"
https://api-mock.dhl.com/mydhlapi/shipments/:shipmentTrackingNumber/tracking
Postman Collection Item JSON
{
"name": "Track a single DHL Express Shipment",
"request": {
"method": "GET",
"header": [
{
"description": "Please provide message reference\n",
"key": "Message-Reference",
"value": "d0e7832e-5c98-11ea-bc55-0242ac13"
},
{
"description": "Optional reference date in the HTTP-date format https://tools.ietf.org/html/rfc7231#section-7.1.1.2",
"key": "Message-Reference-Date",
"value": "Wed, 21 Oct 2015 07:28:00 GMT"
},
{
"key": "Accept-Language",
"value": "eng"
},
{
"description": "Please provide name of the plugin (applicable to 3PV only)\n",
"key": "Plugin-Name",
"value": " "
},
{
"description": "Please provide version of the plugin (applicable to 3PV only)\n",
"key": "Plugin-Version",
"value": " "
},
{
"description": "Please provide name of the shipping platform(applicable to 3PV only)\n",
"key": "Shipping-System-Platform-Name",
"value": " "
},
{
"description": "Please provide version of the shipping platform (applicable to 3PV only)\n",
"key": "Shipping-System-Platform-Version",
"value": " "
},
{
"description": "Please provide name of the webstore platform (applicable to 3PV only)\n",
"key": "Webstore-Platform-Name",
"value": " "
},
{
"description": "Please provide version of the webstore platform (applicable to 3PV only)\n",
"key": "Webstore-Platform-Version",
"value": " "
},
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/shipments/:shipmentTrackingNumber/tracking?trackingView=all-checkpoints&levelOfDetail=all",
"host": [
"{{baseUrl}}"
],
"path": [
"shipments",
":shipmentTrackingNumber",
"tracking"
],
"query": [
{
"key": "trackingView",
"value": "all-checkpoints"
},
{
"key": "levelOfDetail",
"value": "all"
}
],
"variable": [
{
"key": "shipmentTrackingNumber",
"value": "dolor veniam officia non",
"description": "(Required) DHL Express shipment identification number"
}
]
},
"description": "The Tracking service retrieves tracking statuses for a single DHL Express Shipment\n"
},
"response": [
{
"name": "Shipment details found",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: basic",
"key": "Authorization",
"value": "Basic <credentials>"
},
{
"description": "Please provide message reference\n",
"key": "Message-Reference",
"value": "d0e7832e-5c98-11ea-bc55-0242ac13"
},
{
"description": "Optional reference date in the HTTP-date format https://tools.ietf.org/html/rfc7231#section-7.1.1.2",
"key": "Message-Reference-Date",
"value": "Wed, 21 Oct 2015 07:28:00 GMT"
},
{
"key": "Accept-Language",
"value": "eng"
},
{
"description": "Please provide name of the plugin (applicable to 3PV only)\n",
"key": "Plugin-Name",
"value": " "
},
{
"description": "Please provide version of the plugin (applicable to 3PV only)\n",
"key": "Plugin-Version",
"value": " "
},
{
"description": "Please provide name of the shipping platform(applicable to 3PV only)\n",
"key": "Shipping-System-Platform-Name",
"value": " "
},
{
"description": "Please provide version of the shipping platform (applicable to 3PV only)\n",
"key": "Shipping-System-Platform-Version",
"value": " "
},
{
"description": "Please provide name of the webstore platform (applicable to 3PV only)\n",
"key": "Webstore-Platform-Name",
"value": " "
},
{
"description": "Please provide version of the webstore platform (applicable to 3PV only)\n",
"key": "Webstore-Platform-Version",
"value": " "
}
],
"url": {
"raw": "{{baseUrl}}/shipments/:shipmentTrackingNumber/tracking?trackingView=all-checkpoints&levelOfDetail=all",
"host": [
"{{baseUrl}}"
],
"path": [
"shipments",
":shipmentTrackingNumber",
"tracking"
],
"query": [
{
"key": "trackingView",
"value": "all-checkpoints"
},
{
"key": "levelOfDetail",
"value": "all"
}
],
"variable": [
{
"key": "shipmentTrackingNumber",
"value": "dolor veniam officia non",
"description": "(Required) DHL Express shipment identification number"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Invocation-Id",
"value": "sed ut mollit",
"description": "Unique identifier of the transaction"
},
{
"key": "Message-Reference",
"value": "sed ut mollit",
"description": "Message reference provided by customer as part of reqeust or automatically generated when not provided"
},
{
"key": "Content-Language",
"value": "sed ut mollit",
"description": ""
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"shipments\": [\n {\n \"events\": [\n {\n \"date\": \"2020-06-10\",\n \"time\": \"13:06:00\",\n \"typeCode\": \"PU\",\n \"description\": \"Shipment picked up\",\n \"serviceArea\": [\n {\n \"code\": \"BNE\",\n \"description\": \"Brisbane-AU\"\n },\n {\n \"code\": \"BNE\",\n \"description\": \"Brisbane-AU\"\n }\n ],\n \"signedBy\": \"Mr.Grey\"\n },\n {\n \"date\": \"2020-06-10\",\n \"time\": \"13:06:00\",\n \"typeCode\": \"PU\",\n \"description\": \"Shipment picked up\",\n \"serviceArea\": [\n {\n \"code\": \"BNE\",\n \"description\": \"Brisbane-AU\"\n },\n {\n \"code\": \"BNE\",\n \"description\": \"Brisbane-AU\"\n }\n ],\n \"signedBy\": \"Mr.Grey\"\n }\n ],\n \"shipmentTrackingNumber\": \"1234567890\",\n \"status\": \"Success\",\n \"shipmentTimestamp\": \"2020-05-14T18:00:31\",\n \"productCode\": \"N\",\n \"description\": \"Shipment Description\",\n \"shipperDetails\": {\n \"name\": \"SABO SKIRT\",\n \"postalAddress\": {\n \"cityName\": \"Brno\",\n \"countyName\": \"Moravia\",\n \"postalCode\": \"55500\",\n \"provinceCode\": \"CZ\",\n \"countryCode\": \"CZ\"\n },\n \"serviceArea\": [\n {\n \"code\": \"ABC\",\n \"description\": \"Alpha Beta Area\",\n \"outboundSortCode\": \"ullamco Duis\"\n },\n {\n \"code\": \"ABC\",\n \"description\": \"Alpha Beta Area\",\n \"outboundSortCode\": \"sunt eu\"\n }\n ],\n \"accountNumber\": \"ipsum sed officia\"\n },\n \"receiverDetails\": {\n \"name\": \"SABO SKIRT\",\n \"postalAddress\": {\n \"cityName\": \"Bratislava\",\n \"countyName\": \"Slovakia\",\n \"postalCode\": \"77777\",\n \"provinceCode\": \"SK\",\n \"countryCode\": \"SK\"\n },\n \"serviceArea\": [\n {\n \"code\": \"BSA\",\n \"description\": \"BSA Area\",\n \"facilityCode\": \"facil area\",\n \"inboundSortCode\": \"Dui\"\n },\n {\n \"code\": \"BSA\",\n \"description\": \"BSA Area\",\n \"facilityCode\": \"facil area\",\n \"inboundSortCode\": \"velit\"\n }\n ]\n },\n \"totalWeight\": 10,\n \"unitOfMeasurements\": \"metric\",\n \"shipperReferences\": [\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n },\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n }\n ],\n \"numberOfPieces\": 1,\n \"pieces\": [\n {\n \"events\": [\n {\n \"date\": \"labore sit exercitation\",\n \"time\": \"dolore enim\",\n \"typeCode\": \"Excepteur tempor enim paria\",\n \"description\": \"cupidatat commodo in nostrud\",\n \"serviceArea\": [\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"signedBy\": \"magna Excepteur\"\n },\n {\n \"date\": \"aute nulla a\",\n \"time\": \"mollit\",\n \"typeCode\": \"id laborum ad sit\",\n \"description\": \"proident Ut i\",\n \"serviceArea\": [\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"signedBy\": \"in eu veniam\"\n }\n ],\n \"number\": 1,\n \"typeCode\": \"ut veniam aliqua\",\n \"shipmentTrackingNumber\": \"velit ex ullamco\",\n \"trackingNumber\": \"nulla dolore nisi minim ea\",\n \"description\": \"aliqua aliquip sed in\",\n \"weight\": 22.5,\n \"dimensionalWeight\": 22.5,\n \"actualWeight\": 22.5,\n \"dimensions\": {\n \"length\": 15,\n \"width\": 15,\n \"height\": 40\n },\n \"actualDimensions\": {\n \"length\": 15,\n \"width\": 15,\n \"height\": 40\n },\n \"unitOfMeasurements\": \"est ea dolore sunt\",\n \"shipperReferences\": [\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n },\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n }\n ]\n },\n {\n \"events\": [\n {\n \"date\": \"Ut sit exercitation et\",\n \"time\": \"ut enim s\",\n \"typeCode\": \"e\",\n \"description\": \"in aliquip qui id\",\n \"serviceArea\": [\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"signedBy\": \"ut sit aliquip veniam\"\n },\n {\n \"date\": \"ex adipisicing laborum in\",\n \"time\": \"ut tempor aliquip occaecat\",\n \"typeCode\": \"ad\",\n \"description\": \"irure sed aute\",\n \"serviceArea\": [\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"signedBy\": \"sint laboris\"\n }\n ],\n \"number\": 1,\n \"typeCode\": \"amet ullamco eiusmod est in\",\n \"shipmentTrackingNumber\": \"do magna laboris ad\",\n \"trackingNumber\": \"dolor incididunt ad proident\",\n \"description\": \"exercitation in dolor\",\n \"weight\": 22.5,\n \"dimensionalWeight\": 22.5,\n \"actualWeight\": 22.5,\n \"dimensions\": {\n \"length\": 15,\n \"width\": 15,\n \"height\": 40\n },\n \"actualDimensions\": {\n \"length\": 15,\n \"width\": 15,\n \"height\": 40\n },\n \"unitOfMeasurements\": \"laboris\",\n \"shipperReferences\": [\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n },\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n }\n ]\n }\n ],\n \"estimatedDeliveryDate\": \"2020-06-12\",\n \"childrenShipmentIdentificationNumbers\": [\n \"1234567890\",\n \"1234567890\"\n ]\n },\n {\n \"events\": [\n {\n \"date\": \"2020-06-10\",\n \"time\": \"13:06:00\",\n \"typeCode\": \"PU\",\n \"description\": \"Shipment picked up\",\n \"serviceArea\": [\n {\n \"code\": \"BNE\",\n \"description\": \"Brisbane-AU\"\n },\n {\n \"code\": \"BNE\",\n \"description\": \"Brisbane-AU\"\n }\n ],\n \"signedBy\": \"Mr.Grey\"\n },\n {\n \"date\": \"2020-06-10\",\n \"time\": \"13:06:00\",\n \"typeCode\": \"PU\",\n \"description\": \"Shipment picked up\",\n \"serviceArea\": [\n {\n \"code\": \"BNE\",\n \"description\": \"Brisbane-AU\"\n },\n {\n \"code\": \"BNE\",\n \"description\": \"Brisbane-AU\"\n }\n ],\n \"signedBy\": \"Mr.Grey\"\n }\n ],\n \"shipmentTrackingNumber\": \"1234567890\",\n \"status\": \"Success\",\n \"shipmentTimestamp\": \"2020-05-14T18:00:31\",\n \"productCode\": \"N\",\n \"description\": \"Shipment Description\",\n \"shipperDetails\": {\n \"name\": \"SABO SKIRT\",\n \"postalAddress\": {\n \"cityName\": \"Brno\",\n \"countyName\": \"Moravia\",\n \"postalCode\": \"55500\",\n \"provinceCode\": \"CZ\",\n \"countryCode\": \"CZ\"\n },\n \"serviceArea\": [\n {\n \"code\": \"ABC\",\n \"description\": \"Alpha Beta Area\",\n \"outboundSortCode\": \"ut enim esse in incididunt\"\n },\n {\n \"code\": \"ABC\",\n \"description\": \"Alpha Beta Area\",\n \"outboundSortCode\": \"anim pariatur adipisicing ipsum\"\n }\n ],\n \"accountNumber\": \"nostrud\"\n },\n \"receiverDetails\": {\n \"name\": \"SABO SKIRT\",\n \"postalAddress\": {\n \"cityName\": \"Bratislava\",\n \"countyName\": \"Slovakia\",\n \"postalCode\": \"77777\",\n \"provinceCode\": \"SK\",\n \"countryCode\": \"SK\"\n },\n \"serviceArea\": [\n {\n \"code\": \"BSA\",\n \"description\": \"BSA Area\",\n \"facilityCode\": \"facil area\",\n \"inboundSortCode\": \"magna sit\"\n },\n {\n \"code\": \"BSA\",\n \"description\": \"BSA Area\",\n \"facilityCode\": \"facil area\",\n \"inboundSortCode\": \"ut nulla in occaecat\"\n }\n ]\n },\n \"totalWeight\": 10,\n \"unitOfMeasurements\": \"metric\",\n \"shipperReferences\": [\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n },\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n }\n ],\n \"numberOfPieces\": 1,\n \"pieces\": [\n {\n \"events\": [\n {\n \"date\": \"enim in\",\n \"time\": \"anim nostrud ad molli\",\n \"typeCode\": \"dolor consectetur\",\n \"description\": \"cillum reprehenderit incididunt es\",\n \"serviceArea\": [\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"signedBy\": \"cupidatat esse quis Excepteur\"\n },\n {\n \"date\": \"\",\n \"time\": \"cupidatat\",\n \"typeCode\": \"ame\",\n \"description\": \"dolore nulla \",\n \"serviceArea\": [\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"signedBy\": \"nulla sint id sed\"\n }\n ],\n \"number\": 1,\n \"typeCode\": \"ea dolore dolore occaecat\",\n \"shipmentTrackingNumber\": \"do aliqua sit\",\n \"trackingNumber\": \"adipisicing veniam in\",\n \"description\": \"commodo fugiat\",\n \"weight\": 22.5,\n \"dimensionalWeight\": 22.5,\n \"actualWeight\": 22.5,\n \"dimensions\": {\n \"length\": 15,\n \"width\": 15,\n \"height\": 40\n },\n \"actualDimensions\": {\n \"length\": 15,\n \"width\": 15,\n \"height\": 40\n },\n \"unitOfMeasurements\": \"do esse fugiat\",\n \"shipperReferences\": [\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n },\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n }\n ]\n },\n {\n \"events\": [\n {\n \"date\": \"esse dolore\",\n \"time\": \"tempor deserunt proident\",\n \"typeCode\": \"sit do\",\n \"description\": \"ipsum commodo sunt officia\",\n \"serviceArea\": [\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"signedBy\": \"irure culpa\"\n },\n {\n \"date\": \"Duis amet nostrud\",\n \"time\": \"sit eu id\",\n \"typeCode\": \"Lorem ad\",\n \"description\": \"amet\",\n \"serviceArea\": [\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"code\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"description\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"signedBy\": \"minim occaec\"\n }\n ],\n \"number\": 1,\n \"typeCode\": \"dolor Duis reprehenderit\",\n \"shipmentTrackingNumber\": \"incididunt \",\n \"trackingNumber\": \"cillum minim cupidatat\",\n \"description\": \"sed voluptate\",\n \"weight\": 22.5,\n \"dimensionalWeight\": 22.5,\n \"actualWeight\": 22.5,\n \"dimensions\": {\n \"length\": 15,\n \"width\": 15,\n \"height\": 40\n },\n \"actualDimensions\": {\n \"length\": 15,\n \"width\": 15,\n \"height\": 40\n },\n \"unitOfMeasurements\": \"consequat exercitation nulla\",\n \"shipperReferences\": [\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n },\n {\n \"value\": \"Customer reference\",\n \"typeCode\": \"CU\"\n }\n ]\n }\n ],\n \"estimatedDeliveryDate\": \"2020-06-12\",\n \"childrenShipmentIdentificationNumbers\": [\n \"1234567890\",\n \"1234567890\"\n ]\n }\n ]\n}"
},
{
"name": "Wrong input parameters",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: basic",
"key": "Authorization",
"value": "Basic <credentials>"
},
{
"description": "Please provide message reference\n",
"key": "Message-Reference",
"value": "d0e7832e-5c98-11ea-bc55-0242ac13"
},
{
"description": "Optional reference date in the HTTP-date format https://tools.ietf.org/html/rfc7231#section-7.1.1.2",
"key": "Message-Reference-Date",
"value": "Wed, 21 Oct 2015 07:28:00 GMT"
},
{
"key": "Accept-Language",
"value": "eng"
},
{
"description": "Please provide name of the plugin (applicable to 3PV only)\n",
"key": "Plugin-Name",
"value": " "
},
{
"description": "Please provide version of the plugin (applicable to 3PV only)\n",
"key": "Plugin-Version",
"value": " "
},
{
"description": "Please provide name of the shipping platform(applicable to 3PV only)\n",
"key": "Shipping-System-Platform-Name",
"value": " "
},
{
"description": "Please provide version of the shipping platform (applicable to 3PV only)\n",
"key": "Shipping-System-Platform-Version",
"value": " "
},
{
"description": "Please provide name of the webstore platform (applicable to 3PV only)\n",
"key": "Webstore-Platform-Name",
"value": " "
},
{
"description": "Please provide version of the webstore platform (applicable to 3PV only)\n",
"key": "Webstore-Platform-Version",
"value": " "
}
],
"url": {
"raw": "{{baseUrl}}/shipments/:shipmentTrackingNumber/tracking?trackingView=all-checkpoints&levelOfDetail=all",
"host": [
"{{baseUrl}}"
],
"path": [
"shipments",
":shipmentTrackingNumber",
"tracking"
],
"query": [
{
"key": "trackingView",
"value": "all-checkpoints"
},
{
"key": "levelOfDetail",
"value": "all"
}
],
"variable": [
{
"key": "shipmentTrackingNumber",
"value": "dolor veniam officia non",
"description": "(Required) DHL Express shipment identification number"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"instance\": \"/expressapi/shipments/1251820953/tracking?trackingView=shipment-details&levelOfDetail=shipment\",\n \"detail\": \"Parameters not having correct format: trackingView (valid parameters for trackingView are [last-checkpoint, all-checkpoints, bbx-children, advance-shipment, shipment-details-only]\",\n \"title\": \"Wrong format\",\n \"message\": \"Bad request\",\n \"status\": \"400\"\n}"
},
{
"name": "No data found",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: basic",
"key": "Authorization",
"value": "Basic <credentials>"
},
{
"description": "Please provide message reference\n",
"key": "Message-Reference",
"value": "d0e7832e-5c98-11ea-bc55-0242ac13"
},
{
"description": "Optional reference date in the HTTP-date format https://tools.ietf.org/html/rfc7231#section-7.1.1.2",
"key": "Message-Reference-Date",
"value": "Wed, 21 Oct 2015 07:28:00 GMT"
},
{
"key": "Accept-Language",
"value": "eng"
},
{
"description": "Please provide name of the plugin (applicable to 3PV only)\n",
"key": "Plugin-Name",
"value": " "
},
{
"description": "Please provide version of the plugin (applicable to 3PV only)\n",
"key": "Plugin-Version",
"value": " "
},
{
"description": "Please provide name of the shipping platform(applicable to 3PV only)\n",
"key": "Shipping-System-Platform-Name",
"value": " "
},
{
"description": "Please provide version of the shipping platform (applicable to 3PV only)\n",
"key": "Shipping-System-Platform-Version",
"value": " "
},
{
"description": "Please provide name of the webstore platform (applicable to 3PV only)\n",
"key": "Webstore-Platform-Name",
"value": " "
},
{
"description": "Please provide version of the webstore platform (applicable to 3PV only)\n",
"key": "Webstore-Platform-Version",
"value": " "
}
],
"url": {
"raw": "{{baseUrl}}/shipments/:shipmentTrackingNumber/tracking?trackingView=all-checkpoints&levelOfDetail=all",
"host": [
"{{baseUrl}}"
],
"path": [
"shipments",
":shipmentTrackingNumber",
"tracking"
],
"query": [
{
"key": "trackingView",
"value": "all-checkpoints"
},
{
"key": "levelOfDetail",
"value": "all"
}
],
"variable": [
{
"key": "shipmentTrackingNumber",
"value": "dolor veniam officia non",
"description": "(Required) DHL Express shipment identification number"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"instance\": \"/expressapi/shipments/1251820953/tracking?trackingView=shipment-details&levelOfDetail=shipment\",\n \"detail\": \"No data found\",\n \"title\": \"Not data found\",\n \"message\": \"Not data found\",\n \"status\": \"404\"\n}"
}
]
}