Chilkat Online Tools

SQL Server / DHL Express APIs (MyDHL API) / Upload Commercial Invoice data for your DHL Express shipment

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
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.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>'

    -- Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    -- The following JSON is sent in the request body.

    -- {
    --   "content": {
    --     "exportDeclaration": [
    --       {
    --         "lineItems": [
    --           {
    --             "number": 1,
    --             "description": "line item description",
    --             "price": 150,
    --             "quantity": {
    --               "value": 1,
    --               "unitOfMeasurement": "BOX"
    --             },
    --             "manufacturerCountry": "CZ",
    --             "weight": {
    --               "netValue": {
    --                 "value": "<Error: Too many levels of nesting to fake this schema>"
    --               }
    --             },
    --             "commodityCodes": [
    --               {
    --                 "typeCode": {
    --                   "value": "<Error: Too many levels of nesting to fake this schema>"
    --                 },
    --                 "value": {
    --                   "value": "<Error: Too many levels of nesting to fake this schema>"
    --                 }
    --               }
    --             ],
    --             "exportReasonType": "defence_material",
    --             "isTaxesPaid": true,
    --             "customerReferences": [
    --               {
    --                 "typeCode": {
    --                   "value": "<Error: Too many levels of nesting to fake this schema>"
    --                 },
    --                 "value": {
    --                   "value": "<Error: Too many levels of nesting to fake this schema>"
    --                 }
    --               }
    --             ],
    --             "customsDocuments": [
    --               {
    --                 "typeCode": {
    --                   "value": "<Error: Too many levels of nesting to fake this schema>"
    --                 },
    --                 "value": {
    --                   "value": "<Error: Too many levels of nesting to fake this schema>"
    --                 }
    --               }
    --             ]
    --           }
    --         ],
    --         "invoice": {
    --           "number": "12345-ABC",
    --           "date": "2021-03-18",
    --           "function": "import",
    --           "customerReferences": [
    --             {
    --               "typeCode": "CU",
    --               "value": "custref112"
    --             }
    --           ]
    --         },
    --         "incoterm": "DAP",
    --         "remarks": [
    --           {
    --             "value": "declaration remark"
    --           },
    --           {
    --             "value": "declaration remark"
    --           }
    --         ],
    --         "additionalCharges": [
    --           {
    --             "value": 10,
    --             "typeCode": "pickup"
    --           },
    --           {
    --             "value": 10,
    --             "typeCode": "pickup"
    --           }
    --         ],
    --         "placeOfIncoterm": "port of departure or destination details",
    --         "recipientReference": "recipient reference",
    --         "exporter": {
    --           "id": "123",
    --           "code": "EXPCZ"
    --         },
    --         "exportReasonType": "permanent",
    --         "shipmentType": "personal",
    --         "customsDocuments": [
    --           {
    --             "typeCode": "972",
    --             "value": "custdoc445"
    --           }
    --         ]
    --       }
    --     ],
    --     "currency": "EUR",
    --     "unitOfMeasurement": "metric"
    --   },
    --   "plannedShipDate": "2020-04-20",
    --   "accounts": [
    --     {
    --       "typeCode": "shipper",
    --       "number": "123456789"
    --     },
    --     {
    --       "typeCode": "shipper",
    --       "number": "123456789"
    --     }
    --   ],
    --   "outputImageProperties": {
    --     "imageOptions": [
    --       {
    --         "typeCode": "invoice",
    --         "templateName": "COMMERCIAL_INVOICE_P_10",
    --         "isRequested": true
    --       }
    --     ]
    --   },
    --   "customerDetails": {
    --     "sellerDetails": {
    --       "postalAddress": {
    --         "postalCode": "14800",
    --         "cityName": "Prague",
    --         "countryCode": "CZ",
    --         "addressLine1": "V Parku 2308/10",
    --         "provinceCode": "CZ",
    --         "addressLine2": "addres2",
    --         "addressLine3": "addres3",
    --         "countyName": "Central Bohemia"
    --       },
    --       "contactInformation": {
    --         "phone": "+1123456789",
    --         "companyName": "Company Name",
    --         "fullName": "John Brew",
    --         "email": "that@before.de",
    --         "mobilePhone": "+60112345678"
    --       },
    --       "typeCode": "business",
    --       "registrationNumbers": [
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         },
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         }
    --       ]
    --     },
    --     "buyerDetails": {
    --       "postalAddress": {
    --         "postalCode": "14800",
    --         "cityName": "Prague",
    --         "countryCode": "CZ",
    --         "addressLine1": "V Parku 2308/10",
    --         "provinceCode": "CZ",
    --         "addressLine2": "addres2",
    --         "addressLine3": "addres3",
    --         "countyName": "Central Bohemia"
    --       },
    --       "contactInformation": {
    --         "phone": "+1123456789",
    --         "companyName": "Company Name",
    --         "fullName": "John Brew",
    --         "email": "that@before.de",
    --         "mobilePhone": "+60112345678"
    --       },
    --       "registrationNumbers": [
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         },
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         }
    --       ],
    --       "typeCode": "business"
    --     },
    --     "importerDetails": {
    --       "postalAddress": {
    --         "postalCode": "14800",
    --         "cityName": "Prague",
    --         "countryCode": "CZ",
    --         "addressLine1": "V Parku 2308/10",
    --         "provinceCode": "CZ",
    --         "addressLine2": "addres2",
    --         "addressLine3": "addres3",
    --         "countyName": "Central Bohemia"
    --       },
    --       "contactInformation": {
    --         "phone": "+1123456789",
    --         "companyName": "Company Name",
    --         "fullName": "John Brew",
    --         "email": "that@before.de",
    --         "mobilePhone": "+60112345678"
    --       },
    --       "registrationNumbers": [
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         },
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         }
    --       ],
    --       "typeCode": "government"
    --     },
    --     "exporterDetails": {
    --       "postalAddress": {
    --         "postalCode": "14800",
    --         "cityName": "Prague",
    --         "countryCode": "CZ",
    --         "addressLine1": "V Parku 2308/10",
    --         "provinceCode": "CZ",
    --         "addressLine2": "addres2",
    --         "addressLine3": "addres3",
    --         "countyName": "Central Bohemia"
    --       },
    --       "contactInformation": {
    --         "phone": "+1123456789",
    --         "companyName": "Company Name",
    --         "fullName": "John Brew",
    --         "email": "that@before.de",
    --         "mobilePhone": "+60112345678"
    --       },
    --       "registrationNumbers": [
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         },
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         }
    --       ],
    --       "typeCode": "government"
    --     },
    --     "ultimateConsigneeDetails": {
    --       "postalAddress": {
    --         "postalCode": "14800",
    --         "cityName": "Prague",
    --         "countryCode": "CZ",
    --         "addressLine1": "V Parku 2308/10",
    --         "provinceCode": "CZ",
    --         "addressLine2": "addres2",
    --         "addressLine3": "addres3",
    --         "countyName": "Central Bohemia"
    --       },
    --       "contactInformation": {
    --         "phone": "+1123456789",
    --         "companyName": "Company Name",
    --         "fullName": "John Brew",
    --         "email": "that@before.de",
    --         "mobilePhone": "+60112345678"
    --       },
    --       "typeCode": "other",
    --       "registrationNumbers": [
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         },
    --         {
    --           "typeCode": "VAT",
    --           "number": "CZ123456789",
    --           "issuerCountryCode": "CZ"
    --         }
    --       ]
    --     }
    --   }
    -- }

    DECLARE @json int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @json OUT

    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'content.exportDeclaration[0].lineItems[0].number', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].description', 'line item description'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'content.exportDeclaration[0].lineItems[0].price', 150
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'content.exportDeclaration[0].lineItems[0].quantity.value', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].quantity.unitOfMeasurement', 'BOX'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].manufacturerCountry', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].weight.netValue.value', '<Error: Too many levels of nesting to fake this schema>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].commodityCodes[0].typeCode.value', '<Error: Too many levels of nesting to fake this schema>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].commodityCodes[0].value.value', '<Error: Too many levels of nesting to fake this schema>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].exportReasonType', 'defence_material'
    EXEC sp_OAMethod @json, 'UpdateBool', @success OUT, 'content.exportDeclaration[0].lineItems[0].isTaxesPaid', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].customerReferences[0].typeCode.value', '<Error: Too many levels of nesting to fake this schema>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].customerReferences[0].value.value', '<Error: Too many levels of nesting to fake this schema>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].customsDocuments[0].typeCode.value', '<Error: Too many levels of nesting to fake this schema>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].lineItems[0].customsDocuments[0].value.value', '<Error: Too many levels of nesting to fake this schema>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].invoice.number', '12345-ABC'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].invoice.date', '2021-03-18'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].invoice.function', 'import'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].invoice.customerReferences[0].typeCode', 'CU'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].invoice.customerReferences[0].value', 'custref112'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].incoterm', 'DAP'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].remarks[0].value', 'declaration remark'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].remarks[1].value', 'declaration remark'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'content.exportDeclaration[0].additionalCharges[0].value', 10
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].additionalCharges[0].typeCode', 'pickup'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'content.exportDeclaration[0].additionalCharges[1].value', 10
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].additionalCharges[1].typeCode', 'pickup'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].placeOfIncoterm', 'port of departure or destination details'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].recipientReference', 'recipient reference'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].exporter.id', '123'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].exporter.code', 'EXPCZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].exportReasonType', 'permanent'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].shipmentType', 'personal'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].customsDocuments[0].typeCode', '972'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.exportDeclaration[0].customsDocuments[0].value', 'custdoc445'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.currency', 'EUR'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'content.unitOfMeasurement', 'metric'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'plannedShipDate', '2020-04-20'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'accounts[0].typeCode', 'shipper'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'accounts[0].number', '123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'accounts[1].typeCode', 'shipper'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'accounts[1].number', '123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'outputImageProperties.imageOptions[0].typeCode', 'invoice'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'outputImageProperties.imageOptions[0].templateName', 'COMMERCIAL_INVOICE_P_10'
    EXEC sp_OAMethod @json, 'UpdateBool', @success OUT, 'outputImageProperties.imageOptions[0].isRequested', 1
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.postalAddress.postalCode', '14800'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.postalAddress.cityName', 'Prague'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.postalAddress.countryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.postalAddress.addressLine1', 'V Parku 2308/10'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.postalAddress.provinceCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.postalAddress.addressLine2', 'addres2'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.postalAddress.addressLine3', 'addres3'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.postalAddress.countyName', 'Central Bohemia'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.contactInformation.phone', '+1123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.contactInformation.companyName', 'Company Name'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.contactInformation.fullName', 'John Brew'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.contactInformation.email', 'that@before.de'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.contactInformation.mobilePhone', '+60112345678'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.typeCode', 'business'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.registrationNumbers[0].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.registrationNumbers[0].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.registrationNumbers[0].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.registrationNumbers[1].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.registrationNumbers[1].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.sellerDetails.registrationNumbers[1].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.postalAddress.postalCode', '14800'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.postalAddress.cityName', 'Prague'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.postalAddress.countryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.postalAddress.addressLine1', 'V Parku 2308/10'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.postalAddress.provinceCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.postalAddress.addressLine2', 'addres2'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.postalAddress.addressLine3', 'addres3'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.postalAddress.countyName', 'Central Bohemia'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.contactInformation.phone', '+1123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.contactInformation.companyName', 'Company Name'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.contactInformation.fullName', 'John Brew'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.contactInformation.email', 'that@before.de'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.contactInformation.mobilePhone', '+60112345678'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.registrationNumbers[0].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.registrationNumbers[0].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.registrationNumbers[0].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.registrationNumbers[1].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.registrationNumbers[1].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.registrationNumbers[1].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.buyerDetails.typeCode', 'business'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.postalAddress.postalCode', '14800'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.postalAddress.cityName', 'Prague'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.postalAddress.countryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.postalAddress.addressLine1', 'V Parku 2308/10'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.postalAddress.provinceCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.postalAddress.addressLine2', 'addres2'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.postalAddress.addressLine3', 'addres3'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.postalAddress.countyName', 'Central Bohemia'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.contactInformation.phone', '+1123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.contactInformation.companyName', 'Company Name'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.contactInformation.fullName', 'John Brew'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.contactInformation.email', 'that@before.de'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.contactInformation.mobilePhone', '+60112345678'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.registrationNumbers[0].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.registrationNumbers[0].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.registrationNumbers[0].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.registrationNumbers[1].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.registrationNumbers[1].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.registrationNumbers[1].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.importerDetails.typeCode', 'government'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.postalAddress.postalCode', '14800'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.postalAddress.cityName', 'Prague'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.postalAddress.countryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.postalAddress.addressLine1', 'V Parku 2308/10'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.postalAddress.provinceCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.postalAddress.addressLine2', 'addres2'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.postalAddress.addressLine3', 'addres3'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.postalAddress.countyName', 'Central Bohemia'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.contactInformation.phone', '+1123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.contactInformation.companyName', 'Company Name'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.contactInformation.fullName', 'John Brew'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.contactInformation.email', 'that@before.de'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.contactInformation.mobilePhone', '+60112345678'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.registrationNumbers[0].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.registrationNumbers[0].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.registrationNumbers[0].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.registrationNumbers[1].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.registrationNumbers[1].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.registrationNumbers[1].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.exporterDetails.typeCode', 'government'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.postalAddress.postalCode', '14800'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.postalAddress.cityName', 'Prague'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.postalAddress.countryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.postalAddress.addressLine1', 'V Parku 2308/10'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.postalAddress.provinceCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.postalAddress.addressLine2', 'addres2'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.postalAddress.addressLine3', 'addres3'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.postalAddress.countyName', 'Central Bohemia'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.contactInformation.phone', '+1123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.contactInformation.companyName', 'Company Name'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.contactInformation.fullName', 'John Brew'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.contactInformation.email', 'that@before.de'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.contactInformation.mobilePhone', '+60112345678'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.typeCode', 'other'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.registrationNumbers[0].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.registrationNumbers[0].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.registrationNumbers[0].issuerCountryCode', 'CZ'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.registrationNumbers[1].typeCode', 'VAT'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.registrationNumbers[1].number', 'CZ123456789'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'customerDetails.ultimateConsigneeDetails.registrationNumbers[1].issuerCountryCode', 'CZ'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Webstore-Platform-Name', ''
    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, 'Content-Type', 'application/json'
    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 @sbRequestBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbRequestBody OUT

    EXEC sp_OAMethod @json, 'EmitSb', @success OUT, @sbRequestBody

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'PTextSb', @resp OUT, 'PATCH', 'https://api-mock.dhl.com/mydhlapi/shipments/:shipmentTrackingNumber/upload-invoice-data', @sbRequestBody, 'utf-8', 'application/json', 0, 0
    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 @json
        EXEC @hr = sp_OADestroy @sbRequestBody
        RETURN
      END

    EXEC sp_OAGetProperty @resp, 'StatusCode', @iTmp0 OUT
    PRINT @iTmp0
    EXEC sp_OAGetProperty @resp, 'BodyStr', @sTmp0 OUT
    PRINT @sTmp0
    EXEC @hr = sp_OADestroy @resp


    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @json
    EXEC @hr = sp_OADestroy @sbRequestBody


