Hello there,
I am relatively new to GraphQL. I would appreciate if anyone could help me out with my question. I am trying to update order data and order line item data using order_update mutation. This API is not supported.
Also, I tried to update order fields along order line items fields from order_update_line_items API. This is also not supported.
Here is the summary:
API | Order data update support | Order lime item data update |
---|---|---|
order_update | Yes | No |
order_update_line_items | No | Yes |
other API??? | Yes | Yes |
I also tested, if any order gets canceled then its order line items are set to cancel status which is nice. But if I set that same order to pending status then its order line items are not set to pending status. I ended up consuming two API calls to handle my order.
It is also not possible to create a new order with the same order number when it is in a canceled state in Shihero.
My query looks like this:
mutation {
order_update(
data: {
order_id: “ABC1234”
fulfillment_status: “pending”
line_items:[
{id: “SOLABC1234” fulfillment_status: “pending”},
{id: “SOLABC1234” fulfillment_status: “pending”},
{id: “SOLABC1234” fulfillment_status: “pending”},
]
}
)
{
request_id
complexity
order {
id
line_items {
edges {
node {
id
sku
partner_line_item_id
}
}
}
}
}
}
Error: API Response:400. Argument “data” has invalid value. In field “line_items”: Unknown field.
Any solution please?