GET
/
customers
/
external_customer_id
/
{external_customer_id}
/
costs
curl --request GET \
  --url https://api.withorb.com/v1/customers/external_customer_id/{external_customer_id}/costs \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "subtotal": "<string>",
      "total": "<string>",
      "timeframe_start": "2023-11-07T05:31:56Z",
      "timeframe_end": "2023-11-07T05:31:56Z",
      "per_price_costs": [
        {
          "quantity": 123,
          "subtotal": "<string>",
          "total": "<string>",
          "price": {
            "metadata": {},
            "id": "<string>",
            "name": "<string>",
            "external_price_id": "<string>",
            "price_type": "usage_price",
            "model_type": "unit",
            "created_at": "2023-11-07T05:31:56Z",
            "cadence": "one_time",
            "billing_cycle_configuration": {
              "duration": 123,
              "duration_unit": "day"
            },
            "invoicing_cycle_configuration": {
              "duration": 123,
              "duration_unit": "day"
            },
            "billable_metric": {
              "id": "<string>"
            },
            "dimensional_price_configuration": {
              "dimensional_price_group_id": "<string>",
              "dimension_values": [
                "<string>"
              ]
            },
            "fixed_price_quantity": 123,
            "plan_phase_order": 123,
            "currency": "<string>",
            "conversion_rate": 123,
            "item": {
              "id": "<string>",
              "name": "<string>"
            },
            "credit_allocation": {
              "currency": "<string>",
              "allows_rollover": true
            },
            "discount": {
              "discount_type": "percentage",
              "applies_to_price_ids": [
                "h74gfhdjvn7ujokd",
                "7hfgtgjnbvc3ujkl"
              ],
              "reason": "<string>",
              "percentage_discount": 0.15
            },
            "minimum": {
              "minimum_amount": "<string>",
              "applies_to_price_ids": [
                "<string>"
              ]
            },
            "minimum_amount": "<string>",
            "maximum": {
              "maximum_amount": "<string>",
              "applies_to_price_ids": [
                "<string>"
              ]
            },
            "maximum_amount": "<string>",
            "unit_config": {
              "unit_amount": "<string>"
            }
          },
          "price_id": "<string>"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

external_customer_id
string | null
required

Query Parameters

timeframe_start
string | null

Costs returned are inclusive of timeframe_start.

timeframe_end
string | null

Costs returned are exclusive of timeframe_end.

view_mode
enum<string> | null

Controls whether Orb returns cumulative costs since the start of the billing period, or incremental day-by-day costs. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.

Available options:
periodic,
cumulative
currency
string | null

The currency or custom pricing unit to use.

Response

200
application/json
OK
data
object[]
required