v1

latestOpenAPI 3.0.12026-07-242073551.1 MB
Shipping Accounts

Add Account

Add a shipping account for DHL Express and link it with an existing shipping location. <br />Ensure to have required carrier details ready like DHL Express account number, API key and API secret so that you can use the account for shipping with DHL Express.

post/v4/shippingAccounts/dhlexpress

Request body

AccountNumberstring required

Carrier Account Number / The account number given by the carrier.

AccountType'Sandbox' | 'Production' required

Indicates whether the account is set up as a "sandbox" or "production" account. A Sandbox account is for testing and development, while a Production account is used for live shipments and transactions.

AccountNamestring nullable

The official name of the shipping account as designated by the user or organisation, aiding in easy identification and reference of accounts. <br /> <br />Note: By default, this value is set to the customer name if not provided in the request.

AccountAliasstring required

A unique, user-defined name for the shipping account, providing a convenient way to reference the account in a more memorable manner.

ContactNamestring required

The name of the primary contact person for the shipping account, facilitating communication regarding shipping and account-related matters. <br /> <br />Note: If the shipper address is not provided in the Create Shipment request, this information is used as the shipper's contact name, if provided.

ContactNumberstring tel required

The phone number associated with the shipping account's primary contact person, facilitating communication regarding shipping inquiries, account management, and issue resolution. <br /> <br />Note: If the shipper address is not provided in the Create Shipment request, this information is used as the shipper's contact phone number, if provided. Characters like +, /, -, or space are supported.

ApiKeystring required

A unique API Key assigned to a specific DHL Express account. It is essential for authenticating and authorising API requests.

ApiSecretstring required

A unique API Secret assigned to a specific DHL Express account. It is essential for authenticating and authorising API requests.

IsArchiveLabelsboolean

Indicates whether DHL waybill documents are available for download as PDF. <br /> <br />Valid values are the following: <br /><ul><li>True - the way bill documents will be available for download in PDF format</li><li>False - the way bill documents will not be available for download</li></ul>

IsPaperlessTradeEnabledboolean

Indicates whether the documents are submitted electronically. <br /> <br />Valid values are the following: <br /><ul><li>True - the documents can be submitted electronically</li><li>False - the documents cannot be submitted electronically</li></ul>

PaperlessTradeInvoiceOption'DhlGenerated' | 'SapientGenerated'

Specifies the DHL Paperless Trade (PLT) invoice option for electronically transmitting commercial invoice documentation. <br /> <br />Valid values are the following: <br /><ul><li>DhlGenerated: This value allows DHL to create the invoice and send it electronically to the customs agency.</li><li>SapientGenerated: This value generates the invoice from the shipment data in SAPIENT and sends it to DHL.</li></ul><i>Note: This field is only applicable if the IsPaperlessTradeEnabled field is set to true.</i>

Example request

{
  "AccountNumber": "123456789012",
  "AccountName": "AB VideoGames",
  "AccountAlias": "RM-99112347707",
  "ContactName": "John Smith",
  "ContactNumber": "0123456789",
  "ApiKey": "dhlexpress_api_key",
  "ApiSecret": "dhlexpress_api_secret",
  "ShippingLocations": [
    {
      "ShippingLocationId": "D94E8CFD-604B-4B87-83E9-3F20CAF02837",
      "ShippingLocation": {
        "LocationAlias": "Main Warehouse",
        "Address": {
          "AddressId": "John Brown Default",
          "Line1": "Brown Cottage",
          "Line2": "10 Sky Lane",
          "Line3": "Hills End",
          "Town": "Christchurch",
          "Postcode": "TW20 0HJ",
          "County": "Surrey",
          "CountryCode": "GB",
          "What3Words": "brick.space.employ",
          "ContactPhone": "07123887422"
        },
        "Timezone": "Europe/London"
      }
    }
  ]
}

Response

The shipping account was added successfully.

ShippingAccountIdstring uuid

A unique identifier for the shipping account assigned by the system, allowing for efficient reference and management of individual accounts within the system.

ShippingLocationIdstring uuid nullable

A unique identifier assigned to the new shipping location by the system. This ID is used to distinguish between different shipping locations within the system, facilitating, referencing and operations, such as updates, deletions, or specific queries related to that location. <br /> <br />Note: This field is only populated if the details of a new location were provided in the request.