Evaluate multiple prices
This endpoint is used to evaluate the output of price(s) for a given customer and time range over either ingested events or preview events. It enables filtering and grouping the output using computed properties, supporting the following workflows:
- Showing detailed usage and costs to the end customer.
- Auditing subtotals on invoice line items.
Prices may either reference existing prices in your Orb account or be defined inline in the request body. Up to 100 prices can be evaluated in a single request.
Price evaluation by default uses ingested events, but you can also provide a list of preview events to use instead. Up to 500 preview events can be provided in a single request. When using ingested events, the start of the time range must be no more than 100 days ago.
For these workflows, the expressiveness of computed properties in both the filters and grouping is critical.
For example, if you’d like to show your customer their usage grouped by hour and another property, you can
do so with the following grouping_keys
:
["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]
.
If you’d like to examine a customer’s usage for a specific property value, you can do so with the following filter
:
my_property = 'foo' AND my_other_property = 'bar'
.
The length of the results must be no greater than 1000. Note that this is a POST endpoint rather than a GET endpoint because it employs a JSON body rather than query parameters.
Authorizations
API Keys can be issued in the Orb's web application.
Body
Response
OK
The response is of type object
.