How to retrieve order details from Shopify in bot conversation?

I have a bot and I want it to work so that when a user enters their order number from Shopify, the order details for that specific order are displayed in the bot conversation such as the email, status url etc.

I have made an API that retrieves a list of orders from my shopify but when I use it in the bot all the top 50 orders are listed and not only the specific one the user has entered.

The response is like this:
image

How can I only display the details of the order entered by the user?

Hi Tehreem,

Shopify has an API to fetch an order instead of list of orders.

Ref - Order

Can you please try the above API to fetch order details?