A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi
I have been struggling with marking a order as ready for pickup using the 2023-01 API of Graphql.
Here is the request that i sending using "Insomnia"
mutation fulfillmentOrderLineItemsPreparedForPickup($input: FulfillmentOrderLineItemsPreparedForPickupInput!) { fulfillmentOrderLineItemsPreparedForPickup(input: $input) { userErrors { field message } } }
The Variables
{ "input": { "lineItemsByFulfillmentOrder": [ { "fulfillmentOrderId": "gid://shopify/LineItem/6181984370990" } ] } }
This is the response i am getting.
{ "data": { "fulfillmentOrderLineItemsPreparedForPickup": null }, "errors": [ { "message": "invalid id", "locations": [ { "line": 2, "column": 3 } ], "path": [ "fulfillmentOrderLineItemsPreparedForPickup" ] } ], "extensions": { "cost": { "requestedQueryCost": 10, "actualQueryCost": 1, "throttleStatus": { "maximumAvailable": 1000.0, "currentlyAvailable": 999, "restoreRate": 50.0 } } } }
i use this rest API "2023-01/orders/5242763936046/fulfillment_orders.json" to get the fulfillmentOrderId.
I can't seem to find the issue as where i am going wrong and as the error points out its a invalid ID.
Where do i find the right ID in for this case?
Here is screen shot of the test order.
Solved! Go to the solution
This is an accepted solution.
Hey @Etienne_Steyn - have you tried formatting the variables like this (for example):
{
"input": {
"lineItemsByFulfillmentOrder": [
{
"fulfillmentOrderId": "gid://shopify/FulfillmentOrder/1046000776"
}
]
}
}
In your example it looks like you formatted the fulfillmentOrderId value as gid://shopify/LineItem/6181984370990 when it should look like gid://shopify/FulfillmentOrder/[id] based on the example in our dev docs here. Hope this helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hey @Etienne_Steyn - have you tried formatting the variables like this (for example):
{
"input": {
"lineItemsByFulfillmentOrder": [
{
"fulfillmentOrderId": "gid://shopify/FulfillmentOrder/1046000776"
}
]
}
}
In your example it looks like you formatted the fulfillmentOrderId value as gid://shopify/LineItem/6181984370990 when it should look like gid://shopify/FulfillmentOrder/[id] based on the example in our dev docs here. Hope this helps!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog