Fulfilment Request API giving error

I am trying to call Fulfilment Request API, but its giving me 422 Unprocessable entity response. Shopify store is sandbox (ka-sandbox.myshopify.com)

hello there

A 422 Unprocessable Entity response indicates that the request was formatted correctly, but the server was unable to process it. This could be due to a validation error or missing required fields.

To troubleshoot this issue with the Fulfilment Request API, you can try the following:

  1. Check that you are using the correct endpoint for the Fulfilment Request API. The endpoint should be POST /admin/api/2023-01/fulfillment_orders/#{fulfillment_order_id}/fulfillment_request.json.

  2. Verify that the fulfillment_order_id parameter is set correctly. This should be the ID of the fulfillment order that you want to request fulfillment for.

  3. Make sure that you are including all required fields in your request, such as the location_id and inventory_units parameters. You can refer to the API documentation for a full list of required and optional fields.