latestOpenAPI 3.0.0Proprietary2026-08-22131410675.6 KB

8d8a7cf79204

mailing

Create mailing labels

Create one or more mailing labels on a sheet layout. Use mailing_options to control which row and column to start printing from.

post/v1/mailing/mail_labels

Request body

label_layout'mail_label_sdc3110' | 'mail_label_avery5160' | 'mail_label_avery5163' required

The mail label layout to use.

label_format'pdf' | 'png'

The file format for the label.

display_scheme'label' | 'paperless' | 'label_and_paperless'

The display format that the label should be shown in.

test_labelboolean

Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account.

label_download_type'url' | 'inline'

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
is_return_labelboolean

Indicates whether these are return labels.

rma_numberstring nullable

An optional Return Merchandise Authorization number for return labels.

charge_event'carrier_default' | 'on_creation' | 'on_carrier_acceptance'

Determines when the user's account will be charged for the label.

outbound_label_idstring

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

validate_address'no_validation' | 'validate_only' | 'validate_and_clean'

The possible validate address values

label_image_idstring

Used to identify an image resource.

ship_to_service_point_idstring nullable

A unique identifier for a carrier service point where the shipment will be delivered.

ship_from_service_point_idstring nullable

A unique identifier for a carrier drop off point where a merchant plans to deliver packages.

Response

The labels were created successfully.

label_idstring

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

status'processing' | 'completed' | 'error' | 'voided'

The possible statuses that a shipping label can be in.

StatusDescription
processingWhen labels are created in a batch, it may take a few minutes for all of the labels in the batch to be created. During this period, they will be in processing status.
completedThe label was successfully created
errorThe label could not be created due to an error, such as an invalid delivery address
voidedThe label has been voided
shipment_idstring

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

external_shipment_idstring nullable

A unique user-defined key to identify a shipment. This can be used to retrieve the shipment.

external_order_idstring nullable

ID that the Order Source assigned

ship_datestring date-time

An ISO 8601 string that represents a date, but not a specific time. The value may contain a time component, but it will be set to 00:00:00 UTC by ShipEngine.

created_atstring date-time

An ISO 8601 string that represents a date and time.

tracking_numberstring

The tracking number for the package. Tracking number formats vary across carriers.

is_return_labelboolean

Indicates whether this is a return label. You may also want to set the rma_number so you know what is being returned.

rma_numberstring nullable

An optional Return Merchandise Authorization number. This field is useful for return labels. You can set it to any string value.

is_internationalboolean

Indicates whether this is an international shipment. That is, the originating country and destination country are different.

batch_idstring

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

carrier_idstring

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

charge_event'carrier_default' | 'on_creation' | 'on_carrier_acceptance'

Determines when the user's account will be charged for the label.

outbound_label_idstring

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

service_codestring

A carrier service, such as fedex_ground, usps_first_class_mail, flat_rate_envelope, etc.

test_labelboolean

Indicate if this label is being used only for testing purposes. If true, then no charge will be added to your account.

package_codestring

A package type, such as thick_envelope, small_flat_rate_box, large_package, etc. Use the code package for custom or unknown package types.

validate_address'no_validation' | 'validate_only' | 'validate_and_clean'

The possible validate address values

voidedboolean

Indicates whether the label has been voided

voided_atstring date-time

An ISO 8601 string that represents a date and time.

label_download_type'url' | 'inline'

There are two different ways to download a label:

Label Download TypeDescription
urlYou will receive a URL, which you can use to download the label in a separate request. The URL will remain valid for 90 days.
inlineYou will receive the Base64-encoded label as part of the response. No need for a second request to download the label.
label_format'pdf' | 'png' | 'zpl'

The possible file formats in which shipping labels can be downloaded. We recommend pdf format because it is supported by all carriers, whereas some carriers do not support the png or zpl formats.

Label FormatSupported Carriers
pdfAll carriers
pngfedex <br> stamps_com <br> ups <br> usps
zplaccess_worldwide <br> apc <br> asendia <br> dhl_global_mail <br> dhl_express <br> dhl_express_australia <br> dhl_express_canada <br> dhl_express_worldwide <br> dhl_express_uk <br> dpd <br> endicia <br> fedex <br> fedex_uk <br> firstmile <br> imex <br> newgistics <br> ontrac <br> rr_donnelley <br> stamps_com <br> ups <br> usps
display_scheme'label' | 'paperless' | 'label_and_paperless'

The display format that the label should be shown in.

label_layout'4x6' | 'letter' | 'A4' | 'A6'

The available layouts (sizes) in which shipping labels can be downloaded. The label format determines which sizes are supported. 4x6 is supported for all label formats, whereas letter (8.5" x 11") is only supported for pdf format.

trackableboolean

Indicates whether the shipment is trackable, in which case the tracking_status field will reflect the current status and each package will have a tracking_number.

label_image_idstring

Used to identify an image resource.

carrier_codestring

A shipping carrier, such as fedex, dhl_express, stamps_com, etc.

tracking_status'unknown' | 'in_transit' | 'error' | 'delivered'

The different statuses that can apply to a shipment.

confirmation'none' | 'delivery' | 'signature' | 'adult_signature' | 'adult_signature_restricted_delivery' | 'direct_signature' | 'delivery_mailed' | 'verbal_confirmation' | 'delivery_code' | 'age_verification_16_plus'

The possible delivery confirmation values

tracking_urlstring nullable

The URL to track the package. This URL is provided by the carrier and is unique to the tracking number.

void_type'refund_assist' | 'manual' nullable

Indicates how the label was voided. This field is null if the label has not been voided.