---
title: "Get event"
method: GET
path: "/events/lookup"
tags: ["Events"]
---

# Get event

`GET /events/lookup`

Use when debugging a specific event (e.g. why it failed or how it was aggregated). Reads the meter-usage pipeline; includes processing status and step-by-step debug tracker when unprocessed. Uses ?id= query param because event IDs can contain "/".

## Query parameters

- `id` string, required

## Response `200`

OK

- GetEventByIDResponse
  - `debug_tracker` DebugTracker
    - `attributed_to_customer` AttributedToCustomerResult
      - `error` ErrorsErrorResponse
        - `code` 'http_client_error' | 'system_error' | 'internal_error' | 'not_found' | 'already_exists' | 'version_conflict' | 'validation_error' | 'invalid_operation' | 'permission_denied' | 'database_error' | 'service_unavailable' | 'too_many_requests' | 'not_implemented'
        - `http_status_code` integer
        - `message` string
      - `meter_usage` MeterUsageAttribution
        - `external_customer_id` string
        - `meter_id` string
        - `qty_total` string
      - `status` 'unprocessed' | 'not_found' | 'found' | 'error' | 'processing' | 'attributed'
    - `customer_lookup` CustomerLookupResult
      - `customer` Customer
        - `address_city` string — AddressCity is the city of the customer's address
        - `address_country` string — AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)
        - `address_line1` string — AddressLine1 is the first line of the customer's address
        - `address_line2` string — AddressLine2 is the second line of the customer's address
        - `address_postal_code` string — AddressPostalCode is the postal code of the customer's address
        - `address_state` string — AddressState is the state of the customer's address
        - `contact` string — Contact is an optional contact number for the customer (e.g. phone)
        - `created_at` string, date-time
        - `created_by` string
        - `email` string — Email is the email of the customer
        - `environment_id` string — EnvironmentID is the environment identifier for the customer
        - `external_id` string — ExternalID is the external identifier for the customer
        - `id` string — ID is the unique identifier for the customer
        - `metadata` object — Metadata
        - `name` string — Name is the name of the customer
        - `status` 'published' | 'deleted' | 'archived'
        - `tenant_id` string
        - `timezone` string — Timezone is the customer's IANA timezone name (e.g. "Asia/Kolkata"). Defaults to "UTC". Inherited by subscriptions at creation time.
        - `updated_at` string, date-time
        - `updated_by` string
      - `error` ErrorsErrorResponse
        - `code` 'http_client_error' | 'system_error' | 'internal_error' | 'not_found' | 'already_exists' | 'version_conflict' | 'validation_error' | 'invalid_operation' | 'permission_denied' | 'database_error' | 'service_unavailable' | 'too_many_requests' | 'not_implemented'
        - `http_status_code` integer
        - `message` string
      - `status` 'unprocessed' | 'not_found' | 'found' | 'error' | 'processing' | 'attributed'
    - `failure_point` TypesFailurePoint
      - `error` ErrorsErrorResponse
        - `code` 'http_client_error' | 'system_error' | 'internal_error' | 'not_found' | 'already_exists' | 'version_conflict' | 'validation_error' | 'invalid_operation' | 'permission_denied' | 'database_error' | 'service_unavailable' | 'too_many_requests' | 'not_implemented'
        - `http_status_code` integer
        - `message` string
      - `failure_point_type` 'customer_lookup' | 'meter_lookup' | 'price_lookup' | 'subscription_line_item_lookup' | 'attributed_to_customer'
    - `meter_matching` MeterMatchingResult
      - `error` ErrorsErrorResponse
        - `code` 'http_client_error' | 'system_error' | 'internal_error' | 'not_found' | 'already_exists' | 'version_conflict' | 'validation_error' | 'invalid_operation' | 'permission_denied' | 'database_error' | 'service_unavailable' | 'too_many_requests' | 'not_implemented'
        - `http_status_code` integer
        - `message` string
      - `matched_meters` MatchedMeter[]
        - `event_name` string
        - `meter` MeterMeter
          - `aggregation` MeterAggregation
            - `bucket_size` 'MINUTE' | '15MIN' | '30MIN' | 'HOUR' | '3HOUR' | '6HOUR' | '12HOUR' | 'DAY' | 'WEEK' | 'MONTH'
            - `expression` string — Expression is an optional CEL expression to compute per-event quantity from event.properties. When set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel).
            - `field` string — Field is the key in $event.properties on which the aggregation is to be applied For ex if the aggregation type is sum for API usage, the field could be "duration_ms" Ignored when Expression is set.
            - `group_by` string — GroupBy is the property name in event.properties to group by before aggregating. Currently only supported for MAX aggregation with bucket_size. When set, aggregation is applied per unique value of this property within each bucket, then the per-group results are summed to produce the bucket total.
            - `multiplier` string — Multiplier is the multiplier for the aggregation For ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000 to scale up by a factor of 1000. If not provided, it will be null.
            - `type` 'COUNT' | 'SUM' | 'AVG' | 'COUNT_UNIQUE' | 'LATEST' | 'SUM_WITH_MULTIPLIER' | 'MAX' | 'WEIGHTED_SUM'
          - `created_at` string, date-time
          - `created_by` string
          - `environment_id` string — EnvironmentID is the environment identifier for the meter
          - `event_name` string — EventName is the unique identifier for the event that this meter is tracking It is a mandatory field in the events table and hence being used as the primary matching field We can have multiple meters tracking the same event but with different filters and aggregation
          - `filters` MeterFilter[] — Filters define the criteria for the meter to be applied on the events before aggregation It also defines the possible values on which later the charges will be applied
            - `key` string — Key is the key for the filter from $event.properties Currently we support only first level keys in the properties and not nested keys
            - `values` string[] — Values are the possible values for the filter to be considered for the meter For ex "model_name" could have values "o1-mini", "gpt-4o" etc
          - `id` string — ID is the unique identifier for the meter
          - `name` string — Name is the display name of the meter
          - `reset_usage` 'BILLING_PERIOD' | 'NEVER'
          - `status` 'published' | 'deleted' | 'archived'
          - `tenant_id` string
          - `updated_at` string, date-time
          - `updated_by` string
        - `meter_id` string
      - `status` 'unprocessed' | 'not_found' | 'found' | 'error' | 'processing' | 'attributed'
    - `price_lookup` PriceLookupResult
      - `error` ErrorsErrorResponse
        - `code` 'http_client_error' | 'system_error' | 'internal_error' | 'not_found' | 'already_exists' | 'version_conflict' | 'validation_error' | 'invalid_operation' | 'permission_denied' | 'database_error' | 'service_unavailable' | 'too_many_requests' | 'not_implemented'
        - `http_status_code` integer
        - `message` string
      - `matched_prices` MatchedPrice[]
        - `meter_id` string
        - `price` PricePrice
          - `amount` string — Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50
          - `billing_cadence` 'RECURRING'
          - `billing_model` 'FLAT_FEE' | 'PACKAGE' | 'TIERED'
          - `billing_period` 'MONTHLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY' | 'QUARTERLY' | 'HALF_YEARLY' | 'ONETIME'
          - `billing_period_count` integer — BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12
          - `conversion_rate` string — ConversionRate is the conversion rate of the price unit to the fiat currency
          - `created_at` string, date-time
          - `created_by` string
          - `currency` string — Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp
          - `description` string — Description of the price
          - `display_amount` string — DisplayAmount is the formatted amount with currency symbol For USD: $12.50
          - `display_name` string — DisplayName is the name of the price
          - `display_price_unit_amount` string — DisplayPriceUnitAmount is the formatted amount of the price unit
          - `end_date` string, date-time — EndDate is the end date of the price
          - `entity_id` string — EntityID holds the value of the "entity_id" field.
          - `entity_type` 'PLAN' | 'SUBSCRIPTION' | 'ADDON' | 'PRICE' | 'COSTSHEET'
          - `environment_id` string — EnvironmentID is the environment identifier for the price
          - `group_id` string — GroupID references the group this price belongs to
          - `id` string — ID uuid identifier for the price
          - `invoice_cadence` 'ARREAR' | 'ADVANCE'
          - `lookup_key` string — LookupKey used for looking up the price in the database
          - `metadata` PriceJSONBMetadata
          - `meter_id` string — MeterID is the id of the meter for usage based pricing
          - `min_quantity` string, nullable — MinQuantity is the minimum quantity of the price
          - `parent_price_id` string — ParentPriceID references the root price (always set for price lineage tracking)
          - `price_unit` string — PriceUnit is the code of the price unit (e.g., 'btc', 'eth')
          - `price_unit_amount` string — PriceUnitAmount is the amount of the price unit
          - `price_unit_id` string — PriceUnitID is the id of the price unit (for CUSTOM type)
          - `price_unit_tiers` PricePriceTier[] — PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED
            - `flat_amount` string — flat_amount is the flat amount for the given tier (optional) Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
            - `unit_amount` string — unit_amount is the amount per unit for the given tier
            - `up_to` integer — up_to is the quantity up to which this tier applies. It is null for the last tier. IMPORTANT: Tier boundaries are INCLUSIVE. - If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier - This behavior is consistent across both VOLUME and SLAB tier modes
          - `price_unit_type` 'FIAT' | 'CUSTOM'
          - `sequence` integer — Sequence is the monotonic stamp bumped on every state change that subscription line items need to react to. Read by the plan-price sync; set by the database (DEFAULT nextval) on create and by the price repository on termination / compatibility-affecting edits.
          - `start_date` string, date-time — StartDate is the start date of the price
          - `status` 'published' | 'deleted' | 'archived'
          - `tenant_id` string
          - `tier_mode` 'VOLUME' | 'SLAB'
          - `tiers` PricePriceTier[]
            - `flat_amount` string — flat_amount is the flat amount for the given tier (optional) Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
            - `unit_amount` string — unit_amount is the amount per unit for the given tier
            - `up_to` integer — up_to is the quantity up to which this tier applies. It is null for the last tier. IMPORTANT: Tier boundaries are INCLUSIVE. - If up_to is 1000, then quantity less than or equal to 1000 belongs to this tier - This behavior is consistent across both VOLUME and SLAB tier modes
          - `transform_quantity` PriceJSONBTransformQuantity
            - `divide_by` integer — Divide quantity by this number
            - `round` 'up' | 'down'
          - `trial_period_days` integer — TrialPeriodDays is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)
          - `type` 'USAGE' | 'FIXED'
          - `updated_at` string, date-time
          - `updated_by` string
        - `price_id` string
        - `status` string
      - `status` 'unprocessed' | 'not_found' | 'found' | 'error' | 'processing' | 'attributed'
    - `subscription_line_item_lookup` SubscriptionLineItemLookupResult
      - `error` ErrorsErrorResponse
        - `code` 'http_client_error' | 'system_error' | 'internal_error' | 'not_found' | 'already_exists' | 'version_conflict' | 'validation_error' | 'invalid_operation' | 'permission_denied' | 'database_error' | 'service_unavailable' | 'too_many_requests' | 'not_implemented'
        - `http_status_code` integer
        - `message` string
      - `matched_line_items` MatchedSubscriptionLineItem[]
        - `end_date` string, date-time
        - `is_active_for_event` boolean
        - `price_id` string
        - `start_date` string, date-time
        - `sub_line_item_id` string
        - `subscription_id` string
        - `subscription_line_item` SubscriptionSubscriptionLineItem
          - `addon_association_id` string
          - `billing_period` 'MONTHLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY' | 'QUARTERLY' | 'HALF_YEARLY' | 'ONETIME'
          - `billing_period_count` integer — from price at create; default 1
          - `commitment_amount` string — Commitment fields
          - `commitment_duration` 'MONTHLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY' | 'QUARTERLY' | 'HALF_YEARLY' | 'ONETIME'
          - `commitment_overage_factor` string
          - `commitment_quantity` string
          - `commitment_time_buckets` TypesTimeOfDayBucket[]
            - `commitment_type` 'amount' | 'quantity'
            - `commitment_value` string
            - `end` TypesBucket
              - …
            - `id` string — ID is server-assigned. Stable for the lifetime of the line item; invoice breakdown and analytics responses reference this ID.
            - `overage_factor` number
            - `price_id` string — PriceID is the SUBSCRIPTION-scoped price created at bucket-creation time. Immutable post-create; changing pricing requires a successor line item.
            - `start` TypesBucket
              - …
            - `true_up_enabled` boolean
          - `commitment_true_up_enabled` boolean
          - `commitment_type` 'amount' | 'quantity'
          - `commitment_windowed` boolean
          - `created_at` string, date-time
          - `created_by` string
          - `currency` string
          - `customer_id` string
          - `display_name` string
          - `end_date` string, date-time
          - `entity_id` string
          - `entity_type` 'plan' | 'addon' | 'subscription'
          - `environment_id` string
          - `id` string
          - `invoice_cadence` 'ARREAR' | 'ADVANCE'
          - `metadata` object
          - `meter` MeterMeter
            - `aggregation` MeterAggregation
              - …
            - `created_at` string, date-time
            - `created_by` string
            - `environment_id` string — EnvironmentID is the environment identifier for the meter
            - `event_name` string — EventName is the unique identifier for the event that this meter is tracking It is a mandatory field in the events table and hence being used as the primary matching field We can have multiple meters tracking the same event but with different filters and aggregation
            - `filters` MeterFilter[] — Filters define the criteria for the meter to be applied on the events before aggregation It also defines the possible values on which later the charges will be applied
              - …
            - `id` string — ID is the unique identifier for the meter
            - `name` string — Name is the display name of the meter
            - `reset_usage` 'BILLING_PERIOD' | 'NEVER'
            - `status` 'published' | 'deleted' | 'archived'
            - `tenant_id` string
            - `updated_at` string, date-time
            - `updated_by` string
          - `meter_display_name` string
          - `meter_id` string
          - `plan_display_name` string
          - `price` PricePrice
            - `amount` string — Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50
            - `billing_cadence` 'RECURRING'
            - `billing_model` 'FLAT_FEE' | 'PACKAGE' | 'TIERED'
            - `billing_period` 'MONTHLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY' | 'QUARTERLY' | 'HALF_YEARLY' | 'ONETIME'
            - `billing_period_count` integer — BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12
            - `conversion_rate` string — ConversionRate is the conversion rate of the price unit to the fiat currency
            - `created_at` string, date-time
            - `created_by` string
            - `currency` string — Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp
            - `description` string — Description of the price
            - `display_amount` string — DisplayAmount is the formatted amount with currency symbol For USD: $12.50
            - `display_name` string — DisplayName is the name of the price
            - `display_price_unit_amount` string — DisplayPriceUnitAmount is the formatted amount of the price unit
            - `end_date` string, date-time — EndDate is the end date of the price
            - `entity_id` string — EntityID holds the value of the "entity_id" field.
            - `entity_type` 'PLAN' | 'SUBSCRIPTION' | 'ADDON' | 'PRICE' | 'COSTSHEET'
            - `environment_id` string — EnvironmentID is the environment identifier for the price
            - `group_id` string — GroupID references the group this price belongs to
            - `id` string — ID uuid identifier for the price
            - `invoice_cadence` 'ARREAR' | 'ADVANCE'
            - `lookup_key` string — LookupKey used for looking up the price in the database
            - `metadata` PriceJSONBMetadata
            - `meter_id` string — MeterID is the id of the meter for usage based pricing
            - `min_quantity` string, nullable — MinQuantity is the minimum quantity of the price
            - `parent_price_id` string — ParentPriceID references the root price (always set for price lineage tracking)
            - `price_unit` string — PriceUnit is the code of the price unit (e.g., 'btc', 'eth')
            - `price_unit_amount` string — PriceUnitAmount is the amount of the price unit
            - `price_unit_id` string — PriceUnitID is the id of the price unit (for CUSTOM type)
            - `price_unit_tiers` PricePriceTier[] — PriceUnitTiers are the tiers for the price unit when BillingModel is TIERED
              - …
            - `price_unit_type` 'FIAT' | 'CUSTOM'
            - `sequence` integer — Sequence is the monotonic stamp bumped on every state change that subscription line items need to react to. Read by the plan-price sync; set by the database (DEFAULT nextval) on create and by the price repository on termination / compatibility-affecting edits.
            - `start_date` string, date-time — StartDate is the start date of the price
            - `status` 'published' | 'deleted' | 'archived'
            - `tenant_id` string
            - `tier_mode` 'VOLUME' | 'SLAB'
            - `tiers` PricePriceTier[]
              - …
            - `transform_quantity` PriceJSONBTransformQuantity
              - …
            - `trial_period_days` integer — TrialPeriodDays is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)
            - `type` 'USAGE' | 'FIXED'
            - `updated_at` string, date-time
            - `updated_by` string
          - `price_id` string
          - `price_type` 'USAGE' | 'FIXED'
          - `price_unit` string
          - `price_unit_id` string
          - `quantity` string
          - `start_date` string, date-time
          - `status` 'published' | 'deleted' | 'archived'
          - `subscription_id` string
          - `subscription_phase_id` string
          - `tenant_id` string
          - `updated_at` string, date-time
          - `updated_by` string
        - `timestamp_within_range` boolean
      - `status` 'unprocessed' | 'not_found' | 'found' | 'error' | 'processing' | 'attributed'
  - `event` Event
    - `customer_id` string
    - `environment_id` string
    - `event_name` string
    - `external_customer_id` string
    - `id` string
    - `properties` object
    - `source` string
    - `timestamp` string
  - `processed_events` FeatureUsageInfo[]
    - `customer_id` string
    - `feature_id` string
    - `meter_id` string
    - `price_id` string
    - `processed_at` string, date-time
    - `qty_total` string
    - `sub_line_item_id` string
    - `subscription_id` string
  - `status` 'processed' | 'processing' | 'failed'

## Other responses

- `404` — Not Found
- `500` — Server error

---

[API](https://skmtc.net/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.net/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/versions/f0601ed97bd3/schema)
