Skip to main content
POST
/
prices
/
evaluate_preview_events
Evaluate preview events
curl --request POST \
  --url https://api.withorb.com/v1/prices/evaluate_preview_events \
  --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",
  "events": [],
  "price_evaluations": []
}'
{
  "data": [
    {
      "price_groups": [
        {
          "grouping_values": [
            "<string>"
          ],
          "quantity": 123,
          "amount": "<string>"
        }
      ],
      "currency": "<string>",
      "price_id": "<string>",
      "external_price_id": "<string>",
      "inline_price_index": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
timeframe_start
string<date-time>
required

The inclusive lower bound for event timestamps

timeframe_end
string<date-time>
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.

events
PreviewEvent · object[]

List of preview events to use instead of actual usage data

Required array length: 1 - 500 elements
price_evaluations
PriceEvaluationRequest · object[]

List of prices to evaluate (max 100)

Required array length: 1 - 100 elements

Response

OK

data
EvaluatePriceResourceForMultiplePrice · object[]
required
I