How to fetch orders from specific date by REST API V1/orders?searchCriteria Magento 2?

You can fetch order details by Magento 2 REST API by applying customer conditions based on your requirement using the V1/orders?searchCriteria filter in Magento REST API.

When you work with the Guest Customer Order flow via API, you need to provide API details to fetch the payment method for the current quote.

Action: GET

URL: <SITE_URL>/rest/V1/orders
(https://magento.local.com/rest/V1/orders?searchCriteria[filterGroups][0][filters][0][field]=created_at&searchCriteria[filterGroups][0][filters][0][value]=2024-11-30 10:30:00&searchCriteria[filterGroups][0][filters][0][conditionType]=gteq&searchCriteria[filterGroups][1][filters][1][field]=store_id&searchCriteria[filterGroups][1][filters][1][value]=1&searchCriteria[filterGroups][1][filters][1][conditionType]=eq)

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 the 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 and time, your search criteria should look like
field – created_at
value – 2022-11-30 10:30:00
conditionType – gteq

If you have a multi-website store setup, you can add a store_id field to filter out by store-specific orders.

You can’t filter orders by adding a store code to the URL, you need to add a store_id filter in the search criteria request.

field – store_id
value – 1
conditionType – eq