- Order Processing
V3 Deprecation Notice
We are planning on sunsetting Version 3 of the WPS API and Data Depot on August 31st, 2018.
All the ways to get total record counts of various data.
There are a few ways to get counts. The two primary methods are:
These count helpers can be used on any endpoint and in combination with filters and other helpers too.
Let's start with a simple one: Warehouses. Get a total count of all Warehouses.
Easy, right? WPS has six warehouses so this request returns 6 in the structured JSON response.
Next, why not try a more useful endpoint like getting a total count of all Items?
But what about relations?
Perhaps you want to combine this functionality with other helper parameters (like Filters) to produce even more powerful queries. Piece of cake!
Get a count of all FLY Racing branded Items.
Get a total count of Items for a specific Product.
Ready for a more complicated one? This is how you would count includes that are filtered. Read more about Filtering Includes. This example request will include the Items count, but filtered by only those Items that have a list_price less than $112.96 for a specific Product.