I am trying to create a label for a shipment, but whenever I do there is an issue where the shipment line items show as None, and there are no label line items.
I have the following shipment:
"shipment": {
"data": {
"id": "U2hpcG1lbnQ6NDYxODAwMzc3",
"completed": true,
"warehouse_id": "V2FyZWhvdXNlOjk2ODc5",
"created_date": "2024-06-05T21:14:25",
"address": {
"name": "Jane Doe None",
"address1": "123 Main St",
"address2": "Apt 4",
"city": "San Francisco",
"state": "CA",
"country": "US",
"zip": null
},
"line_items": {
"edges": [
{
"node": {
"line_item_id": "TGluZUl0ZW06MTE4MTQ4NzM4MQ==",
"line_item": {
"sku": "sku12345",
"quantity": 5
}
}
}
]
},
"shipping_labels": []
}
}
},
I perform the following mutation:
mutation {
shipment_create_shipping_label(
data: {
shipment_id: "U2hpcG1lbnQ6NDYxODAwMzc3"
customer_account_id: "QWNjb3VudDo3NDE0OQ=="
address: {
name: "Jane Doe"
address1: "123 Main St"
address2: "Apt 4"
city: "San Francisco"
state: "CA"
zip: "94105"
country: "US"
}
carrier: "test_carrier"
shipping_name: "shipping_name"
shipping_method: "shipping_method"
cost: "1.1"
dimensions: {
length: "1.0"
width: "2.0"
height: "3.0"
weight: "4.0"
}
line_item_ids: "TGluZUl0ZW06MTE4MTQ4NzM4MQ=="
label: {
pdf_location: "pdf_location"
}
tracking_number: "tracking_number"
}
) {
request_id
}
}
After both of these actions, the shipment looks as follows:
"shipment": {
"data": {
"id": "U2hpcG1lbnQ6NDYxODAwMzc3",
"completed": true,
"warehouse_id": "V2FyZWhvdXNlOjk2ODc5",
"created_date": "2024-06-05T21:14:25",
"address": {
"name": "Jane Doe None",
"address1": "123 Main St",
"address2": "Apt 4",
"city": "San Francisco",
"state": "CA",
"country": "US",
"zip": null
},
"line_items": {
"edges": [
{
"node": {
"line_item_id": null,
"line_item": null
}
}
]
},
"shipping_labels": [
{
"box_id": null,
"tracking_number": "tracking_number",
"carrier": "test_carrier",
"cost": "1.10",
"tracking_url": "https://www.google.com/search?q=tracking_number",
"dimensions": {
"weight": "4.0000 oz",
"height": "3.0000 inch",
"width": "2.00 inch",
"length": "1.00 inch"
},
"shipment_line_items": {
"pageInfo": {
"hasNextPage": false
},
"edges": []
}
}
]
}
}
}
Can you please assist with this issue? Is there anything wrong with my mutation query (please note I tried passing line_item_ids as a list also and the same behavior occurred).
Thanks!