Solved

Fulfillment returns 404 not found

shippery
Shopify Partner
1 0 2

We are querying a fulfillment order via /admin/api/2022-07/fulfillments.json

 

We get a 404 not found error.

 

X-Request-Id: eaccc646-48b9-49a0-8886-d2e1e0138ec5

 

Curl request POST fields:

"fulfillment":{
"message": "The package was shipped this morning.",
"notify_customer":false,
"location_id": XXXXXXX,
"tracking_info":{
"number": XXXXXXX,
"url": "https://gls-group.eu/",
"company": "other"
},
"line_items_by_fulfillment_order":[
{
"fulfillment_order_id":XXXXXXXX,
"fulfillment_order_line_items":[
{"id":"XXXXXXXX","quantity":"1"}

 

What could be the solution?

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1322 218 457

This is an accepted solution.

Hey @avdevx - I've queried a fulfillment order ID based on the steps in our dev docs and my GET Request looked like this: 

GET https://mystore.myshopify.com/admin/api/2023-01/fulfillment_orders/[fulfillmentorder#]/fulfillments....

 

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. If you're still seeing errors, we would recommend double checking the fulfillment order number to ensure it's valid - and also to confirm if you're querying the ID of the fulfillment order and not the ID of the fulfillment itself.

Hope this helps - if you've confirmed that the ID is valid and you are still seeing error responses, just reply back here with an X-Request-ID from your response headers and we'd be happy to keep looking into this with you. 

Al | Shopify Developer Support

 

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

Replies 14 (14)

avdevx
Shopify Partner
5 0 0

Any solution for this?

 

ShopifyDevSup
Shopify Staff
1322 218 457

This is an accepted solution.

Hey @avdevx - I've queried a fulfillment order ID based on the steps in our dev docs and my GET Request looked like this: 

GET https://mystore.myshopify.com/admin/api/2023-01/fulfillment_orders/[fulfillmentorder#]/fulfillments....

 

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. If you're still seeing errors, we would recommend double checking the fulfillment order number to ensure it's valid - and also to confirm if you're querying the ID of the fulfillment order and not the ID of the fulfillment itself.

Hope this helps - if you've confirmed that the ID is valid and you are still seeing error responses, just reply back here with an X-Request-ID from your response headers and we'd be happy to keep looking into this with you. 

Al | Shopify Developer Support

 

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

avdevx
Shopify Partner
5 0 0

@ShopifyDevSup thank you!! its resolved 😁

 

GowthamSid
Visitor
2 0 1

Hi @avdevx I'm also facing the same issue. How did you resolve the issue, which API method did you use to fulfill the order.

dakshyafreond
Shopify Partner
30 0 3

Hi, I am confirmed that I am passing the correct order id on end point https://store-url/admin/api/2023-01/fulfillments.json but in response I am gating 

{
    "errors""Not Found"
} request id: bea50fa3-7640-4eec-a11b-0c3529f44897.
Founder at Dakshya Freondtech (https://dakshyafreondtech.com)
1. Synkron (https://apps.shopify.com/synkron-1) - Multi channel inventory sync app
2. Reporting Agent (https://www.reportingagent.com) - Multi channel reporting tool
GowthamSid
Visitor
2 0 1

Hi, @dakshyafreond first you need to make this api call /admin/api/2023-01/orders/{order_id}/fulfillment_orders.json to retrieves a list of fulfillment orders for a specific order from that response you will get fulfillment order id and line item id, you need to pass that value to https://store-url/admin/api/2023-01/fulfillments.json

{
    "fulfillment": {
        "message""The package was shipped this morning.",
        "notify_customer"false,
        "tracking_info": {
            "number"1562678
        },
        "line_items_by_fulfillment_order": [
            {
                "fulfillment_order_id": fulfillment order id,
                "fulfillment_order_line_items": [line item id]
            }
        ]
    }
}
dakshyafreond
Shopify Partner
30 0 3

Thank you. It worked like piece of cake.   

Founder at Dakshya Freondtech (https://dakshyafreondtech.com)
1. Synkron (https://apps.shopify.com/synkron-1) - Multi channel inventory sync app
2. Reporting Agent (https://www.reportingagent.com) - Multi channel reporting tool
ArthurChen
Shopify Partner
1 0 0

HI  

My order id is 5298327191826

X-Request-ID: 40db0219-43b0-45e9-9f1c-9adc0bbe4257

Very urgent, I need your help. Originally, we were using 2022-04 and now we have 404. Switching to 2022-07 is also 404.

 

It return 404

 

{
"errors": "Not Found"
}

 

Request:

{
"fulfillment": {
"message": "The package was shipped this morning.",
"notify_customer": false,
"tracking_info": {
"number": 1562678
},
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": 5298327191826,
"fulfillment_order_line_items": [{"id":"12376013635673","quantity":"1"}]
}
]
}
}

 

bilal-ahmad-cd
Shopify Partner
1 0 0

I'm getting  this response when trying to fulfill order:

{
"errors": "Not Found"
}

Request ID: bf972556-ab2b-466c-abb4-f7593a9c5c13

 

I've double check the order-id and store is connected.

 

TomasHecko
Visitor
2 0 0

Hello,

 

same problem here, get fulfillments orders is successfull, but create fulfillment always returns 404 Not Found (even on empty body).

 

Request ID 3f0d596d-06f2-4821-83ed-b01ca5dcb68e

 

Thanks.

TomasHecko
Visitor
2 0 0

Maybe this will save time for someone,

 

This one was caused by "incorrect" store URL - make sure you use SHOPIFY STORE name - URL that ends with ".myshopify.com".

 

Otherwise endpoint returns "not found" (despite the fact that other endpoints are working correctly with non-shopify domain in request URL).

_gavin
Visitor
2 0 0

I obtained it through /admin/api/2024-01/orders/5697285357879/fulfillment_orders.json
{
"fulfillment_orders": [
{
"id": 6656734691639,
"line_items": [
{
"id": 14735245803831,
"fulfillment_order_id": 6656734691639,
"line_item_id": 14584663474487,
"fulfillable_quantity": 1

}
]
}
]
}

But I checked the delivery order through /admin/api/2024-01/fulfillments.json
We get a 404 not found error.

Curl request POST fields:
{
"message": "",
"notify_customer": false,
"tracking_info": {
"number": "xxxxxxxx",
"company": "DHL eCommerce"
},
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": 6656734691639

}
]
}

{
"fulfillment": {
"location_id": "96279298359",
"message": "null",
"notify_customer": "false",
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": "6656734691639",
"line_items": [
{
"id": "14735245803831",
"quantity": "1"
}
]
}
],
"tracking_info": {
"number": "xxxxxxxx",
"company": "DHL eCommerce"

}
}
}

What could be the solution?

_gavin
Visitor
2 0 0

x-request-id:b56c9d2c-ef5f-4066-a741-079b7bddd7fc-1709711337

dec82000
Shopify Partner
2 0 0

Please look for 
x-request-id: 33eb93e4-0473-4a30-8b75-29223394f26c-1709705517