Good morning!
Is there any way we can add a filter to the query to return only orders placed with a specific payment method? In this API here
There are some undocumented queries. An example would be passing the parameter &f_status=invoiced, which would return only orders with the status “Invoiced”.
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.
Good morning, @andremiani.
I see. When sending the f_paymentNames query, do you know what the name would be for payments made by boleto?
@leoamaral to query orders from the beginning of the year through yesterday, with payments via Boleto, I believe it would be like this:
https://{{accountName}}.{{environment}}.com.br/api/oms/pvt/orders/?f_creationDate=creationDate%3A%5B2024-01-01T02%3A00%3A00.000Z%20TO%202024-05-22T01%3A59%3A59.999Z%5D&f_paymentNames=Boleto%20Banc%C3%A1rio
Got it, I’ll give it a try! Thank you so much for the help!