Hello!
I hope you’re doing well.
I saw a similar post around 2020, but it kind of ended relating to other issues that are not related to what we’re looking for.
We’ve been testing fulfilling orders via API following the steps detailed in this document.
We’ve successfully created a Shipment, removed the inventory and marked the order as fulfilled.
Our issue is that we haven’t been able to relate this fulfillment to the quantity_shipped value of a SKU in Shiphero.
Is there any parameter that we may be missing for it to relate to this field?
The order_id that we used to test this is 325190201
Our mutations were:
- Create shipment
mutation {
shipment_create(
data: {
customer_account_id: "XXXXX"
order_id: "325190201"
warehouse_id: "XXXXX"
address: {
name: "Cristobal Mora"
address1: "Avenida XASDRQWR 123"
address2: "1801"
city: "ZZZZZZZ"
state: "RM"
country: "CL"
phone: "123456712"
}
line_items: [
{line_item_id: "TGluZUl0ZW06ODI5NDI3MTE0", quantity: 1},
{line_item_id: "TGluZUl0ZW06ODI5NDI3MTM4", quantity: 1}
]
labels: {
carrier: "api"
shipping_name: "Test name"
shipping_method: "Test"
cost: "4500"
address: {
name: "Cristobal Mora"
address1: "Avenida XASDRQWR 123"
address2: "1801"
city: "ZZZZZZZ"
state: "RM"
country: "CL"
phone: "123456712"
}
dimensions: {
weight: "2"
height: "1"
length: "1"
width: "1"
}
label: {
pdf_location: "https://test-cris.nohaynada.com/"
}
line_item_ids: [
"TGluZUl0ZW06ODI5NDI3MTE0",
"TGluZUl0ZW06ODI5NDI3MTM4"
]
tracking_number: "test-cris3123890123"
}
shipped_off_shiphero: false
notify_customer_via_shiphero: true
notify_customer_via_store: true
}
) {
request_id
complexity
shipment {
id
legacy_id
order_id
user_id
}
}
}
- Remove inventory
mutation {
inventory_remove(
data: {
customer_account_id: "XXXXX",
sku: "YYYYY",
warehouse_id: "XXXXX",
quantity: 1,
reason: "Order <a href=\"/dashboard/orders/details/325190201\">#1590</a> shipped"
}
) {
request_id
complexity
warehouse_product {
id
legacy_id
account_id
sku
warehouse_id
warehouse_identifier
on_hand
}
}
}
- Update fulfillment status
mutation {
order_update_fulfillment_status(
data: {
customer_account_id: "XXXXX",
order_id: "325190201",
fulfillment_status: "fulfilled",
reason: "This order was shipped using Shiphero Public API"
}
) {
request_id
complexity
order {
id
legacy_id
order_number
}
}
}
Is there any parameter that we may be missing for the shipping_quantity value to relate with the shipment? Or is it simply not possible to achieve this?
Thanks,
Cristóbal