PATCH /shipments/{shipmentTrackingNumber}/upload-invoice-data
Upload Invoice Data with Shipment ID
The 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.
Important 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 default for the customers, and needs to be enabled upon request.
When 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. When 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.
These 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. DHL backend application performs the subsequent data merging process of the Shipment Data and Commercial Invoice data.
Servers
- https://api-mock.dhl.com/mydhlapi
- https://express.api.dhl.com/mydhlapi/test
- https://express.api.dhl.com/mydhlapi
Path parameters
Name | Type | Required | Description |
---|---|---|---|
shipmentTrackingNumber |
String | Yes |
DHL Express shipment identification number |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Plugin-Version |
String | No |
Please provide version of the plugin (applicable to 3PV only) |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Shipping-System-Platform-Version |
String | No |
Please provide version of the shipping platform (applicable to 3PV only) |
Webstore-Platform-Version |
String | No |
Please provide version of the webstore platform (applicable to 3PV only) |
Message-Reference-Date |
String | No |
Optional reference date in the HTTP-date format https://tools.ietf.org/html/rfc7231#section-7.1.1.2 |
Webstore-Platform-Name |
String | No |
Please provide name of the webstore platform (applicable to 3PV only) |
Shipping-System-Platform-Name |
String | No |
Please provide name of the shipping platform(applicable to 3PV only) |
Message-Reference |
String | No |
Please provide message reference |
Plugin-Name |
String | No |
Please provide name of the plugin (applicable to 3PV only) |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
customerDetails |
Object | No |
Here you need to define all the parties needed to ship the package |
customerDetails.buyerDetails |
Object | No |
Please enter address and contact details related to buyer |
customerDetails.buyerDetails.postalAddress |
Object | Yes | |
customerDetails.buyerDetails.postalAddress.addressLine3 |
String | No |
Please enter address line 3 |
customerDetails.buyerDetails.postalAddress.countyName |
String | No |
Please enter your suburb or county name |
customerDetails.buyerDetails.postalAddress.postalCode |
String | Yes |
Please enter your postcode or leave empty if the address doesn't have a postcode |
customerDetails.buyerDetails.postalAddress.cityName |
String | Yes |
Please enter the city |
customerDetails.buyerDetails.postalAddress.provinceCode |
String | No |
Please enter your province or state code |
customerDetails.buyerDetails.postalAddress.countryCode |
String | Yes |
Please enter ISO country code |
customerDetails.buyerDetails.postalAddress.addressLine1 |
String | Yes |
Please enter address line 1 |
customerDetails.buyerDetails.postalAddress.addressLine2 |
String | No |
Please enter address line 2 |
customerDetails.buyerDetails.typeCode |
String | No |
Please enter the business party type of the buyer Possible values:
|
customerDetails.buyerDetails.registrationNumbers[] |
Array | No | |
customerDetails.buyerDetails.registrationNumbers[].issuerCountryCode |
String | Yes |
Please enter 2 character code of the country where the Registration Number has been issued by |
customerDetails.buyerDetails.registrationNumbers[].typeCode |
String | Yes |
VAT, Value-Added tax Possible values:
Default value: "VAT" |
customerDetails.buyerDetails.registrationNumbers[].number |
String | Yes |
Please enter registration number |
customerDetails.buyerDetails.contactInformation |
Object | Yes | |
customerDetails.buyerDetails.contactInformation.companyName |
String | Yes |
Please enter company name |
customerDetails.buyerDetails.contactInformation.email |
String | No |
Please enter email address |
customerDetails.buyerDetails.contactInformation.phone |
String | Yes |
Please enter phone number |
customerDetails.buyerDetails.contactInformation.mobilePhone |
String | No |
Please enter mobile phone number |
customerDetails.buyerDetails.contactInformation.fullName |
String | Yes |
Please enter full name |
customerDetails.exporterDetails |
Object | No |
Please enter address and contact details related to exporter |
customerDetails.exporterDetails.postalAddress |
Object | Yes | |
customerDetails.exporterDetails.postalAddress.addressLine3 |
String | No |
Please enter address line 3 |
customerDetails.exporterDetails.postalAddress.countyName |
String | No |
Please enter your suburb or county name |
customerDetails.exporterDetails.postalAddress.postalCode |
String | Yes |
Please enter your postcode or leave empty if the address doesn't have a postcode |
customerDetails.exporterDetails.postalAddress.cityName |
String | Yes |
Please enter the city |
customerDetails.exporterDetails.postalAddress.provinceCode |
String | No |
Please enter your province or state code |
customerDetails.exporterDetails.postalAddress.countryCode |
String | Yes |
Please enter ISO country code |
customerDetails.exporterDetails.postalAddress.addressLine1 |
String | Yes |
Please enter address line 1 |
customerDetails.exporterDetails.postalAddress.addressLine2 |
String | No |
Please enter address line 2 |
customerDetails.exporterDetails.typeCode |
String | No |
Please enter the business party type of the exporter Possible values:
|
customerDetails.exporterDetails.registrationNumbers[] |
Array | No | |
customerDetails.exporterDetails.registrationNumbers[].issuerCountryCode |
String | Yes |
Please enter 2 character code of the country where the Registration Number has been issued by |
customerDetails.exporterDetails.registrationNumbers[].typeCode |
String | Yes |
VAT, Value-Added tax Possible values:
Default value: "VAT" |
customerDetails.exporterDetails.registrationNumbers[].number |
String | Yes |
Please enter registration number |
customerDetails.exporterDetails.contactInformation |
Object | Yes | |
customerDetails.exporterDetails.contactInformation.companyName |
String | Yes |
Please enter company name |
customerDetails.exporterDetails.contactInformation.email |
String | No |
Please enter email address |
customerDetails.exporterDetails.contactInformation.phone |
String | Yes |
Please enter phone number |
customerDetails.exporterDetails.contactInformation.mobilePhone |
String | No |
Please enter mobile phone number |
customerDetails.exporterDetails.contactInformation.fullName |
String | Yes |
Please enter full name |
customerDetails.ultimateConsigneeDetails |
Object | No |
Please enter address and contact details related to ultimate consignee |
customerDetails.ultimateConsigneeDetails.postalAddress |
Object | Yes | |
customerDetails.ultimateConsigneeDetails.postalAddress.addressLine3 |
String | No |
Please enter address line 3 |
customerDetails.ultimateConsigneeDetails.postalAddress.countyName |
String | No |
Please enter your suburb or county name |
customerDetails.ultimateConsigneeDetails.postalAddress.postalCode |
String | Yes |
Please enter your postcode or leave empty if the address doesn't have a postcode |
customerDetails.ultimateConsigneeDetails.postalAddress.cityName |
String | Yes |
Please enter the city |
customerDetails.ultimateConsigneeDetails.postalAddress.provinceCode |
String | No |
Please enter your province or state code |
customerDetails.ultimateConsigneeDetails.postalAddress.countryCode |
String | Yes |
Please enter ISO country code |
customerDetails.ultimateConsigneeDetails.postalAddress.addressLine1 |
String | Yes |
Please enter address line 1 |
customerDetails.ultimateConsigneeDetails.postalAddress.addressLine2 |
String | No |
Please enter address line 2 |
customerDetails.ultimateConsigneeDetails.typeCode |
String | No |
Please enter the business party type of the ultimate consignee Possible values:
|
customerDetails.ultimateConsigneeDetails.registrationNumbers[] |
Array | No | |
customerDetails.ultimateConsigneeDetails.registrationNumbers[].issuerCountryCode |
String | Yes |
Please enter 2 character code of the country where the Registration Number has been issued by |
customerDetails.ultimateConsigneeDetails.registrationNumbers[].typeCode |
String | Yes |
VAT, Value-Added tax Possible values:
Default value: "VAT" |
customerDetails.ultimateConsigneeDetails.registrationNumbers[].number |
String | Yes |
Please enter registration number |
customerDetails.ultimateConsigneeDetails.contactInformation |
Object | Yes | |
customerDetails.ultimateConsigneeDetails.contactInformation.companyName |
String | Yes |
Please enter company name |
customerDetails.ultimateConsigneeDetails.contactInformation.email |
String | No |
Please enter email address |
customerDetails.ultimateConsigneeDetails.contactInformation.phone |
String | Yes |
Please enter phone number |
customerDetails.ultimateConsigneeDetails.contactInformation.mobilePhone |
String | No |
Please enter mobile phone number |
customerDetails.ultimateConsigneeDetails.contactInformation.fullName |
String | Yes |
Please enter full name |
customerDetails.sellerDetails |
Object | No |
Please enter address and contact details related to seller |
customerDetails.sellerDetails.postalAddress |
Object | Yes | |
customerDetails.sellerDetails.postalAddress.addressLine3 |
String | No |
Please enter address line 3 |
customerDetails.sellerDetails.postalAddress.countyName |
String | No |
Please enter your suburb or county name |
customerDetails.sellerDetails.postalAddress.postalCode |
String | Yes |
Please enter your postcode or leave empty if the address doesn't have a postcode |
customerDetails.sellerDetails.postalAddress.cityName |
String | Yes |
Please enter the city |
customerDetails.sellerDetails.postalAddress.provinceCode |
String | No |
Please enter your province or state code |
customerDetails.sellerDetails.postalAddress.countryCode |
String | Yes |
Please enter ISO country code |
customerDetails.sellerDetails.postalAddress.addressLine1 |
String | Yes |
Please enter address line 1 |
customerDetails.sellerDetails.postalAddress.addressLine2 |
String | No |
Please enter address line 2 |
customerDetails.sellerDetails.typeCode |
String | No |
Please enter the business party type of the buyer Possible values:
|
customerDetails.sellerDetails.registrationNumbers[] |
Array | No | |
customerDetails.sellerDetails.registrationNumbers[].issuerCountryCode |
String | Yes |
Please enter 2 character code of the country where the Registration Number has been issued by |
customerDetails.sellerDetails.registrationNumbers[].typeCode |
String | Yes |
VAT, Value-Added tax Possible values:
Default value: "VAT" |
customerDetails.sellerDetails.registrationNumbers[].number |
String | Yes |
Please enter registration number |
customerDetails.sellerDetails.contactInformation |
Object | Yes | |
customerDetails.sellerDetails.contactInformation.companyName |
String | Yes |
Please enter company name |
customerDetails.sellerDetails.contactInformation.email |
String | No |
Please enter email address |
customerDetails.sellerDetails.contactInformation.phone |
String | Yes |
Please enter phone number |
customerDetails.sellerDetails.contactInformation.mobilePhone |
String | No |
Please enter mobile phone number |
customerDetails.sellerDetails.contactInformation.fullName |
String | Yes |
Please enter full name |
customerDetails.importerDetails |
Object | No |
Please enter address and contact details related to importer |
customerDetails.importerDetails.postalAddress |
Object | Yes | |
customerDetails.importerDetails.postalAddress.addressLine3 |
String | No |
Please enter address line 3 |
customerDetails.importerDetails.postalAddress.countyName |
String | No |
Please enter your suburb or county name |
customerDetails.importerDetails.postalAddress.postalCode |
String | Yes |
Please enter your postcode or leave empty if the address doesn't have a postcode |
customerDetails.importerDetails.postalAddress.cityName |
String | Yes |
Please enter the city |
customerDetails.importerDetails.postalAddress.provinceCode |
String | No |
Please enter your province or state code |
customerDetails.importerDetails.postalAddress.countryCode |
String | Yes |
Please enter ISO country code |
customerDetails.importerDetails.postalAddress.addressLine1 |
String | Yes |
Please enter address line 1 |
customerDetails.importerDetails.postalAddress.addressLine2 |
String | No |
Please enter address line 2 |
customerDetails.importerDetails.typeCode |
String | No |
Please enter the business party type of the importer Possible values:
|
customerDetails.importerDetails.registrationNumbers[] |
Array | No | |
customerDetails.importerDetails.registrationNumbers[].issuerCountryCode |
String | Yes |
Please enter 2 character code of the country where the Registration Number has been issued by |
customerDetails.importerDetails.registrationNumbers[].typeCode |
String | Yes |
VAT, Value-Added tax Possible values:
Default value: "VAT" |
customerDetails.importerDetails.registrationNumbers[].number |
String | Yes |
Please enter registration number |
customerDetails.importerDetails.contactInformation |
Object | Yes | |
customerDetails.importerDetails.contactInformation.companyName |
String | Yes |
Please enter company name |
customerDetails.importerDetails.contactInformation.email |
String | No |
Please enter email address |
customerDetails.importerDetails.contactInformation.phone |
String | Yes |
Please enter phone number |
customerDetails.importerDetails.contactInformation.mobilePhone |
String | No |
Please enter mobile phone number |
customerDetails.importerDetails.contactInformation.fullName |
String | Yes |
Please enter full name |
customerDetails.brokerDetails |
Object | No |
Please enter address and contact details related to broker |
customerDetails.brokerDetails.postalAddress |
Object | Yes | |
customerDetails.brokerDetails.postalAddress.addressLine3 |
String | No |
Please enter address line 3 |
customerDetails.brokerDetails.postalAddress.countyName |
String | No |
Please enter your suburb or county name |
customerDetails.brokerDetails.postalAddress.postalCode |
String | Yes |
Please enter your postcode or leave empty if the address doesn't have a postcode |
customerDetails.brokerDetails.postalAddress.cityName |
String | Yes |
Please enter the city |
customerDetails.brokerDetails.postalAddress.provinceCode |
String | No |
Please enter your province or state code |
customerDetails.brokerDetails.postalAddress.countryCode |
String | Yes |
Please enter ISO country code |
customerDetails.brokerDetails.postalAddress.addressLine1 |
String | Yes |
Please enter address line 1 |
customerDetails.brokerDetails.postalAddress.addressLine2 |
String | No |
Please enter address line 2 |
customerDetails.brokerDetails.typeCode |
String | No |
Please enter the business party type of the broker Possible values:
|
customerDetails.brokerDetails.registrationNumbers[] |
Array | No | |
customerDetails.brokerDetails.registrationNumbers[].issuerCountryCode |
String | Yes |
Please enter 2 character code of the country where the Registration Number has been issued by |
customerDetails.brokerDetails.registrationNumbers[].typeCode |
String | Yes |
VAT, Value-Added tax Possible values:
Default value: "VAT" |
customerDetails.brokerDetails.registrationNumbers[].number |
String | Yes |
Please enter registration number |
customerDetails.brokerDetails.contactInformation |
Object | Yes | |
customerDetails.brokerDetails.contactInformation.companyName |
String | Yes |
Please enter company name |
customerDetails.brokerDetails.contactInformation.email |
String | No |
Please enter email address |
customerDetails.brokerDetails.contactInformation.phone |
String | Yes |
Please enter phone number |
customerDetails.brokerDetails.contactInformation.mobilePhone |
String | No |
Please enter mobile phone number |
customerDetails.brokerDetails.contactInformation.fullName |
String | Yes |
Please enter full name |
plannedShipDate |
String | No |
The planned shipment date for the provided shipmentTrackingNumber. The date must be in the format: YYYY-MM-DD |
accounts[] |
Array | No |
Please enter all the DHL Express accounts and types to be used for this shipment. |
accounts[].typeCode |
String | Yes |
Please enter DHL Express acount type Possible values:
|
accounts[].number |
String | Yes |
Please enter DHL Express account number |
outputImageProperties |
Object | No |
Here you can set invoice properties |
outputImageProperties.imageOptions[] |
Array | No |
Here the image options are defined for label, waybillDoc, invoice, receipt and QRcode |
outputImageProperties.imageOptions[].isRequested |
Boolean | No |
If set to true then the document is rendered otherwise not |
outputImageProperties.imageOptions[].typeCode |
String | Yes |
Please enter the document type you want to wish set properties for Possible values:
|
outputImageProperties.imageOptions[].templateName |
String | No |
Please enter DHL Express document template name. |
content |
Object | Yes |
Here you can define all the properties related to the content of the prospected shipment |
content.unitOfMeasurement |
String | Yes |
Please enter Unit of measurement - metric,imperial Possible values:
|
content.exportDeclaration[] |
Array | Yes |
Here you can find all details related to export declaration |
content.exportDeclaration[].shipmentType |
String | No |
Please provide the shipment was sent for Personal (Gift) or Commercial (Sale) reasons Possible values:
|
content.exportDeclaration[].invoice |
Object | Yes |
Please provide invoice related information |
content.exportDeclaration[].invoice.function |
String | Yes |
Please provide the purpose was the document details captured and are planned to be used. Note: export and import is only applicable for approve Sale In Transit customers Possible values:
|
content.exportDeclaration[].invoice.number |
String | Yes |
Please enter commercial invoice number |
content.exportDeclaration[].invoice.indicativeCustomsValues |
Object | No |
Please provide Perfect Invoice related information |
content.exportDeclaration[].invoice.indicativeCustomsValues.totalWithImportDutiesAndTaxes |
Number | No |
Please provide pre-calculated total of all line items plus additional charges plus indicativeCustomsValues |
content.exportDeclaration[].invoice.indicativeCustomsValues.importTaxesValue |
Number | No |
Please provide the pre-calculated import taxes (VAT/GST) value for the shipment |
content.exportDeclaration[].invoice.indicativeCustomsValues.importCustomsDutyValue |
Number | No |
Please provide the pre-calculated import customs duties value for the shipment |
content.exportDeclaration[].invoice.customerReferences[] |
Array | No |
Please provide the customer references at invoice level. |
content.exportDeclaration[].invoice.customerReferences[].typeCode |
String | Yes |
Please provide the invoice reference type code Possible values:
|
content.exportDeclaration[].invoice.customerReferences[].value |
String | Yes |
Please provide the invoice reference |
content.exportDeclaration[].invoice.date |
String | Yes |
Please enter commercial invoice date |
content.exportDeclaration[].invoice.preCalculatedTotalValues |
Object | No |
Please provide pre-calculated total values |
content.exportDeclaration[].invoice.preCalculatedTotalValues.preCalculatedTotalGoodsValue |
Number | Yes |
Please provide the pre-calculated total value of all line items |
content.exportDeclaration[].invoice.preCalculatedTotalValues.preCalculatedTotalInvoiceValue |
Number | Yes |
Please provide the total value of all line items plus additional charges if any |
content.exportDeclaration[].remarks[] |
Array | No |
Please enter up to three remarks |
content.exportDeclaration[].remarks[].value |
String | Yes |
Please enter remark text |
content.exportDeclaration[].exporter |
Object | No |
Exporter related details |
content.exportDeclaration[].exporter.id |
String | No |
Please provide exporter Id |
content.exportDeclaration[].exporter.code |
String | No |
Please provide exporter code |
content.exportDeclaration[].additionalCharges[] |
Array | No |
Please enter additional charge to appear on the invoice |
content.exportDeclaration[].additionalCharges[].typeCode |
String | Yes |
Please enter charge type Possible values:
|
content.exportDeclaration[].additionalCharges[].value |
Number | Yes |
Please provide the charge value |
content.exportDeclaration[].placeOfIncoterm |
String | No |
Name of port of departure, shipment or destination as required under the applicable delivery term. |
content.exportDeclaration[].exportReasonType |
String | No |
Please provide the reason for export Possible values:
|
content.exportDeclaration[].incoterm |
String | Yes |
The Incoterms rules are a globally-recognized set of standards, used worldwide in international and domestic contracts for the delivery of goods, illustrating responsibilities between buyer and seller for costs and risk, as well as cargo insurance. Possible values:
|
content.exportDeclaration[].lineItems[] |
Array | Yes |
Please enter details for each export line item |
content.exportDeclaration[].lineItems[].manufacturerCountry |
String | Yes |
Please enter two letter ISO manufacturer country code |
content.exportDeclaration[].lineItems[].price |
Number | Yes |
Please provide unit or article price line item value |
content.exportDeclaration[].lineItems[].isTaxesPaid |
Boolean | No |
Please provide if the Taxes is paid for the line item |
content.exportDeclaration[].lineItems[].description |
String | Yes |
Please provide description of the line item |
content.exportDeclaration[].lineItems[].number |
Integer | Yes |
Please provide line item number |
content.exportDeclaration[].lineItems[].commodityCodes[] |
Array | No |
Please provide Commodity codes for the shipment at item line level |
content.exportDeclaration[].lineItems[].commodityCodes[].typeCode |
String | Yes |
Please provide type of the commodity code Possible values:
|
content.exportDeclaration[].lineItems[].commodityCodes[].value |
String | Yes |
Please provide the commodity code |
content.exportDeclaration[].lineItems[].preCalculatedLineItemTotalValue |
Number | No |
Please provide monetary value of the line item x quantity |
content.exportDeclaration[].lineItems[].quantity |
Object | Yes |
Please enter information about quantity for this line item |
content.exportDeclaration[].lineItems[].quantity.unitOfMeasurement |
String | Yes |
Please provide correct unit of measurement Possible values:
|
content.exportDeclaration[].lineItems[].quantity.value |
Integer | Yes |
Please enter number of pieces in the line item |
content.exportDeclaration[].lineItems[].exportReasonType |
String | No |
Please provide the reason for export Possible values:
|
content.exportDeclaration[].lineItems[].customerReferences[] |
Array | No |
Please provide the Customer References for the line item |
content.exportDeclaration[].lineItems[].customerReferences[].typeCode |
String | Yes |
Please provide the line item reference type code. Please refer to the YAML Reference Data Guide PDF file for valid enumeration values. Possible values:
|
content.exportDeclaration[].lineItems[].customerReferences[].value |
String | Yes |
Please provide the line item reference |
content.exportDeclaration[].lineItems[].weight |
Object | Yes |
Please enter the weight information for line item. Either a netValue or grossValue must be provided for the line item. |
content.exportDeclaration[].lineItems[].weight.grossValue |
Number | No |
Please enter the gross weight value |
content.exportDeclaration[].lineItems[].weight.netValue |
Number | No |
Please enter the net weight value |
content.exportDeclaration[].lineItems[].customsDocuments[] |
Array | No |
Please provide the customs documents details |
content.exportDeclaration[].lineItems[].customsDocuments[].typeCode |
String | Yes |
Please provide the line item customs document type code. Please refer to the YAML Reference Data Guide PDF file for valid enumeration values. Possible values:
|
content.exportDeclaration[].lineItems[].customsDocuments[].value |
String | Yes |
Please provide the line item customs document ID |
content.exportDeclaration[].recipientReference |
String | No |
Please enter recipient reference |
content.exportDeclaration[].customsDocuments[] |
Array | No |
Please provide the Customs Documents at invoice level |
content.exportDeclaration[].customsDocuments[].typeCode |
String | Yes |
Please provide the Customs Document type code at invoice level. Please refer to the YAML Reference Data Guide PDF file for valid enumeration values. Possible values:
|
content.exportDeclaration[].customsDocuments[].value |
String | Yes |
Please provide the Customs Document ID at invoice level |
content.currency |
String | Yes |
For customs purposes please advise on currency code of the indicated amount in invoice. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.