Documentation
Feedback
Guides
API Reference

Guides
Orders
Actions in orders
Using VTEX Admin filters on orders via API

This article explains how to use the VTEX Admin Order Management filters via the List orders API:

GET - https://{accountName}.{environment}.com.br/api/oms/pvt/orders

To apply VTEX Admin filters via API, follow the steps below:

  1. Access your VTEX Admin in Orders > Order Management > All Orders.
  2. Click on the filters icon.

{"base64":"  ","img":{"width":483,"height":146,"type":"jpg","mime":"image/jpeg","wUnits":"px","hUnits":"px","length":13500,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/using-orders-management-filters-in-api-0.jpg"}}

  1. Select the filter you want to apply and click Confirm. You can combine multiple filters.

{"base64":"  ","img":{"width":423,"height":219,"type":"jpg","mime":"image/jpeg","wUnits":"px","hUnits":"px","length":14137,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/using-orders-management-filters-in-api-1.jpg"}}

  1. After selecting the filters, copy the URL generated in your browser.
  2. Using an URL decoder tool, decode the URL so that It will look like the following example:

{"base64":"  ","img":{"width":770,"height":387,"type":"jpg","mime":"image/jpeg","wUnits":"px","hUnits":"px","length":40463,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/using-orders-management-filters-in-api-2.jpg"}}

  1. Copy only the URL extension after the question mark ?.

    For example: orderBy=creationDate,desc&page=1&f_creationDate=creationDate:[2022-10-01T03:00:00.000Z TO 2022-11-01T02:59:59.999Z]&f_status=$$ALL_VALUES$$

  2. In your browser, insert the API List orders path (https://{accountName}.{environment}.com.br/api/oms/pvt/orders) followed by the URL excerpt from last step.

    For example: https://{accountName}.{environment}.com.br/api/oms/pvt/orders?orderBy=creationDate,desc&page=1&f_creationDate=creationDate:[2022-10-01T03:00:00.000Z TO 2022-11-01T02:59:59.999Z]&f_status=$$ALL_VALUES$$

  3. Click on Enter.

You can use pagination and determine the number of orders per page by adding the parameters _&page=1&per_page=15_ at the end of your URL. The page=1 means accessing the first page, and per_page=15 means 15 orders on each page. You can change it as you wish, up to the limit of 30 pages.

Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
1
Photo of the contributor
+ 1 contributors
On this page