Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

Marking a order as Ready for pickup fulfillmentOrderLineItemsPreparedForPickup

Etienne_Steyn
Shopify Partner
7 1 0

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.

scrnPcikupOrder.png

 

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1242 201 438

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

View solution in original post

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1242 201 438

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