Re: Marking order as fulfilled for a Digital Product via Shopify Admin REST APIs.

Marking order as fulfilled for a Digital Product via Shopify Admin REST APIs.

namansharma
New Member
6 0 0

I would like to mark the orders as fulfilled via the Admin APIs. We sell eSIM cards which are digital products and do not require shipping. We have essentially built a mechanism that listens to the webhook when a customer places an order and sends the relevant product to the customer via email. After the mail has been sent, I would like to mark the order as fulfilled via the Admin REST APIs as we can have a situation where manual intervention might be required and those orders shall not be marked as fulfilled.

 

I have tried following the tutorial to fulfil the request. I can retrieve the fulfilment orders by using the API https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillment#get-orders-order-id-fulfillmen...

However, I am unable to comprehend the next steps as the product does not require shipping and only requires the change in status from unfulfilled to fulfilled.

I tried my hands on https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillment#post-fulfillments based on the fulfilment_order_id I received in the previous API call only to get a 404 Not Found error.

Screenshot 2023-03-31 at 2.54.35 AM.png

 

I simply need a way to change the status of the order to fulfilled. Any guidance will be greatly appreciated.

 

Replies 3 (3)

garyrgilbert
Shopify Partner
428 41 179

Hi Namansharma,

 

I would place a very large bet that the fulfillment_order_id in the above screenshot is the order_id of the order you wish to fulfill and not the fulfillment_order_id of the fulfillment order you got when making a get request to orders/{order_id}/fulfillment_orders.json.

 

Cheers,

 

Gary

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
namansharma
New Member
6 0 0

Hi Gary,


Thanks for looking into this but unfortunately, it is the fulfilmentOrder Id. I have checked the threads in the discussion forums and moved my head around a lot of permutations and combinations.

 

Here is the screenshot of the orders/{order_id}/fulfillment_orders.json
Screenshot 2023-04-05 at 10.30.53 PM.png

 

Additionally, here is the screenshot of /fulfillment_orders/{fulfillmentOrder_id}.json

Screenshot 2023-04-05 at 10.31.42 PM.png

 

I have manually fulfilled the order from the Shopify Admin page this the status is changed now.

 

Looking forward to a reply.

 

Cheers.

garyrgilbert
Shopify Partner
428 41 179

Hi Namansharma,

 

OK super, thats the most common mistake (I made it myself when I first looked at the new fulfillment orders api).

 

Do you have an example json of the fulfillment order with a digital article, one thats open maybe from a test shop? The supported actions  "create_fulfillment" must be present as well in order to be able to create a fulfillment from a fulfillment order.

 

Cheers,

 

Gary

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution