'How to link a search bar to search api

I already have a search api,i have created a search bar and when I give an input in search bar ,i have to use api to get info. Can anyone help me how i can link both of them.

Scenario- get order using order number in the search bar in order history page

I already have a search api,i have created a search bar and when I give an input in search bar ,i have to use api to get info. Can anyone help me how i can link both of them.

Scenario- get order using order number in the search bar



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source