Get Orders by custom conditions with V1/orders?searchCriteria filter in Magento REST API.
When you work with the Guest Customer Order flow via API, you need given API details to fetch the payment method for the current quote.
Action: GET
URL: <SITE_URL>/rest/<store_code>/V1/orders
(https://magento.test/rest/default/V1/orders?searchCriteria[filterGroups][0][filters][0][field]=created_at&searchCriteria[filterGroups][0][filters][0][value]=2022-07-27 10:30:00&searchCriteria[filterGroups][0][filters][0][conditionType]=gteq)
HEADERS: Authorization Bearer <ADMIN_TOKEN>
Payload: NULL
RESPONSE: The Array of a list of orders that match the search criteria.
In the URL, you have to pass field, value, and conditionType to fetch order data based on your requirement.
If you want to fetch all the orders that are created after a specific date time, your search criteria should look like
field – created_at
value – 2022-07-27 10:30:00
conditionType – gteq