NEW FULFILLMENT FLOW
tote
query and order_fulfill
mutation
We created these two calls as a new process for fulfilling orders through the API that have been picked manually into a tote in the warehouse!
The tote
query will return all the information related to whatever has been picked to it and the related information to those picks. You will get pick details as well as line item details and order details related to those picks.
This query can only be called with the tote_barcode
as the argument. It was devised for scenarios where the packer receives a tote and needs to ship from a separate platform. By scanning the barcode label on the tote, they can pull the details of its contents through an integration between that platform and our API.
query {
tote(barcode: "1234") {
data {
id: "VG90ZToxNDE1NjAzNA=="
legacy_id: 341504915
name: "Tote-14156034"
barcode: "1648643"
warehouse_id: "79733"
orders: [{
#picked orders in tote (SiB will return an array, MiB a single order)
#order fields (connection to existing query
#https://developer.shiphero.com/wp-content/uploads/spectaql/#query-order)
id: "T3JkZXI6MjE3NTQ0MDc4"
legacy id: "217544078"
}]
picks [{ #if more than one pick, this field will be an array
id: "VG90ZXBpY2s6MTY1NDYxNTY=" //(base64 encoding of: "Totepick:ID")
legacy_id: 16546156
sku: "TSHIRT-WHT-XL"
created_at: "ISODateTime"
updated_at: "ISODateTime"
tote_id: "VG90ZToxNDE1NjAzNA=="
current: Boolean
picked_quantity: 2
quantity: 2
inventory_bin: "String"
location {
#location fields (connection to existing query
#https://developer.shiphero.com/wp-content/uploads/spectaql/#query-location)
id: "QmluOjQzMTc4ODU="
legacy_id: 4317885
name: "AA-01-01-01"
type: {name: "Bin"}
pickable: false
sellable: true
}
line_item { #line_item this pick is related to
#line_item fields (connection to existing query
#https://developer.shiphero.com/wp-content/uploads/spectaql/#definition-LineItem)
id: "TGluZUl0ZW06NTgxMjYxMjI2"
legacy_id: 581261226
status: "pending"
sku: TSHIRT-WHT-XL
quantity: 2
quantity_pending_fulfillment: 2
quantity_backordered:0
product{ #information on the SKU in the line item
#product fields (connection to existing query
#https://developer.shiphero.com/wp-content/uploads/spectaql/#definition-Product)
sku: "TSHIRT-WHT-XL"
name: "White T-Shirt XL"
price: "10.00"
barcode: "1564984"
on_hand: 214
dimensions: {
weight: "1 oz",
height: "1 inch",
width: "10 inch",
length: "8 inch"
}
kit_components: [{
sku:"string1", quantity: 1
},{
sku:"string2", quantity: 1
}]
}
}
}]
}
}
}
The data you get from the tote query can then be used to build the order_fulfill
mutation. This mutation will fulfill the order, clear the tote and remove the inventory according to the picks. For this mutation to work:
- The order has to be in the provided tote
- You need to either send all picked line_items or none
- If none are sent, we assume all picked items are packed and shipped in a single package
- URLs for PDFs should not be clean. We require the extension.
- Check build kits and regular kits. The former require you to send the each component as a separate
line_item
as they are broken in sets. The later requires you to send the kit SKU.
No line items sent example (only works for single package):
mutation{
order_fulfill(data:{
order_id:"257403906"
tote_id:"19978839"
notify_customer_via_store:false
notify_customer_via_shiphero:false
shipped_off_shiphero:false
note:"Shipped by Me using the Public API"
packages:[
{
carrier:"Super Carrier"
method:"Super Shipping"
tracking_number:"123456789"
tracking_url:"https://myurl.tracking.com/123456789"
label_url:"https://url.com/289910199/hjp1m7vt.pdf"
cost:"10.00"
address:{
first_name: "Tomas"
last_name: "Two"
address1: "1308 DREXEL AVE"
address2: "APT 208"
city: "Miami Beeach"
state: "FL"
zip: "33139-8126"
country: "US"
email: "mail@shiphero.com"
}
dimensions:{
weight:"128"
height:"3"
width:"4"
length:"5"
}
}
]
}){
complexity
request_id
shipment {
id
legacy_id
}
}
}
Single Package example:
mutation{
order_fulfill(data:{
order_id:"290058676"
tote_id:"19978839"
notify_customer_via_store:false
notify_customer_via_shiphero:false
shipped_off_shiphero:false
note:"Shipped by Me using the Public API"
packages:[
{
carrier:"Super Carrier"
method:"Super Shipping"
tracking_number:"123456789"
tracking_url:"https://myurl.tracking.com/123456789"
label_url:"https://url.com/289910199/hjp1m7vt.pdf"
cost:"10.00"
address:{
first_name: "Tomas"
last_name: "Two"
address1: "1308 DREXEL AVE"
address2: "APT 208"
city: "Miami Beeach"
state: "FL"
zip: "33139-8126"
country: "US"
email: "mail@shiphero.com"
}
dimensions:{
weight:"128"
height:"3"
width:"4"
length:"5"
}
line_items:[
{
sku:"FU165528"
quantity:1
}
]
}
]
}){
complexity
request_id
shipment {
id
legacy_id
}
}
}
Multipackage example:
mutation{
order_fulfill(data:{
order_id:"223790261"
tote_id:"19978831"
notify_customer_via_store:false
notify_customer_via_shiphero:false
shipped_off_shiphero:false
note:"Shipped by Me using the Public API"
packages:[
{
carrier:"Super Carrier"
method:"Super Shipping"
tracking_number:"123456789"
tracking_url:"https://myurl.tracking.com/123456789"
label_url:"https://url.com/289910199/hjp1m7vt.pdf"
cost:"10.00"
address:{
first_name: "Tomas"
last_name: "Two"
address1: "1308 DREXEL AVE"
address2: "APT 208"
city: "Miami Beeach"
state: "FL"
zip: "33139-8126"
country: "US"
email: "mail@shiphero.com"
}
dimensions:{
weight:"128"
height:"3"
width:"4"
length:"5"
}
line_items:[
{
sku:"FUXP3B"
quantity:1
} {
sku:"FUXP3DS"
quantity:1
}
]
}{
carrier:"Mega Carrier"
method:"Mega Shipping"
tracking_number:"123456798"
tracking_url:"https://myurl.tracking.com/123456798"
label_url:"https://url.com/289910199/hjp1m7vt.pdf"
cost:"15.00"
address:{
first_name: "Tomas"
last_name: "Two"
address1: "1308 DREXEL AVE"
address2: "APT 208"
city: "Miami Beeach"
state: "FL"
zip: "33139-8126"
country: "US"
email: "mail@shiphero.com"
}
dimensions:{
weight:"156"
height:"7"
width:"8"
length:"9"
}
line_items:[
{
sku:"FUXT4S"
quantity:1
}
]
}
]
}){
complexity
request_id
shipment {
id
legacy_id
}
}
}