Stax Bill can filter the results based on criteria for API requests that return a list. This is done through a specific parameter called
query, which can be used for date and numeric range filtering. All times shown and used in the Stax Bill API are UTC
A: Simple closed interval (date range)
This call returns up to 100 customers who were created in the system during 2018. The colon character separates the query parameter name from the range being used. The available query parameter names are often the same as the field names in the JSON. These query parameter names are provided in the API reference for the relevant calls.
The pipe character is used to separate the lower time bound from the upper time bound.
A note on formatting:
The format for a timestamp is YYYY-MM-DD but more granularity can be used e.g. YYYY-MM-DDTHH:MM:SS. In fact, when a range like 2018-01-01|2019-01-01 is provided Fusebill automatically translates that into 2018-01-01T00:00:00|2019-01-01T00:00:00 which is why the range would include timestamps that occurred on 2018-01-01 but not 2019-01-01.
B: Lower bounded interval (date range)
This call returns up to 100 customers with a last modified timestamp of January 1st 2018 or beyond.
C: Upper bounded interval (date range)
This call returns up to 100 customers created before 2019-01-01.
D: Numeric ranges
This call returns up to 100 customers with a monthly recurring revenue between 50.00 and 180.00
As with date ranges, that range could be |180.00 to be values from negative infinity to 180.00 or it could be 50.00| to be values from 50.00 to infinity
E Combining ranges
This call returns up to 100 customers who satisfy both conditions. They must have a monthly recurring revenue between 50.00 and 180.00, and their last modified timestamp must be before 2020-01-01. The semicolon (;) is used to separate the filter-value pairs. The semicolon can also be used to combine range filtering and string filtering in the same API call.