END
GO

Curl Command

curl -X PATCH
	-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 "Plugin-Name:  "
	-H "Plugin-Version:  "
	-H "Shipping-System-Platform-Name:  "
	-H "Shipping-System-Platform-Version:  "
	-H "Webstore-Platform-Name:  "
	-H "Webstore-Platform-Version:  "
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "content": {
    "exportDeclaration": [
      {
        "lineItems": [
          {
            "number": 1,
            "description": "line item description",
            "price": 150,
            "quantity": {
              "value": 1,
              "unitOfMeasurement": "BOX"
            },
            "manufacturerCountry": "CZ",
            "weight": {
              "netValue": {
                "value": "<Error: Too many levels of nesting to fake this schema>"
              }
            },
            "commodityCodes": [
              {
                "typeCode": {
                  "value": "<Error: Too many levels of nesting to fake this schema>"
                },
                "value": {
                  "value": "<Error: Too many levels of nesting to fake this schema>"
                }
              }
            ],
            "exportReasonType": "defence_material",
            "isTaxesPaid": true,
            "customerReferences": [
              {
                "typeCode": {
                  "value": "<Error: Too many levels of nesting to fake this schema>"
                },
                "value": {
                  "value": "<Error: Too many levels of nesting to fake this schema>"
                }
              }
            ],
            "customsDocuments": [
              {
                "typeCode": {
                  "value": "<Error: Too many levels of nesting to fake this schema>"
                },
                "value": {
                  "value": "<Error: Too many levels of nesting to fake this schema>"
                }
              }
            ]
          }
        ],
        "invoice": {
          "number": "12345-ABC",
          "date": "2021-03-18",
          "function": "import",
          "customerReferences": [
            {
              "typeCode": "CU",
              "value": "custref112"
            }
          ]
        },
        "incoterm": "DAP",
        "remarks": [
          {
            "value": "declaration remark"
          },
          {
            "value": "declaration remark"
          }
        ],
        "additionalCharges": [
          {
            "value": 10,
            "typeCode": "pickup"
          },
          {
            "value": 10,
            "typeCode": "pickup"
          }
        ],
        "placeOfIncoterm": "port of departure or destination details",
        "recipientReference": "recipient reference",
        "exporter": {
          "id": "123",
          "code": "EXPCZ"
        },
        "exportReasonType": "permanent",
        "shipmentType": "personal",
        "customsDocuments": [
          {
            "typeCode": "972",
            "value": "custdoc445"
          }
        ]
      }
    ],
    "currency": "EUR",
    "unitOfMeasurement": "metric"
  },
  "plannedShipDate": "2020-04-20",
  "accounts": [
    {
      "typeCode": "shipper",
      "number": "123456789"
    },
    {
      "typeCode": "shipper",
      "number": "123456789"
    }
  ],
  "outputImageProperties": {
    "imageOptions": [
      {
        "typeCode": "invoice",
        "templateName": "COMMERCIAL_INVOICE_P_10",
        "isRequested": true
      }
    ]
  },
  "customerDetails": {
    "sellerDetails": {
      "postalAddress": {
        "postalCode": "14800",
        "cityName": "Prague",
        "countryCode": "CZ",
        "addressLine1": "V Parku 2308/10",
        "provinceCode": "CZ",
        "addressLine2": "addres2",
        "addressLine3": "addres3",
        "countyName": "Central Bohemia"
      },
      "contactInformation": {
        "phone": "+1123456789",
        "companyName": "Company Name",
        "fullName": "John Brew",
        "email": "that@before.de",
        "mobilePhone": "+60112345678"
      },
      "typeCode": "business",
      "registrationNumbers": [
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        },
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        }
      ]
    },
    "buyerDetails": {
      "postalAddress": {
        "postalCode": "14800",
        "cityName": "Prague",
        "countryCode": "CZ",
        "addressLine1": "V Parku 2308/10",
        "provinceCode": "CZ",
        "addressLine2": "addres2",
        "addressLine3": "addres3",
        "countyName": "Central Bohemia"
      },
      "contactInformation": {
        "phone": "+1123456789",
        "companyName": "Company Name",
        "fullName": "John Brew",
        "email": "that@before.de",
        "mobilePhone": "+60112345678"
      },
      "registrationNumbers": [
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        },
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        }
      ],
      "typeCode": "business"
    },
    "importerDetails": {
      "postalAddress": {
        "postalCode": "14800",
        "cityName": "Prague",
        "countryCode": "CZ",
        "addressLine1": "V Parku 2308/10",
        "provinceCode": "CZ",
        "addressLine2": "addres2",
        "addressLine3": "addres3",
        "countyName": "Central Bohemia"
      },
      "contactInformation": {
        "phone": "+1123456789",
        "companyName": "Company Name",
        "fullName": "John Brew",
        "email": "that@before.de",
        "mobilePhone": "+60112345678"
      },
      "registrationNumbers": [
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        },
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        }
      ],
      "typeCode": "government"
    },
    "exporterDetails": {
      "postalAddress": {
        "postalCode": "14800",
        "cityName": "Prague",
        "countryCode": "CZ",
        "addressLine1": "V Parku 2308/10",
        "provinceCode": "CZ",
        "addressLine2": "addres2",
        "addressLine3": "addres3",
        "countyName": "Central Bohemia"
      },
      "contactInformation": {
        "phone": "+1123456789",
        "companyName": "Company Name",
        "fullName": "John Brew",
        "email": "that@before.de",
        "mobilePhone": "+60112345678"
      },
      "registrationNumbers": [
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        },
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        }
      ],
      "typeCode": "government"
    },
    "ultimateConsigneeDetails": {
      "postalAddress": {
        "postalCode": "14800",
        "cityName": "Prague",
        "countryCode": "CZ",
        "addressLine1": "V Parku 2308/10",
        "provinceCode": "CZ",
        "addressLine2": "addres2",
        "addressLine3": "addres3",
        "countyName": "Central Bohemia"
      },
      "contactInformation": {
        "phone": "+1123456789",
        "companyName": "Company Name",
        "fullName": "John Brew",
        "email": "that@before.de",
        "mobilePhone": "+60112345678"
      },
      "typeCode": "other",
      "registrationNumbers": [
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        },
        {
          "typeCode": "VAT",
          "number": "CZ123456789",
          "issuerCountryCode": "CZ"
        }
      ]
    }
  }
}'
https://api-mock.dhl.com/mydhlapi/shipments/:shipmentTrackingNumber/upload-invoice-data

