Fulfill (POST) - 404 (Not Found)

Hello,

We can’t fulfill order via API. We are getting 404 not found and we already adapted the new api version. Please check below.

Request ID To Fulfill : dee4526e-5445-4b66-9480-5c04f0e570b9

1.First we request GET and get the fulfilment_order → id

curl

curl --location 'https://ceycey1.myshopify.com/admin/api/2023-10/orders/5545581281565/fulfillment_orders.json' \
--header 'X-Shopify-Access-Token: {token}

Payload

{
"fulfillment_orders": [
{
"id": 6483617186077,
...
}

2. We try to fulfill with this ID , tracking number and company.

curl --location 'https://ceycey1.myshopify.com/admin/api/2023-01/fulfillments.json' \
--header 'X-Shopify-Access-Token: {token}' \
--header 'Content-Type: application/json' \
--data '{
"fulfillment": {
"tracking_info": {
"number": 241561072141,
"url": "http://suratkargo.com.tr/KargoTakip/?kargotakipno=xxxx",
"company": "Sürat Kargo"
},
"line_items_by_fulfillment_order": [
{
"fulfillment_order_id": 6483770081565,
"fulfillment_order_line_items": [{"id":"14518008840477","quantity":"1"}]
}]}}'

But we are getting 404 status code response with payload:

{
"errors": "Not Found"
}

Could you please help us why this happens? Also we check the fulfillment_order status and supported_actions. Everything is fine to fulfill. What is the missing problem we are skipping?

"status": "open",
"supported_actions": [
"create_fulfillment",
"hold",
"split"
],

Hey @yengec

You’ll want to POST to admin/api/2023-01/fulfillments.json

Here’s a curl example.

Hello,

We already made the POST to admin/api/2023-01/fulfillments.json could you please check 2. bullet on our first post. The response is 404. The endpoint raises error on some orders not all of them. One of them is this one. We also added request id to check on the top of post.

Hey @yengec

Our logs for request dee4526e-5445-4b66-9480-5c04f0e570b9 show a GET request.

From your curl example I think you’re missing -X POST

Hello,

We are making a POST request but we retried again and same result. You can find the request ID and the curl request. Could you please check if this as a GET request again?

Request ID: (X-Request-ID)

7cdacf9a-16ac-43f8-beea-c8f2784ec01a
curl --location 'https://ceycey1.myshopify.com/admin/api/2023-01/fulfillments.json' \
--header 'X-Shopify-Access-Token: {{token}}' \
--header 'Content-Type: application/json' \
--header 'Cookie: request_method=POST' \
--data '{
    "fulfillment": {
        "tracking_info": {
            "number": 2,
            "url": "http://suratkargo.com.tr/KargoTakip/?kargotakipno=2",
            "company": "Sürat Kargo"
        },
        "line_items_by_fulfillment_order": [
            {
                "fulfillment_order_id": 6483770081565,
                "fulfillment_order_line_items": [{"id":"14518008840477","quantity":"1"}]
            }
        ]
    }
}'

Response

{
    "errors": "Not Found"
}

Hey @yengec

Yep this was another GET request.

Hello @SBD

It’s really weird. We recorded a video from postman with POST request and GET request. It was not a GET request because GET request payload will be Bad Request not a NOT FOUND. We already included this payload in the recordings.

From the screen record you can copy and paste the last post request ID here:

cc51b5e0-29a5-43f1-9265-f8ad5f137622

Could you please guide us what is missing or wrong here?

Also @SBD

We tried with Apidog and the POST request https://ceycey1.myshopify.com/admin/api/2023-07/fulfillments.json redirected to

GET https://83892f-3.myshopify.com/admin/api/2023-07/fulfillments.json

Also when we click https://ceycey1.myshopify.com/admin/api/2023-07/fulfillments.json from browser redirects to another subdomain does it be a 301 redirect problem?

Strange :thinking: Can you please also record the body and response headers?

Hello @SBD ,

Recorded a video and also added the screenshots that shows body and response headers.

Video here:

https://cdn.yengec.co/wp-content/uploads/2023/11/09100423/screen-capture-1.webm

Screenshots