POST Fulfilment API Error Response "404 Not Found"

Solved

POST Fulfilment API Error Response "404 Not Found"

PriyankaPatel
Shopify Partner
4 1 4

Hi there,

 

I am getting "404 not found" on Create Fulfilment response.

This is the endpoint (Post request) : 

 

shopname.myshopify.com/admin/api/2024-01/fulfillments.json

Post json data: 

{
"fulfillment": {
"location_id": "XXXX",
"message": "null",
"notify_customer": "false",
"line_items_by_fulfillment_order": [{
"fulfillment_order_id": "5X285X128XXXX",
"fulfillment_order_line_items": [{
"id": "XXXX",
"quantity": "1"
}, {
"id": "YYYYY",
"quantity": "1"
}]}]}}


The old endpoint was 

 

shopname.myshopify.com/admin/api/2024-01/orders/Shopify_OID/fulfillments.json

 

and it was working fine previously but now with new changes and new endpoint (shopname.myshopify.com/admin/api/2024-01/fulfillments.json) its give 404 not found, if this endpoint not available then is there any alternative way.

 

In most cases, the 404 error would only be returned if the app is authenticated on the correct store and if the ID number entered for the fulfillment order is incorrect. As I can see, I did check all app Admin API access scopes and Order Id that I am passing is all correct. Is anyone know how to fix this error in this situation please. 

look forward to hearing from you. 

 

Thank you. 

Accepted Solution (1)

PriyankaPatel
Shopify Partner
4 1 4

This is an accepted solution.

For everyone wondering, I fixed it. 

 

there was two errors : fulfillment_order_id was wrong its not order Id

 

"line_items_by_fulfillment_order": [ { "fulfillment_order_id": ########### } ]

 

you can get it from : 

 

https://store.myshopify.com/admin/api/2023-04/orders/{orderid}/fulfillment_orders.json

 

2nd error was : use  instead of "fulfillment_order_line_items" it should be "line_items". 

 

here is final data : 

 

This is the endpoint (Post request) : 

 

shopname.myshopify.com/admin/api/2024-01/fulfillments.json

Post json data: 

{
"fulfillment": {
"location_id": "XXXX",
"message": "null",
"notify_customer": "false",
"line_items_by_fulfillment_order": [{
"fulfillment_order_id": "5X285X128XXXX", ( ID Must get from this end point -  https://store.myshopify.com/admin/api/2024-01/orders/{orderid}/fulfillment_orders.json )
"line_items" ( not fulfillment_order_line_items) : [{
"id": "XXXX",
"quantity": "1"
}, {
"id": "YYYYY",
"quantity": "1"
}]}]}}

 

I hope this help. 

View solution in original post

Reply 1 (1)

PriyankaPatel
Shopify Partner
4 1 4

This is an accepted solution.

For everyone wondering, I fixed it. 

 

there was two errors : fulfillment_order_id was wrong its not order Id

 

"line_items_by_fulfillment_order": [ { "fulfillment_order_id": ########### } ]

 

you can get it from : 

 

https://store.myshopify.com/admin/api/2023-04/orders/{orderid}/fulfillment_orders.json

 

2nd error was : use  instead of "fulfillment_order_line_items" it should be "line_items". 

 

here is final data : 

 

This is the endpoint (Post request) : 

 

shopname.myshopify.com/admin/api/2024-01/fulfillments.json

Post json data: 

{
"fulfillment": {
"location_id": "XXXX",
"message": "null",
"notify_customer": "false",
"line_items_by_fulfillment_order": [{
"fulfillment_order_id": "5X285X128XXXX", ( ID Must get from this end point -  https://store.myshopify.com/admin/api/2024-01/orders/{orderid}/fulfillment_orders.json )
"line_items" ( not fulfillment_order_line_items) : [{
"id": "XXXX",
"quantity": "1"
}, {
"id": "YYYYY",
"quantity": "1"
}]}]}}

 

I hope this help.