v1
latestOpenAPI 3.0.02026-07-1397337495.2 KBlabels
Purchase Label from Rate Shopper
Purchase and print a shipping label using the Rate Shopper. The Rate Shopper automatically selects the optimal carrier and service from your wallet carriers based on your specified rate selection strategy (cheapest, fastest, or best_value). For more information about this in the rates documentation.
post/v1/labels/rate_shopper_id/{rate_shopper_id}
Path parameters
rate_shopper_id'best_value' | 'cheapest' | 'fastest' required
Optional attributes that indicate the most profitable rates
The rate selection strategy for the Rate Shopper. This determines which carrier and service will be automatically selected from your wallet carriers based on the rates returned for the shipment.
Request body
Example request
{
"shipment": {
"shipment_id": "se-28529731",
"items": [
{
"asin": "B00005N5PF"
}
],
"ship_date": "2018-09-23T00:00:00.000Z",
"created_at": "2018-09-23T15:00:00.000Z",
"modified_at": "2018-09-23T15:00:00.000Z",
"ship_to": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA",
"geolocation": [
{
"type": "what3words",
"value": "cats.with.thumbs"
}
]
},
"ship_from": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA"
},
"warehouse_id": "se-28529731",
"return_to": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA"
},
"customs": {
"importer_of_record": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA"
},
"customs_items": [
{
"customs_item_id": "se-28529731",
"country_of_origin": "CA"
}
]
},
"advanced_options": {
"bill_to_country_code": "CA",
"invoice_number": "IOC56888"
},
"tags": [
{
"tag_id": 8712,
"name": "Fragile",
"color": "#FF0000"
}
],
"packages": [
{
"shipment_package_id": "se-28529731",
"package_id": "se-28529731",
"package_code": "small_flat_rate_box",
"tracking_number": "1Z932R800392060079",
"content_description": "Hand knitted wool socks",
"products": [
{
"country_of_origin": "CA",
"vat_rate": 0.2
}
]
}
],
"comparison_rate_type": "retail",
"zone": 6
},
"outbound_label_id": "se-28529731",
"label_image_id": "img_DtBXupDBxREpHnwEXhTfgK"
}Response
Label created successfully using Rate Shopper. The response includes the selected carrier_id, service_code, and rate_shopper_id that was used.
Example response
{
"label_id": "se-28529731",
"shipment_id": "se-28529731",
"shipment": {
"shipment_id": "se-28529731",
"carrier_id": "se-28529731",
"service_code": "usps_first_class_mail",
"shipping_rule_id": "se-28529731",
"items": [
{
"asin": "B00005N5PF"
}
],
"ship_date": "2018-09-23T00:00:00.000Z",
"created_at": "2018-09-23T15:00:00.000Z",
"modified_at": "2018-09-23T15:00:00.000Z",
"ship_to": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA",
"geolocation": [
{
"type": "what3words",
"value": "cats.with.thumbs"
}
]
},
"ship_from": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA"
},
"warehouse_id": "se-28529731",
"return_to": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA"
},
"customs": {
"importer_of_record": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA"
},
"customs_items": [
{
"customs_item_id": "se-28529731",
"country_of_origin": "CA"
}
]
},
"advanced_options": {
"bill_to_country_code": "CA",
"invoice_number": "IOC56888"
},
"tags": [
{
"tag_id": 8712,
"name": "Fragile",
"color": "#FF0000"
}
],
"packages": [
{
"shipment_package_id": "se-28529731",
"package_id": "se-28529731",
"package_code": "small_flat_rate_box",
"tracking_number": "1Z932R800392060079",
"content_description": "Hand knitted wool socks",
"products": [
{
"country_of_origin": "CA",
"vat_rate": 0.2
}
]
}
],
"comparison_rate_type": "retail",
"zone": 6
},
"ship_date": "2018-09-23T00:00:00.000Z",
"created_at": "2018-09-23T15:00:00.000Z",
"tracking_number": "782758401696",
"batch_id": "se-28529731",
"carrier_id": "se-28529731",
"outbound_label_id": "se-28529731",
"service_code": "usps_first_class_mail",
"package_code": "small_flat_rate_box",
"voided_at": "2018-09-23T15:00:00.000Z",
"label_image_id": "img_DtBXupDBxREpHnwEXhTfgK",
"carrier_code": "dhl_express",
"label_download": {
"href": "http://api.shipengine.com/v1/labels/se-28529731",
"pdf": "http://api.shipengine.com/v1/labels/se-28529731",
"png": "http://api.shipengine.com/v1/labels/se-28529731",
"zpl": "http://api.shipengine.com/v1/labels/se-28529731"
},
"form_download": {
"href": "http://api.shipengine.com/v1/labels/se-28529731"
},
"qr_code_download": {
"href": "http://api.shipengine.com/v1/labels/se-28529731"
},
"paperless_download": {
"href": "http://api.shipengine.com/v1/labels/se-28529731"
},
"insurance_claim": {
"href": "http://api.shipengine.com/v1/labels/se-28529731"
},
"packages": [
{
"package_code": "small_flat_rate_box",
"tracking_number": "1Z932R800392060079",
"label_download": {
"href": "http://api.shipengine.com/v1/labels/se-28529731",
"pdf": "http://api.shipengine.com/v1/labels/se-28529731",
"png": "http://api.shipengine.com/v1/labels/se-28529731",
"zpl": "http://api.shipengine.com/v1/labels/se-28529731"
},
"form_download": {
"href": "http://api.shipengine.com/v1/labels/se-28529731"
},
"qr_code_download": {
"href": "http://api.shipengine.com/v1/labels/se-28529731"
},
"paperless_download": {
"href": "http://api.shipengine.com/v1/labels/se-28529731"
},
"content_description": "Hand knitted wool socks",
"alternative_identifiers": [
{
"type": "last_mile_tracking_number",
"value": "12345678912345678912"
}
]
}
],
"alternative_identifiers": [
{
"type": "last_mile_tracking_number",
"value": "12345678912345678912"
}
],
"tracking_url": "https://www.fedex.com/fedextrack/?action=track&trackingnumber=1234",
"ship_to": {
"name": "John Doe",
"phone": "+1 204-253-9411 ext. 123",
"email": "example@example.com",
"company_name": "The Home Depot",
"address_line1": "1999 Bishop Grandin Blvd.",
"address_line2": "Unit 408",
"address_line3": "Building #7",
"city_locality": "Winnipeg",
"state_province": "Manitoba",
"postal_code": "78756-3717",
"country_code": "CA",
"geolocation": [
{
"type": "what3words",
"value": "cats.with.thumbs"
}
]
},
"refund_details": {
"request_date": "2018-09-23T15:00:00.000Z"
}
}