Hello @leoamaral, good morning.
VTEX allows you to list orders by Status using the List Orders API with the f_status parameter.
GET 'https://apiexamples.vtexcommercestable.com.br/api/oms/pvt/orders?f_status=invoiced'
Did it return any errors for you?
But in my opinion, the best approach to managing orders created in VTEX is to bring this information into your ERP at the time the orders are generated, so that you can handle the desired processing and filtering on the ERP side rather than consuming this information directly from VTEX.
In fact, @marcia.alves from VTEX reported here in the community that starting January 1, 2024, only orders from the last two years will be available through the platform.
This information is also highlighted in the List Orders documentation.
You can only access information from orders created in the last two years, and that same period is valid for customers through My Account.
In other words, even though it is possible to filter using the List Orders API with the f_status parameter, there is a limitation of a 2-year range.