POST
/
prices
/
{price_id}
/
evaluate
curl --request POST \
  --url https://api.withorb.com/v1/prices/{price_id}/evaluate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "<string>",
  "external_customer_id": "<string>",
  "timeframe_start": "2023-11-07T05:31:56Z",
  "timeframe_end": "2023-11-07T05:31:56Z",
  "filter": "my_numeric_property > 100 AND my_other_property = '\''bar'\''",
  "grouping_keys": [
    "case when my_event_type = '\''foo'\'' then true else false end"
  ]
}'
{
  "data": [
    {
      "grouping_values": [
        "<string>"
      ],
      "quantity": 123,
      "amount": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API Keys can be issued in the Orb's web application.

Path Parameters

price_id
string
required

Body

application/json
timeframe_start
string
required

The inclusive lower bound for event timestamps

timeframe_end
string
required

The exclusive upper bound for event timestamps

customer_id
string | null

The ID of the customer to which this evaluation is scoped.

external_customer_id
string | null

The external customer ID of the customer to which this evaluation is scoped.

filter
string | null

A boolean computed property used to filter the underlying billable metric

grouping_keys
string[]

Properties (or computed properties) used to group the underlying billable metric

Response

200
application/json
OK
data
object[]
required