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:
| Operation | Type | Path |
| Create Return Label (PNG, ZPL, PDF or QR) | POST | /returns/v4/label |
| Get Return Label | GET | /returns/v4/label/pickup |
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 IDtrackingId: USPS IMpb number
Output Formats
The following return label formats are available:
PNGZPLPDFQR(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
labelDataisZPL, it is provided with anencodeTypeofPLAIN. WhenlabelDataisPNGorPDF, it is provided with anencodeTypeofBASE64. - 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 beQR 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:

This email should also include the following instructions:
- The customer must bring the QR code image from the email and the ready-to-ship package to a participating Post Office location. Participating locations can be found at https://tools.usps.com/find-location.htm?locationType=po&serviceType=lbroretail&address=18702, where the value of the address parameter is customer’s ZIP code (such as
18702in this example). - The USPS retail associate at the counter will then scan the QR code, print the shipping label, and provide the customer with a receipt.
- If the customer has a printer at home, they can instead print the label directly from https://tools.usps.com/label-broker.htm?LabelID=XYZZYPJK&zip=18702, where
XYZZYPJKrepresents the customer’s Label ID and18702represents the customer’s return address ZIP code.
M- Mandatory O- Optional C- Conditional N- Not Applicable
| Node | Data Type | Required for Domestic | Length | Description | Example Values |
| pickup | string | M | 4:10 | DHL eCommerce pickup account number. This is not the same as the Sold To Account number. | 5320037 |
| orderedProductId | string | M | 3 | DHL eCommerce three-character product code. See Reference for list of valid Product IDs. Refer here for more information. | RGN |
| merchantId | string | O | 0:30 | Merchant account Id. Used for indicating the merchant for the sales order. | ABC123 |
| shipperAddress | object | M | Address of the shipper. | ||
| name | string | C | 0:50 | Name of shipper. | John Doe |
| companyName | string | C | 0:30 | Company name of shipper. Either name or company name is required. | Acme Shoe Co. |
| address1 | string | M | 1:50 | Address Line 1 of shipper. | 5923 Peachtree Industrial Blvd |
| address2 | string | O | 0:50 | Address Line 2 of shipper. | Peachtree Parkway |
| address3 | string | O | 0:50 | Address Line 3 of shipper. | Peachtree City |
| city | string | M | 1:40 | City of shipper. | Norcross |
| state | string | M | 0:50 | State of shipper. | GA |
| country | string | M | 2 | Country of shipper. Must be a valid 2-character ISO country code. | US |
| postalCode | string | M | 3:10 | Postal Code of shipper. Only 5-digit (NNNNN) or extended 9-digit (NNNNN-NNNN) formats are allowed. | 30092 |
| string | O | 0:50 | Email of shipper. | john.doe@ email.com | |
| phone | string | O | 0:26 | Phone of shipper. | 678-896-4921 |
| returnAddress | object | M | Address where package is being returned to. | ||
| name | string | C | 0:50 | Name of return address. | John Doe |
| companyName | string | C | 0:30 | Company name of return address. Either name or company name is required. | Acme Shoe Co. |
| address1 | string | M | 1:50 | Address Line 1 of return. | 5923 Peachtree Industrial Blvd |
| address2 | string | O | 0:50 | Address Line 2 of return. | Peachtree Parkway |
| address3 | string | O | 0:50 | Address Line 3 of return. | Peachtree City |
| city | string | M | 1:40 | City of return. | Norcross |
| state | string | M | 0:50 | State of return. | GA |
| country | string | M | 2 | Country of return. Must be a valid 2-character ISO country code. | US |
| postalCode | string | M | 3:10 | Postal code of return. Only 5-digit (NNNNN) or extended 9-digit (NNNNN-NNNN) formats are allowed. | 30092 |
| string | O | 0:50 | Email of return. | john.doe@ email.com | |
| phone | string | O | 0:26 | Phone of return. | 678-896-4921 |
| packageDetail | object | M | Object that contains the package detail. | ||
| orderNumber | string | O | 0:50 | Order number of the item being returned. | 1234567 |
| authorizationNumber | string | O | 0:35 | Return items authorization number (RMA #) , also known as the CCN (customer confirmation number). | A123456789BC |
| returnReason | string | O | 0:50 | Reason for returning the item. | "Wrong size received" |
| weight | object | M | Object that contains the package weight details. Mainly used for validating and identifying the right shipping product. | ||
| value | float | M | 0:999999.99 | Total package weight. | 5 |
| unitOfMeasure | string enum | M | LB, OZ, KG, G | Unit of measure for weight. | OZ |
M- Mandatory O- Optional C- Conditional N- Not Applicable
| Node | Data type | Required | Length | Description | Example Values |
| timestamp | string | M | 1:50 | Date and time of the label request; ISO-8601 date/time format. | 2021-02-10T19:38:36.411Z |
| pickup | string | M | 4:10 | DHL eCommerce pickup account number. You will receive this after doing the onboarding with DHL eCommerce Sales team. | 5320037 |
| orderedProductId | string | M | 3 | DHL eCommerce three-character product code that was requested. | RGN |
| labels | array | M | Array that contains the package label details. | ||
| createdOn | string | M | 1:50 | The date and time of the label; ISO-8601 date/time format. | 2021-11-06T21:05:26+0000 |
| authorizationNumber | string | M | 0:35 | Return items authorization number (RMA #) , also known as the CCN (customer confirmation number). | A123456789BC |
| dhlPackageId | string | M | 1:30 | DHL-generated package ID. | 3387191106122423 |
| trackingId | string | M | 1:30 | Last-mile carrier package ID. This ID contains the full USPS IMpb number and is always available. If the package is overlabeled for any reason, this field contains the latest carrier package ID. | 420300929361269903500011492028 |
| uspsLabelId | string | O | 0:10 | USPS QR Code label ID. Only available when format QR was requested. Not available for other output formats. | ABCDEFGH8 |
| labelData | string | M | 0:100000 | This will be a string containing the encoded shipping label image or a plain text zpl string depending on the format requested. | |
| encodeType | string enum | M | BASE64, PLAIN | Type of encoding for the label data. | PLAIN |
| format | string | M | ZPL, PNG, PDF, QR | Format of the label data. | ZPL |
| link | string | M | 1:150 | Link to the label that can be used to retrieve the label later. | https://api.dhlecs.com/returns/v4/label/5320037?dhlPackageId=3387191106122423 |
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"
}
}
}