I’m having an issue creating a shipment.
I’m getting the following errors:
{
"errors": [
{
"message": "Field 'CreateShipmentInput.line_items' of required type '[CreateShipmentLineItemInput]!' was not provided.",
"locations": [
{
"line": 35,
"column": 11
}
]
},
{
"message": "Field 'line_items' is not defined by type 'CreateShipmentShippingLabelInput'. Did you mean 'line_item_ids'?",
"locations": [
{
"line": 70,
"column": 9
}
]
}
]
}
And I have no idea what line_item_ids it’s because it doesn’t appear in the schema documentation CreateShipmentInput | ShipHero GraphQL API
And then I’m getting erros for putting line_items which is the one in the schema, so I have no idea what to add.
This is my payload
mutation Shipment_create(
$customer_account_id: String
$order_id: String!
$warehouse_id: String!
$name: String
$address1: String
$address2: String
$city: String
$state: String
$country: String
$zip: String
$carrier: String!
$shipping_name: String!
$shipping_method: String!
$cost: String!
$address_name: String
$address_address1: String
$address_address2: String
$address_city: String
$address_state: String
$address_country: String
$address_zip: String
$weight: String
$height: String
$width: String
$length: String
$pdf_location: String
# $line_item_ids: [String]!
$tracking_number: String
$tracking_url: String
$notify_customer_via_shiphero: Boolean
$notify_customer_via_store: Boolean
) {
shipment_create(
data: {
customer_account_id: $customer_account_id
order_id: $order_id
warehouse_id: $warehouse_id
address: {
name: $name
address1: $address1
address2: $address2
city: $city
state: $state
country: $country
zip: $zip
}
labels: {
carrier: $carrier
shipping_name: $shipping_name
shipping_method: $shipping_method
cost: $cost
address: {
name: $address_name
address1: $address_address1
address2: $address_address2
city: $address_city
state: $address_state
country: $address_country
zip: $address_zip
}
dimensions: {
weight: $weight
height: $height
width: $width
length: $length
}
label: { pdf_location: $pdf_location }
line_item_ids: ["UHJvZHVjdEluZm86MzM1MzMwNDYz"]
line_items: [{ line_item_id: "UHJvZHVjdEluZm86MzM1MzMwNDYz", quantity: 3}]
tracking_number: $tracking_number
tracking_url: $tracking_url
}
notify_customer_via_shiphero: $notify_customer_via_shiphero
notify_customer_via_store: $notify_customer_via_store
}
) {
request_id
complexity
shipment {
id
order_id
}
}
}