Skip to main content

Shipment Creation

Shipment Creation and Update involves a lot of fields. We suggest you utilize the upsert_shipments_full call to make the process easier.

The upsert_shipments_full call can:

  • Reduce API calls needed to create Shipments from ~15 to 1
  • Link to existing objects with external IDs (i.e. Shopify ID, SAP ID, Warehouse Code)
  • Link to existing objects with a name (i.e Location Name)
  • Inventory Items are linked by SKU for Shipment Items and Packages

Upserts can produce surprising results if you are not careful. Please read the Upsert Documentation to understand how upserts work.

Example call:

POST https://api.channelape.io/rest/v1/rpc/upsert_shipments_full  HTTP/1.1
Content-Type: application/json
apikey: ANON_KEY
Authorization: Bearer YOUR_KEY

{
"shipment": {
"business_id": "8bfab1b7-59b0-43ff-a66d-7842f73ad1b3",
"shipment_number": "SWO2-CASTO-2-1",
"status": "unshipped",
"bill_of_lading": "9400100000000000000002",
"order_number": "SWO2-CASTO-2",
"external_ids": null,
"additional_fields": null,
"carrier": "USPS",
"service": "Priority Mail",
"scac": "USPSP",
"tracking_number": "9400100000000000000002",
"tracking_urls": null,
"ship_by_time": "2023-05-20T12:35:01.797Z",
"deliver_by_time": null,
"cancel_by_time": null,
"shipped_time": null,
"received_time": null,
"estimated_arrival_time": null,
"cancelled_time": null,
"billing_address": {
"external_ids": null,
"name": "Warehouse Onboarding Brand Corp. Headquarters",
"address_1": "224 Wyoming Avenue",
"address_2": "Suite 100",
"address_3": "Attention: Billing Department",
"city": "Scranton",
"province": "Pennsylvania",
"province_code": "PA",
"country": "United States",
"country_code": "US",
"postal_code": "18503",
"contact_name": "John Jones",
"contact_phone": "570-555-4322",
"contact_email": "jj3223@example.com"
},
"from_location": {
"name": "Capacity NJ (GA)",
"shipping_address": {
"external_ids": null,
"name": "Capacity CA (GA)",
"address_1": "1112 Corporate Rd",
"address_2": null,
"address_3": null,
"city": "North Brunswick Township",
"province": "New Jersey",
"province_code": "NJ",
"country": "United States",
"country_code": "US",
"postal_code": "08902",
"contact_name": "Shipping Dept",
"contact_phone": "732-555-7770",
"contact_email": "caga332@example.com"
},
"billing_address": {
"external_ids": null,
"name": "Warehouse Onboarding Brand Corp. Headquarters",
"address_1": "224 Wyoming Avenue",
"address_2": "Suite 100",
"address_3": "Attention: Billing Department",
"city": "Scranton",
"province": "Pennsylvania",
"province_code": "PA",
"country": "United States",
"country_code": "US",
"postal_code": "18503",
"contact_name": "John Jones",
"contact_phone": "570-555-4322",
"contact_email": "jj3223@example.com"
}
},
"to_location": {
"name": "Capacity CA (GI)",
"shipping_address": {
"external_ids": null,
"name": "Capacity CA (GI)",
"address_1": "16180 Ornelas St, Irwindale, CA 91706",
"address_2": "Rear",
"address_3": null,
"city": "Irwindale",
"province": "California",
"province_code": "CA",
"country": "United States",
"country_code": "US",
"postal_code": "78701",
"contact_name": "Shipping Dept",
"contact_phone": "512-555-5555",
"contact_email": "asdf@example.com"
},
"billing_address": {
"external_ids": null,
"name": "Warehouse Onboarding Brand Corp. Headquarters",
"address_1": "224 Wyoming Avenue",
"address_2": "Suite 100",
"address_3": "Attention: Billing Department",
"city": "Scranton",
"province": "Pennsylvania",
"province_code": "PA",
"country": "United States",
"country_code": "US",
"postal_code": "18503",
"contact_name": "John Jones",
"contact_phone": "570-555-4322",
"contact_email": "jj3223@example.com"
}
},
"packages": [
{
"additional_fields": null,
"external_ids": null,
"carton_id": "SWO2-CASTO-2-1-P1",
"ssc": null,
"dimension": null,
"pallet_number": null,
"license_plate": "308899832",
"currency_code": "USD",
"pack_size": 1000,
"inner_packs": 1,
"fulfillment_cost": null,
"shipping_cost": null,
"items": [
{
"sku": "CARSBLKM-10",
"additional_fields": null,
"external_ids": null,
"line_number": "1",
"quantity": 10,
"name": null,
"upc": null,
"lot_number": null,
"hs_code": null,
"hts_code": null,
"country_of_origin": null,
"serial_number": null,
"currency_code": null,
"unit_price": "19.99",
"discounted_price": null
}
]
},
{
"additional_fields": null,
"external_ids": null,
"carton_id": "SWO2-CASTO-2-1-P2",
"ssc": null,
"dimension": null,
"pallet_number": null,
"license_plate": "308899832",
"currency_code": "USD",
"pack_size": 1000,
"inner_packs": 1,
"fulfillment_cost": null,
"shipping_cost": null,
"items": [
{
"sku": "CARSBLKM-09",
"additional_fields": null,
"external_ids": null,
"line_number": "2",
"quantity": 2,
"name": null,
"upc": null,
"lot_number": null,
"hs_code": null,
"hts_code": null,
"country_of_origin": null,
"serial_number": null,
"currency_code": null,
"unit_price": "40.00",
"discounted_price": null
}
]
},
{
"additional_fields": null,
"external_ids": null,
"carton_id": "SWO2-CASTO-2-1-P3",
"ssc": null,
"dimension": null,
"pallet_number": null,
"license_plate": "308899832",
"currency_code": "USD",
"pack_size": 1000,
"inner_packs": 1,
"fulfillment_cost": null,
"shipping_cost": null,
"items": [
{
"sku": "CARSBLKM-08",
"additional_fields": null,
"external_ids": null,
"line_number": "3",
"quantity": 1,
"name": null,
"upc": null,
"lot_number": null,
"hs_code": null,
"hts_code": null,
"country_of_origin": null,
"serial_number": null,
"currency_code": null,
"unit_price": "120.50",
"discounted_price": null
}
]
}
],
"items": [
{
"sku": "CARSBLKM-10",
"additional_fields": null,
"external_ids": null,
"line_number": "1",
"quantity": 10000,
"name": null,
"upc": null,
"lot_number": null,
"hs_code": null,
"hts_code": null,
"country_of_origin": null,
"serial_number": null,
"currency_code": null,
"unit_price": "19.99",
"discounted_price": null
},
{
"sku": "CARSBLKM-09",
"additional_fields": null,
"external_ids": null,
"line_number": "2",
"quantity": 2000,
"name": null,
"upc": null,
"lot_number": null,
"hs_code": null,
"hts_code": null,
"country_of_origin": null,
"serial_number": null,
"currency_code": null,
"unit_price": "40.00",
"discounted_price": null
},
{
"sku": "CARSBLKM-08",
"additional_fields": null,
"external_ids": null,
"line_number": "3",
"quantity": 1000,
"name": null,
"upc": null,
"lot_number": null,
"hs_code": null,
"hts_code": null,
"country_of_origin": null,
"serial_number": null,
"currency_code": null,
"unit_price": "120.50",
"discounted_price": null
}
]
}
}