Order fulfillment API command sent but didn't receive any response from shopify end

Dear Experts,

After upgrading API version from 2022-04 to 2022-10, the Order fulfillment command executed but no response received from shopify.

End point: https://***********************/api/2022-10/orders/50162****/fulfillments.json

payload:

{
“fulfillment”:{
“location_id”:350715****
,“tracking_number”:“6487****”
,“tracking_company”:“FedEx”
}
}

Could you please help me what’s wrong with my command. It has been working since 1 year without any issue but using new API version no response received from shopify

Thank you,

Kamal Hossain

Hi Kamal,

Are you getting no response at all back from Shopify - or an error message (eg: 404?)

Hi Liam,

The response is null and at my end no error is logged. Only one changed I have made is…the API version upgraded 2022-04 to 2022-10. After changing none of the fulfillment worked.

Thank you,

Kamal

Hi Liam,

I debugged the process separately and I found the response code “HTTP response status code: 404”

My regular package process storing response as NULL but to be confirmed I executed separately out of package and found the response as mentioned above.

is that something the API version 2022-10 , the payload and endpoint structured is different? the same process working good in 2022-04

please advise

Thank you.

Kamal

Hi again Kamal,

There were recent deprecations on some endpoints on the Fulfillment API which could be affecting this - especially if the same is working correctly on an earlier version.

Thank you Liam. I actually could not understand what steps do I need to take to perform the execution successfully.

I changed the endpoint and payload as mentioned below but no luck. Could you suggest me what the correct format to call for both endpoint and payload.

Endpoint:

p_end_point := '/admin/api/2022-10/fulfillments.json';

Payload:

lv_payload := '{
  "fulfillment": {
    "line_items_by_fulfillment_order": [
      {
        "fulfillment_order_id": 499691
      }
    ],
    "tracking_info": {
      "number": "6368790",
      "company": "FedEx"
    }
  }
}';

Thank you,

Kamal

I changed the endpoint to the following

Endpoint:

admin/api/2022-10/orders/4996917***/fulfillment_orders.json

Then the returned fulfillment order id I passed through the payload:

lv_mutation_payload := '{
  "fulfillment": {
    "line_items_by_fulfillment_order": [
      {
        "fulfillment_order_id": 5980286***
      }
    ],
    "tracking_info": {
      "number": "636879022269",
      "company": "FedEx"
    }
  }
}';

and then I am receiving the following status:

HTTP response status code: 422

could you please advise

Thank you,

Kamal

The correct response I traced in my log as mentioned below:

422-{"errors":["Fulfillment order 59802869*** has an unfulfillable status= closed."]}

The issue is fixed:

What I did for the successful execution:

first I sent GET request to pick the fulfillment order ID:

admin/api/2022-10/orders/5016212****/fulfillment_orders.json

Second… after having the fulfillment order ID I sent a POST request using the following Endpoint along with payload and the response is success

Endpoint:

p_end_point := '/admin/api/2022-10/fulfillments.json'

Payload:

lv_mutation_payload := '{
  "fulfillment": {
    "line_items_by_fulfillment_order": [
      {
        "fulfillment_order_id": 6000406****
      }
    ],
    "tracking_info": {
      "number": "648721838***",
      "company": "FedEx"
    }
  }
}';

Thank you Liam for your help providing the correct documentation.

Great to hear Kamal!!