Fulfillment API Error

NLBen
New Member
6 0 0

I am currently trying to make a POST request with the following JSON to fulfill one item on an order. The order ID is passed in the request URL. The request JSON is below:

 

{"fulfillment": {"location_id": 7510392921,"tracking_number": null,"line_items": [{"id": 4526823309401}]}}

 

I have verified the location_id I am using through the locations.json page.

 

I have tried some pointers I saw on other posts such as including the Order_ID in the json, setting the Status and using tracking_numbers and an array instead of tracking_number but keep getting the following response :

{"errors":{"fulfillment":"Required parameter missing or invalid"}}

0 Likes
_JB
Shopify Staff
Shopify Staff
750 86 163

Hey @NLBen,

 

In order to investigate further, can you please provide the endpoint URL you're hitting, as well as the X-Request-ID value from the response headers? I can use this to check our logs and get more information about the error you're hitting.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes
NLBen
New Member
6 0 0

Hi JB,

 

I am hitting /admin/api/2020-04/orders/2050841804889/fulfillments.json

 

I have just run this again this morning and have received the following X-Request_id: 4335b153-b203-47ca-bdf9-af7c40c4f33a

0 Likes
NLBen
New Member
6 0 0

Hi @_JB Have you had a chance to look into this?

0 Likes
_JB
Shopify Staff
Shopify Staff
750 86 163

Hey @NLBen,

 

Sorry this got lost in the shuffle. Would you mind sending another recent request_id?

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes
NLBen
New Member
6 0 0

Hi @_JB

 

I have just run another request, here is the X-Request-ID fd07c575-7e29-4c6b-94f0-4b341c0af02c

0 Likes
NLBen
New Member
6 0 0

Hi @_JB,

 

Have you had a chance to look into this request yet?

0 Likes
_JB
Shopify Staff
Shopify Staff
750 86 163

Hi Ben,

Is it ok if I attempt a fulfillment on this shop? I haven't found anything useful in the logs, but I can send calls with debug parameters to get more info. Please let me know if this is ok and we'll continue investigating.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes
NLBen
New Member
6 0 0

Hi @_JB,

Yes that is fine

 

0 Likes
_JB
Shopify Staff
Shopify Staff
750 86 163

Hey @NLBen,

I just used this call on your store and I was able to fulfill the order as expected:

{
	"fulfillment": {
		"location_id": 7510392921,
		"tracking_number": null,
		"line_items": [
			{
				"id": 4526823342169
			}
		]
	}
}

Have you tried this call using an HTTP client like Postman? This can help confirm that the call you're making is valid, if it works in Postman there must be an issue with how the call is being made from your application. 

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes