Split Ship a Sales Order
Use a Sales Order with Multiple Sales Order Items
123
GET /v-beta/sales_orders/0d3c142a-7516-5f5b-8a40-b437b5e01317 HTTP/1.1Host: api.shipengine.comAPI-Key: __YOUR_API_KEY_HERE__
Create a Shipment for the First Item
1234567891011121314151617181920212223242526272829303132333435363738394041
POST /v-beta/shipments HTTP/1.1Host: api.shipengine.comAPI-Key: __YOUR_API_KEY_HERE__Content-Type: application/json{"shipments": [{"validate_address": "validate_and_clean","carrier_id": "se-123890","service_code": "usps_priority_mail","warehouse_id": "se-241419","ship_to": {"name": "Amanda Miller","phone": "555-555-5555","address_line1": "525 S Winchester Blvd","city_locality": "San Jose","state_province": "CA","postal_code": "95128","country_code": "US","address_residential_indicator": "yes"},"packages": [{"package_code": "package","weight": {"value": 1.0,"unit": "ounce"}}],"items": [{"sales_order_id": "0d3c142a-7516-5f5b-8a40-b437b5e01317","sales_order_item_id": "0399c595-774a-599b-a566-27ea86fec17d","quantity": 1}]}]}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
{"has_errors": false,"shipments": [{"sales_order_ids": [],"items": [{"sales_order_id": "0d3c142a-7516-5f5b-8a40-b437b5e01317","sales_order_item_id": "0399c595-774a-599b-a566-27ea86fec17d","quantity": 1,"name": "","sku": null,"created_at": "2019-07-25T15:24:46.657Z","modified_at": "2019-07-25T15:24:46.657Z"}],"errors": [],"address_validation": {"status": "verified","original_address": {"name": "Amanda Miller","phone": "555-555-5555","address_line1": "525 S Winchester Blvd","city_locality": "San Jose","state_province": "CA","postal_code": "95128","country_code": "US","address_residential_indicator": "yes"},"matched_address": {"name": "AMANDA MILLER","phone": "555-555-5555","address_line1": "525 S WINCHESTER BLVD","city_locality": "SAN JOSE","state_province": "CA","postal_code": "95128","country_code": "US","address_residential_indicator": "yes"},"messages": []},"shipment_id": "se-201053690","carrier_id": "se-123890","service_code": "usps_priority_mail","external_shipment_id": null,"ship_date": "2019-07-25T05:00:00.000Z","created_at": "2019-07-25T15:24:46.657Z","modified_at": "2019-07-25T15:24:46.657Z","shipment_status": "pending","ship_to": {"name": "Amanda Miller","phone": "555-555-5555","address_line1": "525 S Winchester Blvd","city_locality": "San Jose","state_province": "CA","postal_code": "95128","country_code": "US","address_residential_indicator": "yes"},"ship_from": {"company_name": "Example Corp.","name": "John Doe","phone": "111-111-1111","address_line1": "4009 Marathon Blvd","address_line2": "Suite 300","city_locality": "Austin","state_province": "TX","postal_code": "78756","country_code": "US","address_residential_indicator": "no"},"warehouse_id": "se-241419","return_to": {"name": "Example Corp. Returns","phone": "222-222-2222","company_name": "Example Corp.","address_line1": "345 Chambers Street","address_line2": "Suite 100","address_line3": null,"city_locality": "New York City","state_province": "NY","postal_code": "10282","country_code": "US","address_residential_indicator": "unknown"},"confirmation": "none","customs": null,"advanced_options": {"bill_to_account": null,"bill_to_country_code": null,"bill_to_party": null,"bill_to_postal_code": null,"contains_alcohol": false,"delivered_duty_paid": false,"non_machinable": false,"saturday_delivery": false,"freight_class": null,"custom_field1": null,"custom_field2": null,"custom_field3": null},"insurance_provider": "none","tags": [],"packages": [{"package_code": "package","weight": {"value": 1.0,"unit": "ounce"},"dimensions": {"unit": "inch","length": 0.0,"width": 0.0,"height": 0.0},"insured_value": {"currency": "usd","amount": 0.0},"label_messages": {"reference1": null,"reference2": null,"reference3": null}}],"total_weight": {"value": 1.0,"unit": "ounce"}}]}
Create a Shipment for the Second Item
1234567891011121314151617181920212223242526272829303132333435363738394041
POST /v-beta/shipments HTTP/1.1Host: api.shipengine.comAPI-Key: __YOUR_API_KEY_HERE__Content-Type: application/json{"shipments": [{"validate_address": "validate_and_clean","carrier_id": "se-123890","service_code": "usps_priority_mail","ship_to": {"name": "Amanda Miller","phone": "555-555-5555","address_line1": "525 S Winchester Blvd","city_locality": "San Jose","state_province": "CA","postal_code": "95128","country_code": "US","address_residential_indicator": "yes"},"warehouse_id": "se-241419","packages": [{"package_code": "package","weight": {"value": 1.0,"unit": "ounce"}}],"items": [{"sales_order_id": "0d3c142a-7516-5f5b-8a40-b437b5e01317","sales_order_item_id": "4afd6df4-d679-51d7-a858-8aff7d6103c2","quantity": 1}]}]}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
{"has_errors": false,"shipments": [{"sales_order_ids": [],"items": [{"sales_order_id": "0d3c142a-7516-5f5b-8a40-b437b5e01317","sales_order_item_id": "4afd6df4-d679-51d7-a858-8aff7d6103c2","quantity": 1,"name": "","sku": null,"created_at": "2019-07-25T15:24:46.657Z","modified_at": "2019-07-25T15:24:46.657Z"}],"errors": [],"address_validation": {"status": "verified","original_address": {"name": "Amanda Miller","phone": "555-555-5555","address_line1": "525 S Winchester Blvd","city_locality": "San Jose","state_province": "CA","postal_code": "95128","country_code": "US","address_residential_indicator": "yes"},"matched_address": {"name": "AMANDA MILLER","phone": "555-555-5555","address_line1": "525 S WINCHESTER BLVD","city_locality": "SAN JOSE","state_province": "CA","postal_code": "95128","country_code": "US","address_residential_indicator": "yes"},"messages": []},"shipment_id": "se-201055037","carrier_id": "se-123890","service_code": "usps_priority_mail","external_shipment_id": null,"ship_date": "2019-07-25T05:00:00.000Z","created_at": "2019-07-25T15:24:46.657Z","modified_at": "2019-07-25T15:24:46.657Z","shipment_status": "pending","ship_to": {"name": "Amanda Miller","phone": "555-555-5555","address_line1": "525 S Winchester Blvd","city_locality": "San Jose","state_province": "CA","postal_code": "95128","country_code": "US","address_residential_indicator": "yes"},"ship_from": {"company_name": "Example Corp.","name": "John Doe","phone": "111-111-1111","address_line1": "4009 Marathon Blvd","address_line2": "Suite 300","city_locality": "Austin","state_province": "TX","postal_code": "78756","country_code": "US","address_residential_indicator": "no"},"warehouse_id": "se-241419","return_to": {"name": "Example Corp. Returns","phone": "222-222-2222","company_name": "Example Corp.","address_line1": "345 Chambers Street","address_line2": "Suite 100","address_line3": null,"city_locality": "New York City","state_province": "NY","postal_code": "10282","country_code": "US","address_residential_indicator": "unknown"},"confirmation": "none","customs": null,"advanced_options": {"bill_to_account": null,"bill_to_country_code": null,"bill_to_party": null,"bill_to_postal_code": null,"contains_alcohol": false,"delivered_duty_paid": false,"non_machinable": false,"saturday_delivery": false,"freight_class": null,"custom_field1": null,"custom_field2": null,"custom_field3": null},"insurance_provider": "none","tags": [],"packages": [{"package_code": "package","weight": {"value": 1.0,"unit": "ounce"},"dimensions": {"unit": "inch","length": 0.0,"width": 0.0,"height": 0.0},"insured_value": {"currency": "usd","amount": 0.0},"label_messages": {"reference1": null,"reference2": null,"reference3": null}}],"total_weight": {"value": 1.0,"unit": "ounce"}}]}
Create Labels for the Shipments
12345678
POST /v1/labels/shipment/se-201053690 HTTP/1.1Host: api.shipengine.comAPI-Key: __YOUR_API_KEY_HERE__Content-Type: application/json{"label_format":"pdf"}
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
{"label_id": "se-test-201055037","status": "processing","shipment_id": "se-201055037","ship_date": "2019-07-25T05:00:00.000Z","created_at": "2019-07-25T15:24:46.657Z","shipment_cost": {"currency": "usd","amount": 0.0},"insurance_cost": {"currency": "usd","amount": 0.0},"tracking_number": "9999999999999","is_return_label": false,"is_international": false,"batch_id": "","carrier_id": "se-123890","service_code": "usps_priority_mail","package_code": "package","voided": false,"voided_at": null,"label_format": "pdf","label_layout": "4x6","trackable": true,"carrier_code": "stamps_com","tracking_status": "unknown","label_download": {"href": "https://api.shipengine.com/v1/downloads/6/xiceDRUJ4E-C8hOjeMfriQ/testlabel-201055037.pdf"},"form_download": null,"insurance_claim": null,"packages": [{"package_code": "package","weight": {"value": 1.00,"unit": "ounce"},"dimensions": {"unit": "inch","length": 0.0,"width": 0.0,"height": 0.0},"insured_value": {"currency": "usd","amount": 0.00},"tracking_number": null,"label_messages": {"reference1": null,"reference2": null,"reference3": null}}]}