适用于:
- 与国际限时快递相关的制作运单、查询预估运费、快件追踪等更多服务
- 拥有 DHL Express 客户账号的用户
- 可用于全球
MyDHL API 将 DHL Express 的优势与您的内部发货流程相结合。与您的网站集成,连接现有的订单输入、仓库管理和其他商业软件系统,帮助你实现更精简高效的运营操作。简单整合!
MyDHL API 为您的所有 DHL EXPRESS 服务操作提供一站式解决方案。包括:
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
询价 | 产品 | 落地成本 | 制作运单 | 取件 | 追踪 | 地址 | Identifier |
优化和发展你的业务
- 将 DHL Express 功能(比如履行流程)与您的现有系统无缝整合
- 无需切换程序或重新输入信息,即可获得 DHL Express 的发货选项和预估费用
- 保留团队熟悉的用户界面,不需要尽快进行成本高昂的员工培训
- 提供DHL Express 运输产品、落地成本和按需交付功能,在网络交易结账时销售更多的产品
为开发者创建
- 根据行业标准设计、开发者知道并了解的单一 API。
- 考虑到快节奏的仓库运营以及电子商务结账步骤
- 提供专门的 API 环境,测试你的解决方案
- 由当地的 DHL Express API 专家提供开发者支持
范围
MyDHL API 提供的主要的系统对接服务如下:
MyDHL API 服务 | 描述 |
---|---|
询价
|
通过询价服务操作,可以返回 DHL EXPRESS 的产品服务能力(产品、增值服务和预计交付时间)以及您的 DHL EXPRESS 预估运费。 |
产品
|
更轻巧的询价服务,在进行单件运输时检索可用的 DHL Express 产品。 |
落地成本
|
检索估算的落地成本,包括预估的关税和税金。请注意,在使用这项服务前,需要提供您的物品目录和海关数据(即 HS Codes)。 |
快件服务
|
通过快件服务,您可以创建完整的 DHL EXPRESS 运单,包括运输标签、可选海关文件和取件以及保险等增值服务。 DHL EXPRESS 建议先使用询价服务,查看所有可用产品和增值服务,然后将所需的 DHL EXPRESS 产品和增值服务,传送到发件服务操作中。 除了创建 DHL Express 运单外,快件服务还可以为某些已投递的快件提供电子签收凭证,为您的快件上传更新的海关发票影像。 |
取件
|
取件服务可以创建 DHL Express 取件请求,对其进行更新或取消 |
追踪
|
追踪服务可查询 DHL快件的转运状态 |
地址
|
查看 DHL Express 在始发地/目的地是否可取件/派件(即将推出) |
Identifier
|
Service to allocate identifiers upfront for DHL Express Breakbulk or Loose Break Bulk shipments |
使用 API
该 API 供开发人员使用。需具备 REST APIs、JSON 和 HTTPS 的基本知识。此外,您的公司/机构必须拥有一个有效的 DHL Express 客户账号。如需详细了解获得客户账号的信息,请进入 DHL Express 客户账号申请页面。
使用举例
与您现有的网站/解决方案简单集成
在您的网站、客户服务应用程序或订单处理系统中,加入 DHL 制单发货功能,即可轻松发货,让客户可以轻松收到包裹。通过 DHL Express API 可随时了解 DHL 服务的可用性、预计运输时间、预估费用、进行制作运单和预约快递员取件,以及进行国际快递追踪服务。
获取权限
如需使用 DHL Express API,您的公司/机构需要在 DHL Express 拥有一个有效的客户账号。
我已有 一个DHL Express 的帐号。
[1.] 开始你的API对接进程 | [2.] 获得 API 权限 |
|
将提供您的 DHL Express API 访问权限,开启您的系统对接开发进程。 |
如果您不是 DHL Express 客户, 请按以下步骤申请一个新的客户账号。
[1.] 申请一个客户账号。 | [2.] 账户设置 | [3.] 获取 API 权限 |
进入 DHL Express 客户账号申请页面。完成表格并点击提交。 | DHL Express 团队将联系您,设置您的账户。 | 获得DHL Express 账号后,点击 这里 就可以进入! |
认证
您的DHL EXPRESS顾问将为您提供DHL EXPRESS API (MyDHL API) 的访问凭证,在技术方面提供帮助。
请注意,作为Request一部分的Authorization header需要设定为pre-emptively,并遵循 BasicAuth 标准。
环境
MyDHL API的基础URL/URI是:
环境 | 描述 |
https://dpdhl.sharepoint.com/sites/SmartCenter/SitePages/What-is-M365-Apps.aspx | 测试环境,用来测试你的对接系统 |
https://express.api.dhl.com/mydhlapi | 创建与 DHL Express 进行真实交易的生产环境 |
配额限制
- 在 DHL EXPRESS 测试环境中,将为您的访问密匙提供每天 500 次的服务调用限额。可将其用于测试您的系统与 DHL EXPRESS 的集成开发。
- DHL EXPRESS 测试环境配备正式的服务水平协议,确保可使用的支持。
附加信息
DHL Express API 会对提交的数据分几个步骤进行验证。
首先基于请求信息总体架构的数据必填项和数据内容限制条件,进行通用格式验证(即schema验证)。
在第二步,对于通过第一步校验的数据进一步进行多个业务规则校验,从而在返回的消息中,给出相应的验证结果。对于成功建立的API数据交互,每个请求都会返回一个对应的消息结果。在这个消息结果中,会保存所有的错误或校验错误信息。
Specific Terms for the use of and access to the DHL Express - MyDHL API ("MyDHL API")
- When using or accessing the MyDHL API and its associated services (the “API Services”; for the avoidance of doubt, a reference to MyDHL API in these Legal Terms is deemed a reference to the MyDHL API including the API Services, unless the context suggests otherwise) you are entering into a legal agreement and you agree to all of these terms without amendment. In agreeing to these terms, you have already agreed to abide by DHL’s General Developer Portal Terms of Use, which represents an additional binding agreement relating to your use of the MyDHL API, the two sets of terms shall be interpreted collectively and known as (the „Legal Terms“) in this document.
- To register for the use of MyDHL API You and/or the legal entity you are authorized to represent (hereinafter “You”/”Your”) need to have an active customer account with a DHL Express entity. An API Productive Key and access details will be provided to You subject to a successful validation of Your credentials by DHL.
- If You engage an external developer, or other IT services provider to develop Your Application or any other third party (“Third Parties”) to access and/or use the MyDHL API on Your behalf, You remain fully liable for any acts or omissions of such Third Parties in connection with the access to and/or usage of the MyDHL API.
- The Legal Terms govern Your use of and/or access to the MyDHL API and, unless otherwise stated herein, do not replace and/or modify the applicable terms and conditions of carriage; any transportation services agreement; or any other agreements with DHL Express or any of its affiliates, which govern services or products provided to You (separately, each an “Agreement”). Notwithstanding the foregoing, You expressly acknowledge and agree that solely with respect to Your use of and access to the MyDHL API the Legal Terms shall take precedence over the terms and conditions in an Agreement, unless an Agreement specifically addresses the use of or access to the MyDHL API by You, in which case the Agreement shall prevail.
- Additional terms, to be accepted separately by You, may apply to certain API Services. Please be aware that transportation services provided by DHL Express are, and always remain, strictly subject to the DHL Express Terms and Conditions of Carriage.
- You grant DHL Express the right to use all data, documents, logos or other information transmitted by You to or within the MyDHL API (“Information”), for the purposes specified in the API Services. This includes the use of the Information for the purpose of processing and transporting shipments. You shall ensure that all Information which You transmit to DHL Express via the MyDHL API is complete, correct and accurate. You will be solely responsible for any damage or consequence that may arise from the use of false or incorrect or incomplete Information. You shall be solely responsible for, and shall indemnify DHL Express in full against, any claims, losses, damages or consequences that may arise from the use of or reliance on the Information.
- You are responsible for all activities conducted via the MyDHL API in accordance with all applicable laws, in particular competition, data protection and customs laws. You shall be responsible for the provision of the correct legal ground to process personal data in order for DHL Express to communicate with receivers and consignees of shipments. In particular, in countries where consent is required, You shall obtain the consent of any receiver for the receipt of any e-mail or SMS from DHL Express or any other data, documents or information in electronic form and in general, from any third party, for personal data owned by any third party and which You provided to DHL Express. On request of DHL Express, You shall provide DHL Express with evidence of such consent.
- DHL Express will handle personal data in accordance with applicable data protection laws and the Deutsche Post DHL Data Privacy Policy. More information can be found on DHL Express’ Privacy Notice. You must process all personal data You send to us or obtain from us, according to applicable data protection laws.
- You accept that DHL Express will incur costs in processing shipping orders made via the MyDHL API and that DHL Express may request that You compensate it in the event that You do not subsequently tender a shipment for the shipping orders at the expected pick-up time.
- The API Services are provided on an "as is" basis. DHL Express, to the fullest extent permitted by law, excludes all warranties, whether express, implied, statutory or otherwise, including but not limited to the implied warranties of merchantability, non-infringement of third parties rights and fitness for a particular purpose. DHL Express, its affiliates or agents make no representations or warranties about the accuracy, completeness, security or timeliness of the API Services. No information obtained via the MyDHL API shall create any warranty not expressly stated by DHL Express in the Legal Terms.
- You shall use the MyDHL API only for the legitimate contractual purposes and only in connection with Your DHL Express shipments.
- API Services
The following prerequisites and restrictions apply for the use of and access to the API Services, the data or the information provided via the MyDHL API.
The details below are not an exhaustive list of the API Services available through the MyDHL API, DHL Express just wants You to be aware of specific elements of certain API Services available to You.
- "Create a Shipment"
- When using the API Service “Create a Shipment” this includes, amongst other things, the possibility to create and print shipping labels, to book shipment collections and access other value added services. Please be aware that the booking of the shipment within MyDHL API does not constitute the contract of carriage. The contract of carriage will only be concluded when the shipment is handed over or picked up and accepted by DHL Express.
- When using the API Service “Create a Shipment” this includes, amongst other things, the possibility to create and print shipping labels, to book shipment collections and access other value added services. Please be aware that the booking of the shipment within MyDHL API does not constitute the contract of carriage. The contract of carriage will only be concluded when the shipment is handed over or picked up and accepted by DHL Express.
- "Product and Rating"
- The API Service “Product” provides You with DHL Express’ product capabilities for a certain piece of a shipment, whereas the API Service “Rating” gives indications on prices and estimated delivery dates/times.
- The API Service “Landed Cost” calculates an estimated landed cost that includes customs duties, freight charges, and other charges that You may provide to DHL Express. For the “Landed Cost” service as part of the DHL EXPRESS – MyDHL API additional terms and conditions shall apply as set out below.
- Data requested and received, such as product name, product capability, rate(s), lead time(s)/estimated delivery date(s), is hereinafter referred to as “Product and/or Rating Data”.
- The information about rates and transit time and/or delivery date, is only indicative and not guaranteed. DHL Express has no liability or responsibility for differences between this indicative quote and the actual rate or transit time. The final rate and/or transit time may differ based on the characteristics of the shipment, services requested and the packages actually tendered to DHL Express. Rates quoted may not include duties, taxes, customs charges or all surcharges and fees.
- You shall not reveal to and/or provide any third parties, esp. other transportation and/or logistics services providers, with the Product and/or Rating Data without DHL Express’ prior written consent.
- You shall not store and/or modify Product and/or Rating Data in any form; it is especially prohibited to analyze and/or derive data/information for competitive purposes from the Product and/or Rating Data without our prior written consent.
- "Landed Cost Service" or ("LC") Cost Service” or (“LC”)
- LC is a service to provide You with landed cost estimates. Landed costs are the total costs associated with shipping a product to your location from another location and include estimated transportation charges and customs duties. LC is based on the information you provide. You acknowledge that the data provided via the LC is time-sensitive and may change frequently. You are solely responsible for providing the required shipment data, i.e. shipping values such as freight and insurance, to DHL Express in order to calculate the estimated landed costs.
- LC does not replace the need for any insurance and the respective risk assessment by your insurance provider. LC is solely offered to business customers. You may not use LC for any purpose that violates the General Developer Portal Terms of Use and these Legal Terms or any applicable law. You shall not substantially replicate products or services offered by DHL Express including, without limitation, features, functions or clients in LC. You shall not, under any circumstances, through applications or otherwise, repackage or resell LC services, or any part thereof, or data provided via LC and You agree not to create a database using the data/content provided via LC.
- For all shipments, You are solely responsible for the accuracy of information which You fill in on shipment documents and also for complying with all applicable export, import, and other requirements applicable to your shipments.
2.13.3
- Shipment
- Support for new registration number type of 'FTN' (Foreign Tax Identification Number) for Mexico country usage
- Support for new registration number type of 'FTN' (Foreign Tax Identification Number) for Mexico country usage
- Invoice
- Support for new registration number type of 'FTN' (Foreign Tax Identification Number) for Mexico country usage
- Support for new registration number type of 'FTN' (Foreign Tax Identification Number) for Mexico country usage
2.13.1
- Shipment
- Considering of special services of 'TF' (Verified Delivery) which is part of customer agreement on DHL Express shipper account level when rendering the Transport Label
2.13.0
- Shipment
- Option to return rates for product B (BBX) onboarded customers
- Option to return rates for product B (BBX) onboarded customers
- Rates
- Option to return rates for product B (BBX) onboarded customers
- Option to return rates for product B (BBX) onboarded customers
- Get Image
- Supports document image retrieval of customs document type of 'TAS' (transport-accompanying-document) and 'GES' (generic-entry-summary)
2.12.1
- Shipment
- introducing new 'DDS' (Due Diligence Statement Reference Number) type code under Export Declaration/ Line Item references
- Support for new registration number type of 'EIC' (eInvoice Carrier) for Taiwan country usage
- Invoice
- introducing new 'DDS' (Due Diligence Statement Reference Number) type code under Export Declaration/ Line Item references
- Support for new registration number type of 'EIC' (eInvoice Carrier) for Taiwan country usage
2.12.0
- Shipment
- Account validation enhancement on allowed product and network type combination
- New release version number 'x-version' to return new 'pickupCutoffSameDayOutboundProcessing' field to replace legacy field 'GMTCutoffTime' in shipment response
- Reference Data
- New language codes details for document rendering Commercial Invoice, Shipment Receipt, Email Notification and Tracking localization
- Updated new supported values for 'unitOfMeasurement' category
- Rates
- New release version number 'x-version' to return new 'pickupCutoffSameDayOutboundProcessing' field to replace legacy field 'GMTCutoffTime' in rates response
2.11.4
- Shipment
- Support for new Registration number type of 'IMS'
Note: 'IMS' code will be available in Production by the end of March 2025.
- Support for new Registration number type of 'IMS'
2.11.2
- Shipment
- Invoice date field description updates
- Reference Data updates on registration number information for Malaysia (MY) e-Invoice regulatory changes
- Tracking
- Tracking response with event remarks fields at shipment and pieces level
2.11.1
- Shipment
- Support for manufacturerDetails customer role
- exportDeclaration's and lineItems's customsDocuments typeCode updates with new 'PCH' value
- 'PPY' - Proof Of Payment typeCode is replaced with 'PCH' - Proof Of Purchase.
- Invoice
- Support for manufacturerDetails customer role
- exportDeclaration's and lineItems's customsDocuments typeCode updates with new 'PCH' value
- 'PPY' - Proof Of Payment typeCode is replaced with 'PCH' - Proof Of Purchase.
2.11.0
- Shipment
- Handling of export line item’s taxes paid indicator applicable to the provided destination country dynamically
- Support for Broker customer role
- New 'linkLabelsByPieces' option under getAdditionalInformation's typeCode that return additional response fields in shipment response for linkage of individual piece’s reference number and its transport label or waybill document image type.
- Invoice
- Support for Broker customer role
- Tracking
- Tracking response with masking protected data and authorization process implementation
- New request parameter to return GMT offset per event/ checkpoint
2.10.1
Tracking
- Support for trackingView of 'all-check-with-remarks' and new parameter for requesting array of controlled access data codes in tracking response.
2.10.0
- Shipment
- Support for multilingual Global Shipment Receipt
2.9.0
- Shipment
- bypassPLTError query parameter made publicly available without any restriction to all the DHL Express MyDHL API customers
- Updated invoice display logic to individually and consistently show Freight and Insurance charges, preventing them from being categorized under "Other Charges" for enhanced clarity.
- Considering of special services (CIN2, GoGreen/ GoGreen+) which is part of Customer agreement on DHL Express account level when rendering the Transport label
- Enhanced data validation: positive values are enforced for parameters such as totalNetWeight, totalGrossWeight, price, netValue weight, grossValue weight, additionalCharges's value, importCustomsDutyValue, and importTaxesValue.
- Invoice
- Updated invoice display logic to individually and consistently show Freight and Insurance charges, preventing them from being categorized under "Other Charges" for enhanced clarity.
- Get Image
- Support document image retrieval of customs document with both the Export and Import document function type
- Reference Data – new API
- Introduced new resource allowing to retrieve various DHL Express related reference data
2.8.2
- Service Point
- Returns list of service points based on the given postal location address, service point ID or geocode details for DHL Express Service points to pick-up and drop-off shipments
2.8.0
- Shipment
- Support for Customer own calculated totals and sub-totals amounts on the Commercial invoice ('preCalculatedTotalGoodsValue','preCalculatedTotalInvoiceValue','preCalculatedLineItemTotalValue' and 'totalWithImportDutiesAndTaxes'). If all of these provided in the request then DHL Express will not auto-calculate the values but will use what is provided by the customer in the request
- Currency Code made optional for non-declarable shipments
- Incoterm made optional for all non-declarable shipments
- Introduced Shipment data validation flow to support data validation without label creation
- Automated Digital Imaging (ADI) enablement
- Invoice
- Support for Customer own calculated totals and sub-totals amounts on the Commercial invoice ('preCalculatedTotalGoodsValue','preCalculatedTotalInvoiceValue','preCalculatedLineItemTotalValue' and 'totalWithImportDutiesAndTaxes'). If all of these provided in the request then DHL Express will not auto-calculate the values but will use what is provided by the customer in the request
2.7.2
- Shipment
- Support for multiple UN code values for Excepted Quantities(HH) under valueAddedServices/dangerousGoods
- Support for multiple MRN (Movement Reference number) values under content/exportDeclaration/invoice/customerReferences
- Invoice
- Support for Commercial Invoice’s indicative duty and tax amount rendering for customs purpose using COMMERCIAL_INVOICE_P_10 and COMMERCIAL_INVOICE_L_10 templates
- Support for multiple MRN (Movement Reference number) values under content/exportDeclaration/invoice/customerReferences
2.7.0
- Shipment
- Support Singapore OVR GSTN registration number and GST taxes
- Support for Dangerous Goods customized statement on Shipment level
- Validation of any Country code provided in the request message
- Invoice
- Validation of any Country code provided in the request message
- Rates
- Option to decide whether Quoted or Committed Estimated Delivery Date to be returned
- Address
- Support for County name (Suburb)
2.6.0
- Shipment
- Mandatory "exportDeclaration" section for declarable (non-documents) shipments
- Support for Ultimate Consignee customer role
- Introduced option that allows exact-match validation of postal address provided under Shipper and Receiver customer details
- Support for Commercial Invoice’s indicative duty and tax amount rendering for customs purpose using COMMERCIAL_INVOICE_P_10 and COMMERCIAL_INVOICE_L_10 templates
- Invoice
- Support for Ultimate Consignee customer role
- Rates
- Introduced option to return dependent / mutual exclusive services list
- Introduced option that allows exact-match validation of postal address provided under Shipper and Receiver customer details
2.5.0
- Shipment
- Support for Global Returns Invoice templateName 'RET_COM_INVOICE_A4_01'
2.4.0
- Shipment
- Support for non-DHL barcode Licence plate identification number types
- Added Export Line Item Reference Type of ECCN - No License Required indicator (NLR)
- Ability to return provinceName in rendered Transport Label and Waybill document
- List of supported incoterms updated
- Invoice
- Added Export Line Item Reference Type of ECCN - No License Required indicator (NLR)
- Get Image – new API
- Retrieve shipment related document images (Commercial Invoice, Waybill Document, Customs document)
2.3.1
- Shipment
- Removed <function> field in Shipment request
2.3.0
- Shipment
- PDF Labels rendered can be requested to fit to A4 page size
2.2.0
- Landed Cost
- Return landed cost with partial or no commodity code
- Improved error messages
- Ability to return tariff formula
2.1.0
-
Shipment
- Support for upload Invoice data for existing shipment
- Support for additional customs related e-commerce rules
-
Invoice – new API
- Support for upload Invoice data before shipment is created
2.0.0
- Shipment
- Support for the new European Union VAT and customs e-commerce rules for the import of low value consignments as of July 1st 2021
- Support for Loose BBX shipments
- Support for Label-Less return shipments
- Support for Cash-On-Delivery shipments
- Support for upload of additional document images for Advanced Shipments
1.1.0
Added new endpoints to the API:
- Tracking
- Pickup
- Identifier
- Address
1.0.0
- Initial Release of Rates, Shipments & Fully Landed Cost - ready for Pilot