Chilkat Online Tools

SQL Server / DHL Express APIs (MyDHL API) / Track a single or multiple DHL Express Shipments

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    EXEC sp_OASetProperty @http, 'BasicAuth', 1
    EXEC sp_OASetProperty @http, 'Login', '<Basic Auth Username>'
    EXEC sp_OASetProperty @http, 'Password', '<Basic Auth Password>'

    DECLARE @queryParams int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @queryParams OUT

    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'shipmentTrackingNumber', 'laboris Ut esse'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'shipmentTrackingNumber', 'Lorem fugiat sunt id'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'pieceTrackingNumber', 'nisi in elit ut'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'pieceTrackingNumber', 'laborum'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'shipmentReference', 'CustomerReference1'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'shipmentReferenceType', 'CU'
    EXEC sp_OAMethod @queryParams, 'UpdateInt', @success OUT, 'shipperAccountNumber', 123456789
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'dateRangeFrom', '2020-05-01'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'dateRangeTo', '2020-06-01'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'trackingView', 'all-checkpoints'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'levelOfDetail', 'all'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Webstore-Platform-Name', ''
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept-Language', 'eng'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Shipping-System-Platform-Name', ''
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Message-Reference', 'd0e7832e-5c98-11ea-bc55-0242ac13'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Plugin-Version', ''
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Plugin-Name', ''
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Shipping-System-Platform-Version', ''
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Message-Reference-Date', 'Wed, 21 Oct 2015 07:28:00 GMT'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Webstore-Platform-Version', ''

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://api-mock.dhl.com/mydhlapi/tracking', @queryParams
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @queryParams
        RETURN
      END

    DECLARE @sbResponseBody int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @queryParams
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @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": "amet"
    --           },
    --           {
    --             "code": "ABC",
    --             "description": "Alpha Beta Area",
    --             "outboundSortCode": "nostrud ut minim dolor"
    --           }
    --         ],
    --         "accountNumber": "ex occaecat sunt q"
    --       },
    --       "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": "sunt dolor Lorem"
    --           },
    --           {
    --             "code": "BSA",
    --             "description": "BSA Area",
    --             "facilityCode": "facil area",
    --             "inboundSortCode": "aute do"
    --           }
    --         ]
    --       },
    --       "totalWeight": 10,
    --       "unitOfMeasurements": "metric",
    --       "shipperReferences": [
    --         {
    --           "value": "Customer reference",
    --           "typeCode": "CU"
    --         },
    --         {
    --           "value": "Customer reference",
    --           "typeCode": "CU"
    --         }
    --       ],
    --       "numberOfPieces": 1,
    --       "pieces": [
    --         {
    --           "events": [
    --             {
    --               "date": "anim et eu nulla ",
    --               "time": "tempor voluptate",
    --               "typeCode": "occaecat pariatur",
    --               "description": "nostrud dolor voluptate",
    --               "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 esse sit consequat"
    --             },
    --             {
    --               "date": "ex dolore consectetur",
    --               "time": "non esse",
    --               "typeCode": "nulla ea sed",
    --               "description": "consequat in deserunt 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": "do aliqua sed voluptate"
    --             }
    --           ],
    --           "number": 1,
    --           "typeCode": "commodo deserunt consequ",
    --           "shipmentTrackingNumber": "ut",
    --           "trackingNumber": "eiusmod sed sint non et",
    --           "description": "nulla consectetur laboris sit",
    --           "weight": 22.5,
    --           "dimensionalWeight": 22.5,
    --           "actualWeight": 22.5,
    --           "dimensions": {
    --             "length": 15,
    --             "width": 15,
    --             "height": 40
    --           },
    --           "actualDimensions": {
    --             "length": 15,
    --             "width": 15,
    --             "height": 40
    --           },
    --           "unitOfMeasurements": "Duis aliquip",
    --           "shipperReferences": [
    --             {
    --               "value": "Customer reference",
    --               "typeCode": "CU"
    --             },
    --             {
    --               "value": "Customer reference",
    --               "typeCode": "CU"
    --             }
    --           ]
    --         },
    --         {
    --           "events": [
    --             {
    --               "date": "reprehenderit",
    --               "time": "sed ex ea magna",
    --               "typeCode": "minim proident",
    --               "description": "ut occaecat magna 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": "consequat aliquip Duis enim"
    --             },
    --             {
    --               "date": "ipsum",
    --               "time": "adipisicing sit",
    --               "typeCode": "reprehenderit quis nulla ullamco",
    --               "description": "ipsum cillum tempor",
    --               "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": "ex aliqua laborum incididunt sit"
    --             }
    --           ],
    --           "number": 1,
    --           "typeCode": "labore nisi voluptate dolore",
    --           "shipmentTrackingNumber": "do sint nulla",
    --           "trackingNumber": "anim sit esse laboris sint",
    --           "description": "Ut 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": "labore sit",
    --           "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": "ea nisi"
    --           },
    --           {
    --             "code": "ABC",
    --             "description": "Alpha Beta Area",
    --             "outboundSortCode": "do Lorem eiusmod dolore"
    --           }
    --         ],
    --         "accountNumber": "ipsum aute cillum repreh"
    --       },
    --       "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": "id dolore commodo quis"
    --           },
    --           {
    --             "code": "BSA",
    --             "description": "BSA Area",
    --             "facilityCode": "facil area",
    --             "inboundSortCode": "qui occaecat anim D"
    --           }
    --         ]
    --       },
    --       "totalWeight": 10,
    --       "unitOfMeasurements": "metric",
    --       "shipperReferences": [
    --         {
    --           "value": "Customer reference",
    --           "typeCode": "CU"
    --         },
    --         {
    --           "value": "Customer reference",
    --           "typeCode": "CU"
    --         }
    --       ],
    --       "numberOfPieces": 1,
    --       "pieces": [
    --         {
    --           "events": [
    --             {
    --               "date": "nostrud",
    --               "time": "fugiat est",
    --               "typeCode": "commodo enim eiusmod ea",
    --               "description": "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": "ut ex"
    --             },
    --             {
    --               "date": "minim sint",
    --               "time": "in dolor cill",
    --               "typeCode": "in laborum magna in adipisicing",
    --               "description": "mollit non ",
    --               "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": "qui Lorem est"
    --             }
    --           ],
    --           "number": 1,
    --           "typeCode": "reprehenderit incididunt dolor",
    --           "shipmentTrackingNumber": "culpa de",
    --           "trackingNumber": "enim quis officia amet",
    --           "description": "qui culpa dolore ad",
    --           "weight": 22.5,
    --           "dimensionalWeight": 22.5,
    --           "actualWeight": 22.5,
    --           "dimensions": {
    --             "length": 15,
    --             "width": 15,
    --             "height": 40
    --           },
    --           "actualDimensions": {
    --             "length": 15,
    --             "width": 15,
    --             "height": 40
    --           },
    --           "unitOfMeasurements": "reprehenderit a",
    --           "shipperReferences": [
    --             {
    --               "value": "Customer reference",
    --               "typeCode": "CU"
    --             },
    --             {
    --               "value": "Customer reference",
    --               "typeCode": "CU"
    --             }
    --           ]
    --         },
    --         {
    --           "events": [
    --             {
    --               "date": "enim qui ad non",
    --               "time": "sunt voluptate",
    --               "typeCode": "do eu sint in",
    --               "description": "est non",
    --               "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": "nostrud non fugiat magna"
    --             },
    --             {
    --               "date": "consectetur officia exercitation",
    --               "time": "Excepteur commodo exercitation",
    --               "typeCode": "culpa",
    --               "description": "Duis ex",
    --               "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": "ani"
    --             }
    --           ],
    --           "number": 1,
    --           "typeCode": "Ut minim incididunt",
    --           "shipmentTrackingNumber": "in ullamco pariatur minim dolore",
    --           "trackingNumber": "officia cillum",
    --           "description": "cupidatat occaecat nulla veniam",
    --           "weight": 22.5,
    --           "dimensionalWeight": 22.5,
    --           "actualWeight": 22.5,
    --           "dimensions": {
    --             "length": 15,
    --             "width": 15,
    --             "height": 40
    --           },
    --           "actualDimensions": {
    --             "length": 15,
    --             "width": 15,
    --             "height": 40
    --           },
    --           "unitOfMeasurements": "Excepteur",
    --           "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

    DECLARE @shipmentTrackingNumber nvarchar(4000)

    DECLARE @status nvarchar(4000)

    DECLARE @shipmentTimestamp nvarchar(4000)

    DECLARE @productCode nvarchar(4000)

    DECLARE @description nvarchar(4000)

    DECLARE @Name nvarchar(4000)

    DECLARE @CityName nvarchar(4000)

    DECLARE @CountyName nvarchar(4000)

    DECLARE @PostalCode nvarchar(4000)

    DECLARE @ProvinceCode nvarchar(4000)

    DECLARE @CountryCode nvarchar(4000)

    DECLARE @AccountNumber nvarchar(4000)

    DECLARE @receiverDetailsName nvarchar(4000)

    DECLARE @PostalAddressCityName nvarchar(4000)

    DECLARE @PostalAddressCountyName nvarchar(4000)

    DECLARE @PostalAddressPostalCode nvarchar(4000)

    DECLARE @PostalAddressProvinceCode nvarchar(4000)

    DECLARE @PostalAddressCountryCode nvarchar(4000)

    DECLARE @totalWeight int

    DECLARE @unitOfMeasurements nvarchar(4000)

    DECLARE @numberOfPieces int

    DECLARE @estimatedDeliveryDate nvarchar(4000)

    DECLARE @j int

    DECLARE @count_j int

    DECLARE @date nvarchar(4000)

    DECLARE @time nvarchar(4000)

    DECLARE @typeCode nvarchar(4000)

    DECLARE @signedBy nvarchar(4000)

    DECLARE @k int

    DECLARE @count_k int

    DECLARE @code nvarchar(4000)

    DECLARE @outboundSortCode nvarchar(4000)

    DECLARE @facilityCode nvarchar(4000)

    DECLARE @inboundSortCode nvarchar(4000)

    DECLARE @value nvarchar(4000)

    DECLARE @v_number int

    DECLARE @trackingNumber nvarchar(4000)

    DECLARE @weight nvarchar(4000)

    DECLARE @dimensionalWeight nvarchar(4000)

    DECLARE @actualWeight nvarchar(4000)

    DECLARE @Length int

    DECLARE @Width int

    DECLARE @Height int

    DECLARE @actualDimensionsLength int

    DECLARE @actualDimensionsWidth int

    DECLARE @actualDimensionsHeight int

    DECLARE @json1 int

    DECLARE @i1 int

    DECLARE @count_i1 int

    DECLARE @Value nvarchar(4000)

    DECLARE @descriptionValue nvarchar(4000)

    DECLARE @strVal nvarchar(4000)

    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'shipments'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @shipmentTrackingNumber OUT, 'shipments[i].shipmentTrackingNumber'
        EXEC sp_OAMethod @jResp, 'StringOf', @status OUT, 'shipments[i].status'
        EXEC sp_OAMethod @jResp, 'StringOf', @shipmentTimestamp OUT, 'shipments[i].shipmentTimestamp'
        EXEC sp_OAMethod @jResp, 'StringOf', @productCode OUT, 'shipments[i].productCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'shipments[i].description'
        EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'shipments[i].shipperDetails.name'
        EXEC sp_OAMethod @jResp, 'StringOf', @CityName OUT, 'shipments[i].shipperDetails.postalAddress.cityName'
        EXEC sp_OAMethod @jResp, 'StringOf', @CountyName OUT, 'shipments[i].shipperDetails.postalAddress.countyName'
        EXEC sp_OAMethod @jResp, 'StringOf', @PostalCode OUT, 'shipments[i].shipperDetails.postalAddress.postalCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @ProvinceCode OUT, 'shipments[i].shipperDetails.postalAddress.provinceCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @CountryCode OUT, 'shipments[i].shipperDetails.postalAddress.countryCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @AccountNumber OUT, 'shipments[i].shipperDetails.accountNumber'
        EXEC sp_OAMethod @jResp, 'StringOf', @receiverDetailsName OUT, 'shipments[i].receiverDetails.name'
        EXEC sp_OAMethod @jResp, 'StringOf', @PostalAddressCityName OUT, 'shipments[i].receiverDetails.postalAddress.cityName'
        EXEC sp_OAMethod @jResp, 'StringOf', @PostalAddressCountyName OUT, 'shipments[i].receiverDetails.postalAddress.countyName'
        EXEC sp_OAMethod @jResp, 'StringOf', @PostalAddressPostalCode OUT, 'shipments[i].receiverDetails.postalAddress.postalCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @PostalAddressProvinceCode OUT, 'shipments[i].receiverDetails.postalAddress.provinceCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @PostalAddressCountryCode OUT, 'shipments[i].receiverDetails.postalAddress.countryCode'
        EXEC sp_OAMethod @jResp, 'IntOf', @totalWeight OUT, 'shipments[i].totalWeight'
        EXEC sp_OAMethod @jResp, 'StringOf', @unitOfMeasurements OUT, 'shipments[i].unitOfMeasurements'
        EXEC sp_OAMethod @jResp, 'IntOf', @numberOfPieces OUT, 'shipments[i].numberOfPieces'
        EXEC sp_OAMethod @jResp, 'StringOf', @estimatedDeliveryDate OUT, 'shipments[i].estimatedDeliveryDate'
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'shipments[i].events'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @date OUT, 'shipments[i].events[j].date'
            EXEC sp_OAMethod @jResp, 'StringOf', @time OUT, 'shipments[i].events[j].time'
            EXEC sp_OAMethod @jResp, 'StringOf', @typeCode OUT, 'shipments[i].events[j].typeCode'
            EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'shipments[i].events[j].description'
            EXEC sp_OAMethod @jResp, 'StringOf', @signedBy OUT, 'shipments[i].events[j].signedBy'
            SELECT @k = 0
            EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'shipments[i].events[j].serviceArea'
            WHILE @k < @count_k
              BEGIN
                EXEC sp_OASetProperty @jResp, 'K', @k
                EXEC sp_OAMethod @jResp, 'StringOf', @code OUT, 'shipments[i].events[j].serviceArea[k].code'
                EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'shipments[i].events[j].serviceArea[k].description'
                SELECT @k = @k + 1
              END
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'shipments[i].shipperDetails.serviceArea'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @code OUT, 'shipments[i].shipperDetails.serviceArea[j].code'
            EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'shipments[i].shipperDetails.serviceArea[j].description'
            EXEC sp_OAMethod @jResp, 'StringOf', @outboundSortCode OUT, 'shipments[i].shipperDetails.serviceArea[j].outboundSortCode'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'shipments[i].receiverDetails.serviceArea'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @code OUT, 'shipments[i].receiverDetails.serviceArea[j].code'
            EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'shipments[i].receiverDetails.serviceArea[j].description'
            EXEC sp_OAMethod @jResp, 'StringOf', @facilityCode OUT, 'shipments[i].receiverDetails.serviceArea[j].facilityCode'
            EXEC sp_OAMethod @jResp, 'StringOf', @inboundSortCode OUT, 'shipments[i].receiverDetails.serviceArea[j].inboundSortCode'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'shipments[i].shipperReferences'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'shipments[i].shipperReferences[j].value'
            EXEC sp_OAMethod @jResp, 'StringOf', @typeCode OUT, 'shipments[i].shipperReferences[j].typeCode'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'shipments[i].pieces'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'IntOf', @v_number OUT, 'shipments[i].pieces[j].number'
            EXEC sp_OAMethod @jResp, 'StringOf', @typeCode OUT, 'shipments[i].pieces[j].typeCode'
            EXEC sp_OAMethod @jResp, 'StringOf', @shipmentTrackingNumber OUT, 'shipments[i].pieces[j].shipmentTrackingNumber'
            EXEC sp_OAMethod @jResp, 'StringOf', @trackingNumber OUT, 'shipments[i].pieces[j].trackingNumber'
            EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'shipments[i].pieces[j].description'
            EXEC sp_OAMethod @jResp, 'StringOf', @weight OUT, 'shipments[i].pieces[j].weight'
            EXEC sp_OAMethod @jResp, 'StringOf', @dimensionalWeight OUT, 'shipments[i].pieces[j].dimensionalWeight'
            EXEC sp_OAMethod @jResp, 'StringOf', @actualWeight OUT, 'shipments[i].pieces[j].actualWeight'
            EXEC sp_OAMethod @jResp, 'IntOf', @Length OUT, 'shipments[i].pieces[j].dimensions.length'
            EXEC sp_OAMethod @jResp, 'IntOf', @Width OUT, 'shipments[i].pieces[j].dimensions.width'
            EXEC sp_OAMethod @jResp, 'IntOf', @Height OUT, 'shipments[i].pieces[j].dimensions.height'
            EXEC sp_OAMethod @jResp, 'IntOf', @actualDimensionsLength OUT, 'shipments[i].pieces[j].actualDimensions.length'
            EXEC sp_OAMethod @jResp, 'IntOf', @actualDimensionsWidth OUT, 'shipments[i].pieces[j].actualDimensions.width'
            EXEC sp_OAMethod @jResp, 'IntOf', @actualDimensionsHeight OUT, 'shipments[i].pieces[j].actualDimensions.height'
            EXEC sp_OAMethod @jResp, 'StringOf', @unitOfMeasurements OUT, 'shipments[i].pieces[j].unitOfMeasurements'
            SELECT @k = 0
            EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'shipments[i].pieces[j].events'
            WHILE @k < @count_k
              BEGIN
                EXEC sp_OASetProperty @jResp, 'K', @k
                EXEC sp_OAMethod @jResp, 'StringOf', @date OUT, 'shipments[i].pieces[j].events[k].date'
                EXEC sp_OAMethod @jResp, 'StringOf', @time OUT, 'shipments[i].pieces[j].events[k].time'
                EXEC sp_OAMethod @jResp, 'StringOf', @typeCode OUT, 'shipments[i].pieces[j].events[k].typeCode'
                EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'shipments[i].pieces[j].events[k].description'
                EXEC sp_OAMethod @jResp, 'StringOf', @signedBy OUT, 'shipments[i].pieces[j].events[k].signedBy'

                EXEC sp_OAMethod @jResp, 'ObjectOf', @json1 OUT, 'shipments[i].pieces[j].events[k]'
                SELECT @i1 = 0
                EXEC sp_OAMethod @json1, 'SizeOfArray', @count_i1 OUT, 'serviceArea'
                WHILE @i1 < @count_i1
                  BEGIN
                    EXEC sp_OASetProperty @json1, 'I', @i1
                    EXEC sp_OAMethod @json1, 'StringOf', @Value OUT, 'serviceArea[i].code.value'
                    EXEC sp_OAMethod @json1, 'StringOf', @descriptionValue OUT, 'serviceArea[i].description.value'
                    SELECT @i1 = @i1 + 1
                  END
                EXEC @hr = sp_OADestroy @json1

                SELECT @k = @k + 1
              END
            SELECT @k = 0
            EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'shipments[i].pieces[j].shipperReferences'
            WHILE @k < @count_k
              BEGIN
                EXEC sp_OASetProperty @jResp, 'K', @k
                EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'shipments[i].pieces[j].shipperReferences[k].value'
                EXEC sp_OAMethod @jResp, 'StringOf', @typeCode OUT, 'shipments[i].pieces[j].shipperReferences[k].typeCode'
                SELECT @k = @k + 1
              END
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'shipments[i].childrenShipmentIdentificationNumbers'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'shipments[i].childrenShipmentIdentificationNumbers[j]'
            SELECT @j = @j + 1
          END
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @queryParams
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -G -d "shipmentTrackingNumber=laboris%20Ut%20esse"
	-d "shipmentTrackingNumber=Lorem%20fugiat%20sunt%20id"
	-d "pieceTrackingNumber=nisi%20in%20elit%20ut"
	-d "pieceTrackingNumber=laborum"
	-d "shipmentReference=CustomerReference1"
	-d "shipmentReferenceType=CU"
	-d "shipperAccountNumber=123456789"
	-d "dateRangeFrom=2020-05-01"
	-d "dateRangeTo=2020-06-01"
	-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/tracking

Postman Collection Item JSON

{
  "name": "Track a single or multiple DHL Express Shipments",
  "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}}/tracking?shipmentTrackingNumber=laboris Ut esse&shipmentTrackingNumber=Lorem fugiat sunt id&pieceTrackingNumber=nisi in elit ut&pieceTrackingNumber=laborum&shipmentReference=CustomerReference1&shipmentReferenceType=CU&shipperAccountNumber=123456789&dateRangeFrom=2020-05-01&dateRangeTo=2020-06-01&trackingView=all-checkpoints&levelOfDetail=all",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "tracking"
      ],
      "query": [
        {
          "key": "shipmentTrackingNumber",
          "value": "laboris Ut esse",
          "description": "DHL Express shipment identification number"
        },
        {
          "key": "shipmentTrackingNumber",
          "value": "Lorem fugiat sunt id",
          "description": "DHL Express shipment identification number"
        },
        {
          "key": "pieceTrackingNumber",
          "value": "nisi in elit ut",
          "description": "DHL Express shipment piece tracking number"
        },
        {
          "key": "pieceTrackingNumber",
          "value": "laborum",
          "description": "DHL Express shipment piece tracking number"
        },
        {
          "key": "shipmentReference",
          "value": "CustomerReference1",
          "description": "Shipment reference which was provided during the shipment label creation\n"
        },
        {
          "key": "shipmentReferenceType",
          "value": "CU",
          "description": "Shipment reference type which was provided during the shipment label creation\n"
        },
        {
          "key": "shipperAccountNumber",
          "value": "123456789",
          "description": "Shipper DHL Express Account number under which the shipment label was created\n"
        },
        {
          "key": "dateRangeFrom",
          "value": "2020-05-01",
          "description": "When tracking by Shipment reference you need to restrict the search by timeframe. Please provide the start of the period.\n"
        },
        {
          "key": "dateRangeTo",
          "value": "2020-06-01",
          "description": "When tracking by Shipment reference you need to restrict the search by timeframe. Please provide the end of the period.\n"
        },
        {
          "key": "trackingView",
          "value": "all-checkpoints"
        },
        {
          "key": "levelOfDetail",
          "value": "all"
        }
      ]
    },
    "description": "The Tracking service retrieves tracking statuses for a single or multiple DHL Express Shipments\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}}/tracking?shipmentTrackingNumber=sed offic&shipmentTrackingNumber=do pariatur eiusmod quis&pieceTrackingNumber=cupidatat temp&pieceTrackingNumber=reprehenderit&shipmentReference=CustomerReference1&shipmentReferenceType=CU&shipperAccountNumber=123456789&dateRangeFrom=2020-05-01&dateRangeTo=2020-06-01&trackingView=all-checkpoints&levelOfDetail=all",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tracking"
          ],
          "query": [
            {
              "key": "shipmentTrackingNumber",
              "value": "sed offic"
            },
            {
              "key": "shipmentTrackingNumber",
              "value": "do pariatur eiusmod quis"
            },
            {
              "key": "pieceTrackingNumber",
              "value": "cupidatat temp"
            },
            {
              "key": "pieceTrackingNumber",
              "value": "reprehenderit"
            },
            {
              "key": "shipmentReference",
              "value": "CustomerReference1"
            },
            {
              "key": "shipmentReferenceType",
              "value": "CU"
            },
            {
              "key": "shipperAccountNumber",
              "value": "123456789"
            },
            {
              "key": "dateRangeFrom",
              "value": "2020-05-01"
            },
            {
              "key": "dateRangeTo",
              "value": "2020-06-01"
            },
            {
              "key": "trackingView",
              "value": "all-checkpoints"
            },
            {
              "key": "levelOfDetail",
              "value": "all"
            }
          ]
        }
      },
      "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\": \"amet\"\n          },\n          {\n            \"code\": \"ABC\",\n            \"description\": \"Alpha Beta Area\",\n            \"outboundSortCode\": \"nostrud ut minim dolor\"\n          }\n        ],\n        \"accountNumber\": \"ex occaecat sunt q\"\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\": \"sunt dolor Lorem\"\n          },\n          {\n            \"code\": \"BSA\",\n            \"description\": \"BSA Area\",\n            \"facilityCode\": \"facil area\",\n            \"inboundSortCode\": \"aute do\"\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\": \"anim et eu nulla \",\n              \"time\": \"tempor voluptate\",\n              \"typeCode\": \"occaecat pariatur\",\n              \"description\": \"nostrud dolor voluptate\",\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 esse sit consequat\"\n            },\n            {\n              \"date\": \"ex dolore consectetur\",\n              \"time\": \"non esse\",\n              \"typeCode\": \"nulla ea sed\",\n              \"description\": \"consequat in deserunt 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\": \"do aliqua sed voluptate\"\n            }\n          ],\n          \"number\": 1,\n          \"typeCode\": \"commodo deserunt consequ\",\n          \"shipmentTrackingNumber\": \"ut\",\n          \"trackingNumber\": \"eiusmod sed sint non et\",\n          \"description\": \"nulla consectetur laboris sit\",\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\": \"Duis aliquip\",\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\": \"reprehenderit\",\n              \"time\": \"sed ex ea magna\",\n              \"typeCode\": \"minim proident\",\n              \"description\": \"ut occaecat magna 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\": \"consequat aliquip Duis enim\"\n            },\n            {\n              \"date\": \"ipsum\",\n              \"time\": \"adipisicing sit\",\n              \"typeCode\": \"reprehenderit quis nulla ullamco\",\n              \"description\": \"ipsum cillum tempor\",\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\": \"ex aliqua laborum incididunt sit\"\n            }\n          ],\n          \"number\": 1,\n          \"typeCode\": \"labore nisi voluptate dolore\",\n          \"shipmentTrackingNumber\": \"do sint nulla\",\n          \"trackingNumber\": \"anim sit esse laboris sint\",\n          \"description\": \"Ut 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\": \"labore sit\",\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\": \"ea nisi\"\n          },\n          {\n            \"code\": \"ABC\",\n            \"description\": \"Alpha Beta Area\",\n            \"outboundSortCode\": \"do Lorem eiusmod dolore\"\n          }\n        ],\n        \"accountNumber\": \"ipsum aute cillum repreh\"\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\": \"id dolore commodo quis\"\n          },\n          {\n            \"code\": \"BSA\",\n            \"description\": \"BSA Area\",\n            \"facilityCode\": \"facil area\",\n            \"inboundSortCode\": \"qui occaecat anim D\"\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\": \"nostrud\",\n              \"time\": \"fugiat est\",\n              \"typeCode\": \"commodo enim eiusmod ea\",\n              \"description\": \"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\": \"ut ex\"\n            },\n            {\n              \"date\": \"minim sint\",\n              \"time\": \"in dolor cill\",\n              \"typeCode\": \"in laborum magna in adipisicing\",\n              \"description\": \"mollit non \",\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\": \"qui Lorem est\"\n            }\n          ],\n          \"number\": 1,\n          \"typeCode\": \"reprehenderit incididunt dolor\",\n          \"shipmentTrackingNumber\": \"culpa de\",\n          \"trackingNumber\": \"enim quis officia amet\",\n          \"description\": \"qui culpa dolore ad\",\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\": \"reprehenderit a\",\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\": \"enim qui ad non\",\n              \"time\": \"sunt voluptate\",\n              \"typeCode\": \"do eu sint in\",\n              \"description\": \"est non\",\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\": \"nostrud non fugiat magna\"\n            },\n            {\n              \"date\": \"consectetur officia exercitation\",\n              \"time\": \"Excepteur commodo exercitation\",\n              \"typeCode\": \"culpa\",\n              \"description\": \"Duis ex\",\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\": \"ani\"\n            }\n          ],\n          \"number\": 1,\n          \"typeCode\": \"Ut minim incididunt\",\n          \"shipmentTrackingNumber\": \"in ullamco pariatur minim dolore\",\n          \"trackingNumber\": \"officia cillum\",\n          \"description\": \"cupidatat occaecat nulla veniam\",\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\": \"Excepteur\",\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}}/tracking?shipmentTrackingNumber=sed offic&shipmentTrackingNumber=do pariatur eiusmod quis&pieceTrackingNumber=cupidatat temp&pieceTrackingNumber=reprehenderit&shipmentReference=CustomerReference1&shipmentReferenceType=CU&shipperAccountNumber=123456789&dateRangeFrom=2020-05-01&dateRangeTo=2020-06-01&trackingView=all-checkpoints&levelOfDetail=all",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tracking"
          ],
          "query": [
            {
              "key": "shipmentTrackingNumber",
              "value": "sed offic"
            },
            {
              "key": "shipmentTrackingNumber",
              "value": "do pariatur eiusmod quis"
            },
            {
              "key": "pieceTrackingNumber",
              "value": "cupidatat temp"
            },
            {
              "key": "pieceTrackingNumber",
              "value": "reprehenderit"
            },
            {
              "key": "shipmentReference",
              "value": "CustomerReference1"
            },
            {
              "key": "shipmentReferenceType",
              "value": "CU"
            },
            {
              "key": "shipperAccountNumber",
              "value": "123456789"
            },
            {
              "key": "dateRangeFrom",
              "value": "2020-05-01"
            },
            {
              "key": "dateRangeTo",
              "value": "2020-06-01"
            },
            {
              "key": "trackingView",
              "value": "all-checkpoints"
            },
            {
              "key": "levelOfDetail",
              "value": "all"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"instance\": \"/expressapi/tracking?shipmentReference=ShipReferenceRCS03&trackingView=shipment-details-only&levelOfDetail=shipment\",\n  \"detail\": \"Missing mandatory parameters: shipperAccountNumber\",\n  \"title\": \"Missing parameters\",\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}}/tracking?shipmentTrackingNumber=sed offic&shipmentTrackingNumber=do pariatur eiusmod quis&pieceTrackingNumber=cupidatat temp&pieceTrackingNumber=reprehenderit&shipmentReference=CustomerReference1&shipmentReferenceType=CU&shipperAccountNumber=123456789&dateRangeFrom=2020-05-01&dateRangeTo=2020-06-01&trackingView=all-checkpoints&levelOfDetail=all",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "tracking"
          ],
          "query": [
            {
              "key": "shipmentTrackingNumber",
              "value": "sed offic"
            },
            {
              "key": "shipmentTrackingNumber",
              "value": "do pariatur eiusmod quis"
            },
            {
              "key": "pieceTrackingNumber",
              "value": "cupidatat temp"
            },
            {
              "key": "pieceTrackingNumber",
              "value": "reprehenderit"
            },
            {
              "key": "shipmentReference",
              "value": "CustomerReference1"
            },
            {
              "key": "shipmentReferenceType",
              "value": "CU"
            },
            {
              "key": "shipperAccountNumber",
              "value": "123456789"
            },
            {
              "key": "dateRangeFrom",
              "value": "2020-05-01"
            },
            {
              "key": "dateRangeTo",
              "value": "2020-06-01"
            },
            {
              "key": "trackingView",
              "value": "all-checkpoints"
            },
            {
              "key": "levelOfDetail",
              "value": "all"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"instance\": \"/expressapi/tracking?shipmentReference=ShipReferenceRCS03&shipperAccountNumber=300865060&trackingView=shipment-details&levelOfDetail=shipment\",\n  \"detail\": \"No Shipments Found for ReferenceID | ShipReferenceRCS03\",\n  \"title\": \"Not data found\",\n  \"message\": \"Not data found\",\n  \"status\": \"404\"\n}"
    }
  ]
}