Return Label (DHL eCommerce Americas)
v 4.0.0
Division: DHL eCommerce

Best for:

Return Label

  • Creating a US Domestic return label
  • Retrieving an existing return label
Region: United States
Used for: Shipping
Overview

DHL eCommerce Americas Return Label API allows clients to create a return label for mail item(s) using an optional orderNumber and authorizationNumber.

Scope

The following operations are allowed in the Return Label API:

   
OperationTypePath
Create Return Label (PNG, ZPL, PDF or QR)POST/returns/v4/label
Get Return LabelGET/returns/v4/label/pickup
Important

Each Return Label API request is used to create a single return shipping label.

For every successful label that is created, the response will contain three tracking IDs:

  • authorizationNumber: Return item authorization number (RMA #)
  • dhlPackageId: DHL-generated package ID
  • trackingId: USPS IMpb number

Output Formats

The following return label formats are available:

  • PNG
  • ZPL
  • PDF
  • QR (see the *Printerless Returns* section below)

Workflow

Customers can use this API to:

  • Create a return shipping label for a single package using a POST request. You can generate the labels in PNG, ZPL or PDF formats. The API returns the label contents directly in the response in the requested format. When labelData is ZPL, it is provided with an encodeType of PLAIN. When labelData is PNG or PDF, it is provided with an encodeType of BASE64.
  • Acquire an existing return shipping label using the three tracking IDs using a GET request.

Sample Return Label

Printerless Returns

For your customers who do not have access to a printer or shipping labels, you have the option to provide a printerless return experience via the USPS Label Broker. When creating a return label, the format will be QR and the response will provide an image that contains the USPS Label ID and QR code. You must then send an email to your customer that contains the USPS Label ID and QR code image, see example image below:

null

This email should also include the following instructions:

Response Description

Create Return Label

Body raw

{
"pickup": "5351244",
"orderedProductId": "RGN",
"merchantId": "test",
"shipperAddress": {
"name": "John Doe",
"companyName": "Doe Inc.",
"address1": "5923 Peachtree Industrial Blvd",
"address2": "Suite 100",
"address3": "Bldg 3",
"city": "Norcross",
"state": "GA",
"country": "US",
"postalCode": "30092",
"email": "2@y.com",
"phone": "44423440348"
},
"returnAddress": {
"name": "Dave Bloggs",
"address1": "5923 Peachtree Industrial Blvd",
"city": "Norcross",
"state": "GA",
"country": "US",
"postalCode": "30092"
},
"packageDetail": {
"orderNumber": "1234555",
"authorizationNumber": "1234567",
"returnReason": "defected product",
"weight": {
"value": 5,
"unitOfMeasure": "LB"
}
}
}