Return Labels
With ShipEngine, you can create return labels to include in your shipments to customers or send to them later to facilitate a return.
You have two methods for creating return labels in ShipEngine:
/v1/labels
: Create a label in the usual way but set theis_return_label
property set totrue
./v1/labels/:label_id/return
: Create return label using thelabel_id
of a previously created label.
Requirements
- Make sure the carrier and service you wish to use supports return labels (not all carriers and services can be used for return labels).
- Returns are currently only supported for domestic shipments. You cannot create return labels for international shipments at this time.
- You'll need to specify a value for the
charge_event
property to indicate when you should be charged for the return label.
Depending on which method you use, there will be some additional requirements for the request headers and body schema.
Specify Charge Event
When creating a return label, you will need to specify a charge_event
to indicate when you should be charged for the return label.
Charge Event Type | Description |
---|---|
on_creation | Charge for the label at the time of label creation. This is the default behavior for USPS (Stamps.com) and ShipEngine Carriers. |
on_carrier_acceptance | Charge for the label when it is scanned by the carrier. This is the default behavior for most other carriers. |
carrier_default | Use the carrier's default charge behavior. |
Unused Return Labels
If you create a return label that is charged on creation and it goes unused, you will need to void the label if you wish to get a refund for that label. For other charge event types you are not charged for the label unless it is used, so it won't be necessary to void those labels.
About the On Carrier Acceptance Option
The on_carrier_acceptance
option is useful for overriding the carrier's default behavior if their default is to charge on label creation. You typically must have the carrier enable this on your account before setting this option in your requests. If you send a request with charge_event: on_carrier_acceptance
and the carrier has not enabled this feature on your account, you will receive an error.
- It can take the carrier 3-4 weeks to update your account to use the
on_carrier_acceptance
option, so you should start this process with the carrier as early as possible if you wish to use this feature. - If you wish to use the
on_carrier_acceptance
option with Endicia, you must have Endicia enable the Pay-on-Use-Returns option for your Endicia account.
/v1/labels/ Method
POST /v1/labels/
This method is most commonly used when you wish to create a return label to include with an outgoing shipment. With this method, you'll create a label like you usually would, but since this is a return label the ship_from
address should be your customer's address and the ship_to
address should be your warehouse or return center.
You'll also add the following properties to your request:
Property | Type | Description |
---|---|---|
is_return_label | boolean | Set to true to indicate the label should be created as a return label. |
rma_number | string | An optional "Return Merchandise Authorization" code, which you can use to link the return label to your system. |
outbound_label_id | string | The label_id of the outgoing label that this return label is for. This associates the two labels together, which is required by some carriers. |
charge_event | enumerated string | Determines when you are charged for the label. |
Example Request & Response
Response
/v1/labels/:label_id/return Method
POST /v1/labels/:label_id/return
This method is a convenient way to create a return label without specifying all the same shipment and package information over again. It's typically used when a return request is made after the customer has received their shipment. This method also includes the display_scheme
property, which allows you to create paperless labels with supported carriers and services.
When using this method, the return label uses all the same values as the original label (including the carrier and service) and reverses the ship_from
and ship_to
addresses. It's also important to note that no address validation will occur with this method (since it is assumed the original label already passed address validation).
The following properties are available to add to the request body (but are not required):
Property | Type | Description |
---|---|---|
charge_event | enumerated string | Determines when you are charged for the label. If not specified, the charge event will be carrier_default . |
label_layout | enumerated string | 4x6 or letter . Allows you to set the size the label file will be returned in. If using letter , the label_format must be set to pdf . |
label_format | enumerated string | pdf , png , zpl . The file format that you want the label to be in. pdf is the most widely supported by carriers. |
label_download_type | The file format that you want the label to be in. | url (default if left unspecified) - the response will include a URL to download the label and will be valid for 90 days. inline - the response will include a Base64-encoded label as part of the response. |
display_schema | enumerated string | The display format that the label should be shown in. label (default), paperless , label_and_paperless , qr_code (deprecated), label_and_qr_code (deprecated). |
label_image_id | string | The label image resource that was used to create a custom label image. |
Example Request & Response
Response