Postman Collection Item JSON

{
  "name": "Upload Commercial Invoice data for your DHL Express shipment",
  "request": {
    "method": "PATCH",
    "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"
      },
      {
        "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": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"content\": {\n    \"exportDeclaration\": [\n      {\n        \"lineItems\": [\n          {\n            \"number\": 1,\n            \"description\": \"line item description\",\n            \"price\": 150,\n            \"quantity\": {\n              \"value\": 1,\n              \"unitOfMeasurement\": \"BOX\"\n            },\n            \"manufacturerCountry\": \"CZ\",\n            \"weight\": {\n              \"netValue\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n              }\n            },\n            \"commodityCodes\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ],\n            \"exportReasonType\": \"defence_material\",\n            \"isTaxesPaid\": true,\n            \"customerReferences\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ],\n            \"customsDocuments\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ]\n          }\n        ],\n        \"invoice\": {\n          \"number\": \"12345-ABC\",\n          \"date\": \"2021-03-18\",\n          \"function\": \"import\",\n          \"customerReferences\": [\n            {\n              \"typeCode\": \"CU\",\n              \"value\": \"custref112\"\n            }\n          ]\n        },\n        \"incoterm\": \"DAP\",\n        \"remarks\": [\n          {\n            \"value\": \"declaration remark\"\n          },\n          {\n            \"value\": \"declaration remark\"\n          }\n        ],\n        \"additionalCharges\": [\n          {\n            \"value\": 10,\n            \"typeCode\": \"pickup\"\n          },\n          {\n            \"value\": 10,\n            \"typeCode\": \"pickup\"\n          }\n        ],\n        \"placeOfIncoterm\": \"port of departure or destination details\",\n        \"recipientReference\": \"recipient reference\",\n        \"exporter\": {\n          \"id\": \"123\",\n          \"code\": \"EXPCZ\"\n        },\n        \"exportReasonType\": \"permanent\",\n        \"shipmentType\": \"personal\",\n        \"customsDocuments\": [\n          {\n            \"typeCode\": \"972\",\n            \"value\": \"custdoc445\"\n          }\n        ]\n      }\n    ],\n    \"currency\": \"EUR\",\n    \"unitOfMeasurement\": \"metric\"\n  },\n  \"plannedShipDate\": \"2020-04-20\",\n  \"accounts\": [\n    {\n      \"typeCode\": \"shipper\",\n      \"number\": \"123456789\"\n    },\n    {\n      \"typeCode\": \"shipper\",\n      \"number\": \"123456789\"\n    }\n  ],\n  \"outputImageProperties\": {\n    \"imageOptions\": [\n      {\n        \"typeCode\": \"invoice\",\n        \"templateName\": \"COMMERCIAL_INVOICE_P_10\",\n        \"isRequested\": true\n      }\n    ]\n  },\n  \"customerDetails\": {\n    \"sellerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"typeCode\": \"business\",\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ]\n    },\n    \"buyerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"business\"\n    },\n    \"importerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"government\"\n    },\n    \"exporterDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"government\"\n    },\n    \"ultimateConsigneeDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"typeCode\": \"other\",\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ]\n    }\n  }\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/shipments/:shipmentTrackingNumber/upload-invoice-data",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "shipments",
        ":shipmentTrackingNumber",
        "upload-invoice-data"
      ],
      "variable": [
        {
          "key": "shipmentTrackingNumber",
          "value": "dolor veniam officia non",
          "description": "(Required) DHL Express shipment identification number"
        }
      ]
    },
    "description": "## Upload Invoice Data with Shipment ID\nThe upload invoice data service can be used to upload Commerical Invoice data with Shipment Identification Number for your DHL Express shipment.Customer can provide Commercial Invoice data before Shipment Data via Create Shipment flow or vice versa.\n\nImportant Note: UploadInvoiceData service is not enabled by default and must be requested per customer. Use of this service is only enabled on exceptional basis and DHL Express recommends to submit shipment requests together with a commercial invoice data.To enable use of UploadInvoiceData service, please contact your DHL Express IT representative. To use UploadInvoiceData service, it is required that \"PM\" service code is provided in MyDHL API Create Shipment request. \"PM\" service code is not enabled by \ndefault for the customers, and needs to be enabled upon request.\n\nWhen Shipment is created via MyDHL API Create Shipment service before uploading the Commercial Invoice (CIN) data,it is mandatory to provide the Shipment Identification Number as received in MyDHL API Create Shipment service Response.\nWhen Commercial Invoice (CIN) data is uploaded prior to creating a shipment via MyDHL API Create Shipment service, it is mandatory to provide Invoice Reference Number with Invoice Reference Type value \"CU\" and Shipper Account Number. \n\nThese elements are mandatory to facilitate an effective data merge of the Commercial Invoice (CIN) data with Shipment Data. As an output customer will receive Notification element value '0' on successful upload of Commercial Invoice (CIN) data. \nDHL backend application performs the subsequent data merging process of the Shipment Data and Commercial Invoice data.\n"
  },
  "response": [
    {
      "name": "invoice data uploaded",
      "originalRequest": {
        "method": "PATCH",
        "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"
          },
          {
            "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": " "
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"content\": {\n    \"exportDeclaration\": [\n      {\n        \"lineItems\": [\n          {\n            \"number\": 1,\n            \"description\": \"line item description\",\n            \"price\": 150,\n            \"quantity\": {\n              \"value\": 1,\n              \"unitOfMeasurement\": \"BOX\"\n            },\n            \"manufacturerCountry\": \"CZ\",\n            \"weight\": {\n              \"netValue\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n              }\n            },\n            \"commodityCodes\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ],\n            \"exportReasonType\": \"defence_material\",\n            \"isTaxesPaid\": true,\n            \"customerReferences\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ],\n            \"customsDocuments\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ]\n          }\n        ],\n        \"invoice\": {\n          \"number\": \"12345-ABC\",\n          \"date\": \"2021-03-18\",\n          \"function\": \"import\",\n          \"customerReferences\": [\n            {\n              \"typeCode\": \"CU\",\n              \"value\": \"custref112\"\n            }\n          ]\n        },\n        \"incoterm\": \"DAP\",\n        \"remarks\": [\n          {\n            \"value\": \"declaration remark\"\n          },\n          {\n            \"value\": \"declaration remark\"\n          }\n        ],\n        \"additionalCharges\": [\n          {\n            \"value\": 10,\n            \"typeCode\": \"pickup\"\n          },\n          {\n            \"value\": 10,\n            \"typeCode\": \"pickup\"\n          }\n        ],\n        \"placeOfIncoterm\": \"port of departure or destination details\",\n        \"recipientReference\": \"recipient reference\",\n        \"exporter\": {\n          \"id\": \"123\",\n          \"code\": \"EXPCZ\"\n        },\n        \"exportReasonType\": \"permanent\",\n        \"shipmentType\": \"personal\",\n        \"customsDocuments\": [\n          {\n            \"typeCode\": \"972\",\n            \"value\": \"custdoc445\"\n          }\n        ]\n      }\n    ],\n    \"currency\": \"EUR\",\n    \"unitOfMeasurement\": \"metric\"\n  },\n  \"plannedShipDate\": \"2020-04-20\",\n  \"accounts\": [\n    {\n      \"typeCode\": \"shipper\",\n      \"number\": \"123456789\"\n    },\n    {\n      \"typeCode\": \"shipper\",\n      \"number\": \"123456789\"\n    }\n  ],\n  \"outputImageProperties\": {\n    \"imageOptions\": [\n      {\n        \"typeCode\": \"invoice\",\n        \"templateName\": \"COMMERCIAL_INVOICE_P_10\",\n        \"isRequested\": true\n      }\n    ]\n  },\n  \"customerDetails\": {\n    \"sellerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"typeCode\": \"business\",\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ]\n    },\n    \"buyerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"business\"\n    },\n    \"importerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"government\"\n    },\n    \"exporterDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"government\"\n    },\n    \"ultimateConsigneeDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"typeCode\": \"other\",\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ]\n    }\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/shipments/:shipmentTrackingNumber/upload-invoice-data",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "shipments",
            ":shipmentTrackingNumber",
            "upload-invoice-data"
          ],
          "variable": [
            {
              "key": "shipmentTrackingNumber",
              "value": "dolor veniam officia non",
              "description": "(Required) DHL Express shipment identification number"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "text",
      "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": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "Wrong input parameters",
      "originalRequest": {
        "method": "PATCH",
        "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"
          },
          {
            "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": " "
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"content\": {\n    \"exportDeclaration\": [\n      {\n        \"lineItems\": [\n          {\n            \"number\": 1,\n            \"description\": \"line item description\",\n            \"price\": 150,\n            \"quantity\": {\n              \"value\": 1,\n              \"unitOfMeasurement\": \"BOX\"\n            },\n            \"manufacturerCountry\": \"CZ\",\n            \"weight\": {\n              \"netValue\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n              }\n            },\n            \"commodityCodes\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ],\n            \"exportReasonType\": \"defence_material\",\n            \"isTaxesPaid\": true,\n            \"customerReferences\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ],\n            \"customsDocuments\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ]\n          }\n        ],\n        \"invoice\": {\n          \"number\": \"12345-ABC\",\n          \"date\": \"2021-03-18\",\n          \"function\": \"import\",\n          \"customerReferences\": [\n            {\n              \"typeCode\": \"CU\",\n              \"value\": \"custref112\"\n            }\n          ]\n        },\n        \"incoterm\": \"DAP\",\n        \"remarks\": [\n          {\n            \"value\": \"declaration remark\"\n          },\n          {\n            \"value\": \"declaration remark\"\n          }\n        ],\n        \"additionalCharges\": [\n          {\n            \"value\": 10,\n            \"typeCode\": \"pickup\"\n          },\n          {\n            \"value\": 10,\n            \"typeCode\": \"pickup\"\n          }\n        ],\n        \"placeOfIncoterm\": \"port of departure or destination details\",\n        \"recipientReference\": \"recipient reference\",\n        \"exporter\": {\n          \"id\": \"123\",\n          \"code\": \"EXPCZ\"\n        },\n        \"exportReasonType\": \"permanent\",\n        \"shipmentType\": \"personal\",\n        \"customsDocuments\": [\n          {\n            \"typeCode\": \"972\",\n            \"value\": \"custdoc445\"\n          }\n        ]\n      }\n    ],\n    \"currency\": \"EUR\",\n    \"unitOfMeasurement\": \"metric\"\n  },\n  \"plannedShipDate\": \"2020-04-20\",\n  \"accounts\": [\n    {\n      \"typeCode\": \"shipper\",\n      \"number\": \"123456789\"\n    },\n    {\n      \"typeCode\": \"shipper\",\n      \"number\": \"123456789\"\n    }\n  ],\n  \"outputImageProperties\": {\n    \"imageOptions\": [\n      {\n        \"typeCode\": \"invoice\",\n        \"templateName\": \"COMMERCIAL_INVOICE_P_10\",\n        \"isRequested\": true\n      }\n    ]\n  },\n  \"customerDetails\": {\n    \"sellerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"typeCode\": \"business\",\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ]\n    },\n    \"buyerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"business\"\n    },\n    \"importerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"government\"\n    },\n    \"exporterDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"government\"\n    },\n    \"ultimateConsigneeDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"typeCode\": \"other\",\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ]\n    }\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/shipments/:shipmentTrackingNumber/upload-invoice-data",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "shipments",
            ":shipmentTrackingNumber",
            "upload-invoice-data"
          ],
          "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/1234567890/upload-invoice-data\",\n  \"detail\": \"7096: The provided Shipment Identification Number is invalid. Please check the request message and retry.\",\n  \"title\": \"Bad request\",\n  \"message\": \"Bad request\",\n  \"status\": \"400\"\n}"
    },
    {
      "name": "Unprocessable Entity",
      "originalRequest": {
        "method": "PATCH",
        "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"
          },
          {
            "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": " "
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"content\": {\n    \"exportDeclaration\": [\n      {\n        \"lineItems\": [\n          {\n            \"number\": 1,\n            \"description\": \"line item description\",\n            \"price\": 150,\n            \"quantity\": {\n              \"value\": 1,\n              \"unitOfMeasurement\": \"BOX\"\n            },\n            \"manufacturerCountry\": \"CZ\",\n            \"weight\": {\n              \"netValue\": {\n                \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n              }\n            },\n            \"commodityCodes\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ],\n            \"exportReasonType\": \"defence_material\",\n            \"isTaxesPaid\": true,\n            \"customerReferences\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ],\n            \"customsDocuments\": [\n              {\n                \"typeCode\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                },\n                \"value\": {\n                  \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n                }\n              }\n            ]\n          }\n        ],\n        \"invoice\": {\n          \"number\": \"12345-ABC\",\n          \"date\": \"2021-03-18\",\n          \"function\": \"import\",\n          \"customerReferences\": [\n            {\n              \"typeCode\": \"CU\",\n              \"value\": \"custref112\"\n            }\n          ]\n        },\n        \"incoterm\": \"DAP\",\n        \"remarks\": [\n          {\n            \"value\": \"declaration remark\"\n          },\n          {\n            \"value\": \"declaration remark\"\n          }\n        ],\n        \"additionalCharges\": [\n          {\n            \"value\": 10,\n            \"typeCode\": \"pickup\"\n          },\n          {\n            \"value\": 10,\n            \"typeCode\": \"pickup\"\n          }\n        ],\n        \"placeOfIncoterm\": \"port of departure or destination details\",\n        \"recipientReference\": \"recipient reference\",\n        \"exporter\": {\n          \"id\": \"123\",\n          \"code\": \"EXPCZ\"\n        },\n        \"exportReasonType\": \"permanent\",\n        \"shipmentType\": \"personal\",\n        \"customsDocuments\": [\n          {\n            \"typeCode\": \"972\",\n            \"value\": \"custdoc445\"\n          }\n        ]\n      }\n    ],\n    \"currency\": \"EUR\",\n    \"unitOfMeasurement\": \"metric\"\n  },\n  \"plannedShipDate\": \"2020-04-20\",\n  \"accounts\": [\n    {\n      \"typeCode\": \"shipper\",\n      \"number\": \"123456789\"\n    },\n    {\n      \"typeCode\": \"shipper\",\n      \"number\": \"123456789\"\n    }\n  ],\n  \"outputImageProperties\": {\n    \"imageOptions\": [\n      {\n        \"typeCode\": \"invoice\",\n        \"templateName\": \"COMMERCIAL_INVOICE_P_10\",\n        \"isRequested\": true\n      }\n    ]\n  },\n  \"customerDetails\": {\n    \"sellerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"typeCode\": \"business\",\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ]\n    },\n    \"buyerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"business\"\n    },\n    \"importerDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"government\"\n    },\n    \"exporterDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ],\n      \"typeCode\": \"government\"\n    },\n    \"ultimateConsigneeDetails\": {\n      \"postalAddress\": {\n        \"postalCode\": \"14800\",\n        \"cityName\": \"Prague\",\n        \"countryCode\": \"CZ\",\n        \"addressLine1\": \"V Parku 2308/10\",\n        \"provinceCode\": \"CZ\",\n        \"addressLine2\": \"addres2\",\n        \"addressLine3\": \"addres3\",\n        \"countyName\": \"Central Bohemia\"\n      },\n      \"contactInformation\": {\n        \"phone\": \"+1123456789\",\n        \"companyName\": \"Company Name\",\n        \"fullName\": \"John Brew\",\n        \"email\": \"that@before.de\",\n        \"mobilePhone\": \"+60112345678\"\n      },\n      \"typeCode\": \"other\",\n      \"registrationNumbers\": [\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        },\n        {\n          \"typeCode\": \"VAT\",\n          \"number\": \"CZ123456789\",\n          \"issuerCountryCode\": \"CZ\"\n        }\n      ]\n    }\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/shipments/:shipmentTrackingNumber/upload-invoice-data",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "shipments",
            ":shipmentTrackingNumber",
            "upload-invoice-data"
          ],
          "variable": [
            {
              "key": "shipmentTrackingNumber",
              "value": "dolor veniam officia non",
              "description": "(Required) DHL Express shipment identification number"
            }
          ]
        }
      },
      "status": "Unprocessable Entity (WebDAV) (RFC 4918)",
      "code": 422,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"instance\": \"/expressapi/shipments/1234567890/upload-invoice-data\",\n  \"detail\": \"#/content/exportDeclaration/0/additionalCharges: expected maximum item count: 5, found: 6\",\n  \"title\": \"Validation error\",\n  \"message\": \"Unprocessable Entity\",\n  \"status\": \"422\"\n}"
    }
  ]
}