Not found al crear un fulfillment

Not found al crear un fulfillment

ImaMuracioli
Visitor
1 0 0

Good afternoon dear community!!

I have a problem when creating a fulfillment for an order that is in paid and unfulfilled status. I'm testing it from Curl to try to change the fulfillment status of the order to fulfilled (Before it worked but suddenly it stopped):

 

curl -d '{"fulfillment":{"message":"The package was shipped this morning.","notify_customer":false,"tracking_info":{"number":1562678,"url":"https://www.my-shipping-company.com","company":"my-shipping-company"}, "line_items_by_fulfillment_order":[{"fulfillment_order_id":4942810972376}], location_id: 70395756760 }}' \
-X POST "https://mitiendadeprueba23.myshopify.com/admin/api/2022-01/fulfillments.json" \
-H "X-Shopify-Access-Token: my token" \
-H "Content-Type: application/json"

If I don't put line_items_by_fulfillment_order it asks me. Previously it worked without it, you passed order_id to it.
I suspect that some id is not correct (location_id, fulfillment_order_id, etc).
I have certain doubts:

  • Do I need to do anything before creating the fulfillment?
  • I get the location_id by bringing me the order information, location_id field, is that ok?
  • line_items_by_fulfillment_order I put the id of the order, is it ok?

The error that returns me is: {"errors":"Not Found"}
I hope you can help me!! Thank you.

Reply 1 (1)

kevnob
Shopify Staff
11 3 3

Hi @ImaMuracioli - thanks for your post! 

 

You may be running into issues because you are using the order ID as opposed to using the FulFillment Order Id which is the preferred method. You can refer to these developer documents on FulFillment and the related GraphQL or REST resources. 

 

Hope that helps! 

To learn more visit the Shopify Help Center or the Community Blog.