> This page is for version Preview (default).
> For other versions, use one of these documentation indexes:
> - Preview (default): https://docs.preview.paid.ai/preview/llms.txt
> - Current: https://docs.preview.paid.ai/current/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.preview.paid.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.preview.paid.ai/_mcp/server.

# Retrieve an event's lineage

GET https://api.paid.ai/v1/event-lineages/{event}

Returns where one event went in billing: the usage lines it counted on and what it added to each, the invoice and invoice line that bill them, and the credits it spent. When it counted on no line, `notCounted` says why. Lineage covers events received from 2026-08-05. `{event}` takes the event's `evt_` ID. With held transparency enabled, a known held or outdated event is retrieved directly, without a view selector; its stored customer can be null.

Reference: https://docs.preview.paid.ai/api-reference/metering/event-lineages/retrieve

## Authentication

- `Authorization` header (bearer token, required) — API Key authentication using Bearer token

## Request

### Path parameters

- `event` (string, required) — A Paid ID, external ID or resource key, as supported by the referenced resource.

### Headers

- `Paid-Beta` (enum, required) — This endpoint is in the `event_lineage=v1` beta. Send this header to use it.
  - Allowed values: `event_lineage=v1`

## Response

### 200

200

- `object` (enum, required) — The type of object. Always `eventLineage`.
  - Allowed values: `eventLineage`
- `asOf` (datetime, required) — When the lineage was read; billing may add to it later.
- `credits` (list of EventLineageCreditSpend, required) — Every credit spend the event caused.
- `customer` (string, required, nullable) — The customer's `cus_` ID; null when billing never resolved one.
- `event` (string, required) — The event's `evt_` ID.
- `eventName` (string, required) — The event's name, such as `ticket.closed`.
- `history` (list of EventLineageHistoryEntry, required, nullable) — What happened to the event, oldest first: its receipt, each refusal, skip, hold and replay, where it counted and stopped counting, its credit spends and its invoices, and its void with the credits it gave back. Refusals, skips, holds and replays are recorded from November 3, 2026, so an older event's history may leave out retries before it counted. Null in a list; retrieve the event's lineage for its history.
- `livemode` (boolean, required) — `true` for an object on a live account, `false` on a test account.
- `notCounted` (EventLineageNotCounted, required) — Why the event counted on no usage line.
- `partialFailure` (EventLineagePartialFailure, required, nullable) — Why billing refused the event on an order line.
- `receivedAt` (datetime, required) — When Paid received the event. Lineage covers events received from 2026-08-05.
- `status` (enum, required) — `counted` once it counted on a usage line, `notCounted` when it hasn't (`notCounted` says why, including `processing` while billing is still working on it). A meter's event with no product is `notCounted`: `skipped`, or `notProcessed` when received before not-counted outcomes began being recorded on 2026-11-02. More values may be added.
  - Allowed values: `counted`, `notCounted`
- `timestamp` (datetime, required) — When the event occurred, as billing dates it: the event's `timestamp`, else, for a signal sent through the legacy API, a valid `data.historicalTimestamp`, else its receipt. The list's `timestamp[gte]` and `timestamp[lt]` filter on it.
- `usage` (list of EventLineageUsage, required) — Every usage line the event counted on.
- `voided` (boolean, required) — Whether the event was voided. A voided event keeps its lineage: `history` says when, by whom and why, and what credits went back.

## Errors

### 400 Bad Request Error

400

- `error` (ApiErrorObject, required) — What went wrong, in the same shape for every /v1 error.

### 401 Unauthorized Error

401

- `error` (ApiErrorObject, required) — What went wrong, in the same shape for every /v1 error.

### 403 Forbidden Error

403

- `error` (ApiErrorObject, required) — What went wrong, in the same shape for every /v1 error.

### 404 Not Found Error

404

- `error` (ApiErrorObject, required) — What went wrong, in the same shape for every /v1 error.

### 429 Too Many Requests Error

Too many requests. Retry after the `Retry-After` seconds.

- `error` (ApiErrorObject, required) — What went wrong, in the same shape for every /v1 error.

### 500 Internal Server Error

500

- `error` (ApiErrorObject, required) — What went wrong, in the same shape for every /v1 error.

## Types

### EventLineageCreditSpend

Credits the event spent.

- `amount` (string, required) — An exact non-negative credit amount, up to 15 fractional places.
- `chargedAt` (datetime, required) — When the credits were spent.
- `creditCurrency` (string, required) — The credit currency's ID.
- `creditGrant` (string, required, nullable) — The ID of the grant it drew from, or null.
- `customerUnit` (string, required, nullable) — The `cu_` ID of the unit charged, or null.

### EventLineageHistoryEntry

One thing that happened to the event. More types may be added.

- `type`: `received` (received)
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `failed` (failed)
  - `failed` (EventLineageHistoryEntryFailedFailed, required) — The refusal.
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `skipped` (skipped)
  - `occurredAt` (datetime, required) — When it happened.
  - `skipped` (EventLineageHistoryEntrySkippedSkipped, required) — The skip.
- `type`: `held` (held)
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `released` (released)
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `replayed` (replayed)
  - `occurredAt` (datetime, required) — When it happened.
  - `replayed` (EventLineageHistoryEntryReplayedReplayed, required) — The replay.
- `type`: `replaced` (replaced)
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `processed` (processed)
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `noOrderLine` (noOrderLine)
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `notBillable` (notBillable)
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `counted` (counted)
  - `counted` (EventLineageHistoryEntryCountedCounted, required) — The line and what the event added to it, in the line's unit.
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `removed` (removed)
  - `occurredAt` (datetime, required) — When it happened.
  - `removed` (EventLineageHistoryEntryRemovedRemoved, required) — The line it was taken off.
- `type`: `spent` (spent)
  - `occurredAt` (datetime, required) — When it happened.
  - `spent` (EventLineageHistoryEntrySpentSpent, required) — The spend.
- `type`: `invoiced` (invoiced)
  - `invoiced` (EventLineageHistoryEntryInvoicedInvoiced, required) — The invoice that billed it.
  - `occurredAt` (datetime, required) — When it happened.
- `type`: `voided` (voided)
  - `occurredAt` (datetime, required) — When it happened.
  - `voided` (EventLineageHistoryEntryVoidedVoided, required) — The void.
- `type`: `creditsReturned` (creditsReturned)
  - `creditsReturned` (EventLineageHistoryEntryCreditsReturnedCreditsReturned, required) — The credits.
  - `occurredAt` (datetime, required) — When it happened.

### EventLineageNotCounted

Why the event counted on no usage line.

- `type`: `settling` (settling)
- `type`: `failed` (failed)
  - `failed` (EventLineageNotCountedFailedFailed, required) — Why billing refused the event on an order line.
- `type`: `skipped` (skipped)
  - `skipped` (EventLineageNotCountedSkippedSkipped, required) — The skip.
- `type`: `held` (held)
  - `held` (EventLineageNotCountedHeldHeld, required) — The hold.
- `type`: `outdated` (outdated)
  - `outdated` (EventLineageNotCountedOutdatedOutdated, required) — The outdated hold.
- `type`: `noOrderLine` (noOrderLine)
  - `noOrderLine` (EventLineageNotCountedNoOrderLineNoOrderLine, required) — The processing.
- `type`: `aggregated` (aggregated)
  - `aggregated` (EventLineageNotCountedAggregatedAggregated, required) — The aggregation.
- `type`: `notBillable` (notBillable)
  - `notBillable` (EventLineageNotCountedNotBillableNotBillable, required) — The tracking.
- `type`: `reverted` (reverted)
  - `reverted` (EventLineageNotCountedRevertedReverted, required) — The revert.
- `type`: `usageNotRecorded` (usageNotRecorded)
- `type`: `processing` (processing)
- `type`: `notProcessed` (notProcessed)
- `type`: `voided` (voided)
  - `voided` (EventLineageNotCountedVoidedVoided, required) — The void.

### EventLineagePartialFailure

Why billing refused the event on an order line.

- `occurredAt` (datetime, required) — When billing refused it.
- `reason` (string, required) — Billing's reason, in its own words as it recorded the refusal, as in `history`. When billing no longer keeps that record, a short summary of the reason.
- `step` (enum, required) — Where billing refused the event: the check that failed, or `unrecorded` when it failed without saying where. More values may be added.
  - Allowed values: `validation`, `product`, `customer`, `user`, `order`, `orderLine`, `postActions`, `creditSpend`, `unrecorded`

### EventLineageUsage

A usage line the event counted on. `quantity` is what the event added, in the line's unit: the event data field it sums, such as `pages`, or `event` when each event counts once.

- `countedAfterInvoice` (boolean, required) — `true` when the event was counted after the invoice was issued, so it is not on that invoice.
- `invoice` (string, required, nullable) — The `inv_` ID of the invoice billing the line, or null.
- `invoiceLine` (string, required, nullable) — The `invl_` ID of the invoice line, or null.
- `orderLine` (string, required, nullable) — The order line's `ordl_` ID; null for a line created before order lines had one.
- `period` (EventLineageUsagePeriod, required) — The usage period the event counted in.
- `quantity` (EventLineageQuantity, required) — The quantity this event added, exact to 15 decimal places as billing counted it. Null when it is part of an aggregate settlement whose quantity belongs to the whole cell.
- `status` (enum, required) — `collecting` while the period is open, `billed` once it's on an invoice, `skipped` when it settled with nothing to bill; null when billing has no record of the period.
  - Allowed values: `collecting`, `billed`, `skipped`
- `usageLine` (string, required) — The usage line's `ul_` ID: one priced order line in one billing period.
- `settlement` (string, optional, nullable) — Opaque reference to the settlement that counted this event in aggregate; null for a per-event contribution. No quantity is allocated to an individual member.

### ApiErrorObject

What went wrong, in the same shape for every /v1 error.

- `code` (string, required) — A stable, machine-readable code for this error. New codes may be added at any time. See [Errors](https://docs.paid.ai/preview/developers/api/errors) for what each one means and how to fix it. - `unauthorized`: The API key is missing, malformed, revoked or expired. - `session_revoked`: The session behind this token has been signed out. - `forbidden`: The credentials are valid but cannot access this account. - `insufficient_scope`: The API key's scopes do not cover this endpoint. - `user_required`: Only a person signed in to Paid can do this, not an API key: it sends email for the account or acts on its behalf. - `customer_key_forbidden`: A customer-scoped API key called an endpoint it cannot use. - `organization_required`: The request did not say which account it is for. - `auth_context_error`: Paid could not load the account for these credentials. - `invalid_version`: The API version is malformed or not a released version. - `rollback_window_expired`: The account tried to move its pinned version back after the rollback window closed. - `unknown_beta`: `Paid-Beta` names a beta that does not exist, or is malformed. - `beta_not_enabled`: The account is not enrolled in this private beta. - `beta_header_required`: A beta endpoint or field was used without opting in. - `invalid_idempotency_key`: `Idempotency-Key` is empty, longer than 255 characters, or not printable ASCII. - `idempotency_key_reused`: The `Idempotency-Key` was already used with a different request. - `idempotency_request_in_progress`: A request with this `Idempotency-Key` is still running. - `validation_error`: The request body or parameters failed validation. - `invalid_json`: The request body is not valid JSON. - `payload_too_large`: The request body exceeds 10 MB. - `resource_missing`: No resource or path matches the request. - `type_mismatch`: A polymorphic field's `type` doesn't match the sub-object sent with it, or more than one sub-object was sent. `param` names the field. - `reference_not_found`: A reference in the body or query string doesn't name a resource on the account. `param` names the field, e.g. `customer` or `lines[0].price`. - `resource_archived`: A resource the request names is archived, so it can't be used for this. `param` names the field; it's empty when the archived resource is the one in the path. - `resource_not_active`: A resource the request names isn't active: it's still a draft, has ended or was deactivated. `param` names the field. - `status_conflict`: The action can't run on the object in the path from its current `status`, e.g. activating an active order or releasing a captured hold. `message` names the status and the statuses the action needs. - `resource_in_use`: The resource can't be archived or changed this way while other resources still use it. `param` names the field when there is one. - `resource_exists`: A resource with this identifier (an `externalId`, `key` or alias) already exists on the account, ignoring letter case. `param` names the field. - `customer_mismatch`: A resource the request names belongs to a different customer than the one the request is for. `param` names the field. - `internal_error`: Something went wrong on Paid's side. - `currency_not_supported`: `currency` is not enabled on the account. - `currency_locked`: The customer has an order, so its `currency` cannot change. - `customer_has_active_orders`: The customer cannot be archived while it has an activating, active or paused order. - `parent_livemode_mismatch`: `parent` names a customer in the other mode: live for a test key, or test for a live key. - `parent_has_parent`: Parents are one level deep: the named parent has a parent of its own, or the customer being given a parent has children. - `parent_cycle`: `parent` names the customer itself, or, for a customer unit, the unit itself or a unit under it. - `has_active_children`: The customer cannot be archived while it is the `parent` of a customer that is not archived, or the customer unit while it has units under it that are not archived. - `tax_provider_not_connected`: Tax cannot be enabled while no tax provider is connected. - `mixed_tax_codes`: A prepaid commit taxed at purchase is scoped to products with different tax codes, so its invoice has no single code. - `tax_provider_unavailable`: The tax provider could not be reached, so the tax code could not be checked against its catalog. - `immutable_field`: An update tried to change a field that can't change after creation, such as a rate, a key or a reference. - `currency_mismatch`: An amount or reference isn't in the currency the request needs, such as an order's currency. - `limit_exceeded`: The request has more items than the resource allows, such as rates, adjustments, filters or outcomes. - `forfeit_confirmation_required`: Ending this would forfeit a remaining balance, and `forfeitRemaining` wasn't `true`. - `external_id_scopes_meter`: The product's `externalId` can't change while a meter is scoped to it, because the meter matches on that ID. - `percent_of_base_missing`: A percent-of line names prices in `of.lines` that aren't on the order. - `outcome_not_allowed`: `usage.outcome` was sent for an events meter, which has no outcomes. - `meter_not_priceable`: The meter can't be priced on its own: it has `groupBy`, or uses a dashboard-only feature. - `price_in_active_plan`: The price can't be archived while an active plan lists it. - `ambiguous_match`: Two rates match the same dimension values with equal specificity, so rating couldn't choose between them. - `meter_already_priced`: One measure would be priced by both a price and a rate card on the same order. - `no_common_currency`: The plan's lines share no currency. - `default_requires_upgrade_path`: `default: true` was sent on a plan with no `upgradePath`. - `plan_legacy`: The plan was converted from v2 without v1 prices, so it can't be used on a v1 order. - `upgrade_path_position_taken`: Another plan already has this `position` in the upgrade-path `group`. - `quantity_not_allowed`: A line has a `quantity`, but its price has no `unit` (a usage price or flat fee). - `quantity_out_of_range`: A `quantity` is outside the price's or line's `quantityLimits`. - `quantity_limits_wider_than_price`: A line's `quantityLimits` are wider than its price's. - `interval_mismatch`: A recurring price's interval neither divides the order's billing cycle evenly nor is a whole multiple of it. - `line_not_on_order`: An amendment change names a line from another order. - `no_material_changes`: The amendment's changes leave the order as it is. - `usage_billing_behind`: Usage for a past period hasn't been billed yet, so the usage line can't be replaced now. - `seats_exceed_quantity`: The new quantity is below the line's active seats. - `order_ambiguous`: Several orders share this `externalId`, so it can't name one of them. - `order_version_mismatch`: The order changed since the `expectedVersion` sent. - `preview_stale`: The order changed after the amendment was previewed. - `billing_unavailable`: Billing couldn't be reached to preview or apply the change. Nothing changed. - `commit_conflict`: The invoiced minimum overlaps another on the order in both time and scope. - `duplicate_outcome_key`: Two outcomes, or an outcome and `catchAll`, share a key. - `single_event_field_not_allowed`: A single-event meter sent a field only workflows or event aggregation use, such as `identifier`, `close` or `aggregation`. - `alias_unit_conflict`: `customer` is an alias of one unit and `customerUnit` names a unit outside its subtree. - `workflow_unit_conflict`: The event names a different customer unit from the open workflow it joins. - `incompatible_unit`: A strict meter reads a Quantity whose unit can't be converted to the meter's unit. - `unknown_provider`: Paid's model catalog doesn't know the inference provider. - `unknown_model`: Paid's model catalog doesn't know the model. - `range_too_large`: The range is longer than `granularity` allows. - `misaligned_range`: `startsAt` or `endsAt` doesn't fall on a bucket boundary in `timezone`. - `depth_exceeded`: The unit, or a moved subtree, would go below 16 levels. - `root_unit_immovable`: An update tried to move the customer's root unit. - `root_unit_always_billable`: A create or update tried to make the root unit non-billable. - `has_active_cap`: The unit can't be archived while it has an active spend cap. - `has_active_seat`: The unit can't be archived while it holds an active seat, or the customer is billed per seat, so its units can't be created, changed or archived. - `alias_held_by_draft_customer`: The alias value is a draft customer's external ID: usage sent under it before the alias existed made that draft. - `alias_system_managed`: The alias was made by Paid, when a customer's `externalId` changed or from a SalesBricks buyer, so it can't be updated, archived, unarchived or deleted. It has `systemManaged: true`. - `draft_has_billing`: The draft customer to merge has credit grants, pending spends or other billing postings. - `price_not_on_order`: `price` isn't on the order. - `price_not_seat_based`: `price` isn't a recurring price with `seats`. - `customer_unit_not_billable`: The customer unit has `effectiveBillable: false`, so it can't hold a seat. - `seat_limit_reached`: The seat line is full: a purchased line has `quantity` active seats, or an assigned line reached `quantityLimits.maximum`. - `unit_already_has_seat`: The unit already holds an active seat for this product. - `refill_rollover_conflict`: The grant sets both `refill` and `rollover`. - `credit_currency_key_reserved`: The credit currency `key` is an ISO 4217 currency code. - `insufficient_credits`: The customer's spendable balance in the credit currency doesn't cover the hold. Nothing was reserved. - `price_not_one_time`: The auto top-up's `price` isn't a one-time price. - `price_grants_mismatch`: The auto top-up's `price` doesn't grant the rule's credit currency. - `payment_method_required`: `collection: "chargeAutomatically"` was set, but there is no card to charge: the customer has no payment method on file, or the one named (or the default) is a bank transfer account. - `auto_top_up_conflict`: The customer already has an enabled auto top-up for this credit currency. - `invalid_request`: The request was rejected. - `not_found`: The requested resource does not exist. - `conflict`: The request conflicts with the resource's current state. - `rate_limited`: Too many requests in too short a time. - `api_error`: An unexpected error.
- `docUrl` (string, required) — A link to this code's entry on the errors page, or to the page itself for an undocumented code.
- `message` (string, required) — A human-readable explanation of what went wrong.
- `requestId` (string, required) — The ID of the request, also returned in the `Request-Id` header. Include it when contacting support.
- `type` (enum, required) — The category of error.
  - Allowed values: `invalid_request_error`, `authentication_error`, `permission_error`, `idempotency_error`, `rate_limit_error`, `api_error`
- `param` (string, optional) — The request field or header the error relates to, when there is one.

### EventLineageHistoryEntryFailedFailed

The refusal.

- `reason` (string, required, nullable) — Billing's reason, in plain words; null once billing no longer keeps it (90 days).
- `step` (enum, required) — Where billing refused the event: the check that failed, or `unrecorded` when it failed without saying where. More values may be added.
  - Allowed values: `validation`, `product`, `customer`, `user`, `order`, `orderLine`, `postActions`, `creditSpend`, `unrecorded`

### EventLineageHistoryEntrySkippedSkipped

The skip.

- `reason` (string, required, nullable) — Why billing skipped it; null once billing no longer keeps it (90 days).

### EventLineageHistoryEntryReplayedReplayed

The replay.

- `trigger` (enum, required) — What replayed it: `operation` a reprocessing run, such as a backfill after a fix, `orderActivation` its order activating, `other` anything else. More values may be added.
  - Allowed values: `operation`, `orderActivation`, `other`

### EventLineageHistoryEntryCountedCounted

The line and what the event added to it, in the line's unit.

- `orderLine` (string, required, nullable) — The order line's `ordl_` ID; null for a line created before order lines had one.
- `quantity` (EventLineageHistoryQuantity, required) — What the event added to the line, exact to 15 decimal places as billing counted it; null when billing counted it in aggregate.
- `usageLine` (string, required, nullable) — The usage line's `ul_` ID; null for a line the event no longer counts on, whose period billing doesn't keep.

### EventLineageHistoryEntryRemovedRemoved

The line it was taken off.

- `orderLine` (string, required, nullable) — The order line's `ordl_` ID; null for a line created before order lines had one.
- `usageLine` (string, required, nullable) — The usage line's `ul_` ID; null for a line the event no longer counts on, whose period billing doesn't keep.

### EventLineageHistoryEntrySpentSpent

The spend.

- `amount` (string, required) — An exact non-negative credit amount, up to 15 fractional places.
- `creditCurrency` (string, required) — The credit currency's ID.

### EventLineageHistoryEntryInvoicedInvoiced

The invoice that billed it.

- `invoice` (string, required, nullable) — The invoice's `inv_` ID.
- `invoiceLine` (string, required, nullable) — The invoice line's `invl_` ID.
- `usageLine` (string, required) — The usage line's `ul_` ID: one priced order line in one billing period.

### EventLineageHistoryEntryVoidedVoided

The void.

- `by` (enum, required) — Who voided it: `apiKey` a call with one of your API keys, `dashboardUser` someone in your dashboard, `staff` Paid's support team, `system` Paid itself. More values may be added.
  - Allowed values: `apiKey`, `dashboardUser`, `staff`, `system`
- `chargesVoided` (boolean, required) — Whether the void also voided the charges the event fed, rather than the event alone.
- `reason` (string, required, nullable) — The reason given for the void, or null.

### EventLineageHistoryEntryCreditsReturnedCreditsReturned

The credits.

- `amount` (string, required) — An exact non-negative credit amount, up to 15 fractional places.
- `creditCurrency` (string, required) — The credit currency's ID.
- `forfeited` (boolean, required) — False for credits given back to the grant they were spent from. True for credits the grant could not take back, because it had ended or expired: they are lost.

### EventLineageNotCountedFailedFailed

Why billing refused the event on an order line.

- `occurredAt` (datetime, required) — When billing refused it.
- `reason` (string, required) — Billing's reason, in its own words as it recorded the refusal, as in `history`. When billing no longer keeps that record, a short summary of the reason.
- `step` (enum, required) — Where billing refused the event: the check that failed, or `unrecorded` when it failed without saying where. More values may be added.
  - Allowed values: `validation`, `product`, `customer`, `user`, `order`, `orderLine`, `postActions`, `creditSpend`, `unrecorded`

### EventLineageNotCountedSkippedSkipped

The skip.

- `occurredAt` (datetime, required) — When billing skipped it.
- `reason` (string, required) — Why billing skipped it.

### EventLineageNotCountedHeldHeld

The hold.

- `heldAt` (datetime, required) — When billing started holding it.
- `identifier` (string, required) — The customer unit identifier the event was sent with, which has not resolved yet.
- `expiresAt` (datetime, optional) — When the hold becomes eligible to be marked outdated, 90 days after receipt. The event stays held until that transition is recorded.

### EventLineageNotCountedOutdatedOutdated

The outdated hold.

- `expiresAt` (datetime, required) — When the hold became eligible to be marked outdated, 90 days after receipt.
- `heldAt` (datetime, required) — When billing started holding it.
- `identifier` (string, required) — The unresolved customer unit identifier the event was sent with.
- `outdatedAt` (datetime, required) — When the hold was recorded as outdated.

### EventLineageNotCountedNoOrderLineNoOrderLine

The processing.

- `occurredAt` (datetime, required, nullable) — When billing processed it; null when billing did not record the time.

### EventLineageNotCountedAggregatedAggregated

The aggregation.

- `reason` (enum, required) — Why events can't be traced one at a time: an aggregate meter prices the line, the line is billed at settlement, the line has usage billing cannot trace to events, or a meter's inputs could not be resolved. More values may be added.
  - Allowed values: `aggregateMeter`, `settlementOnly`, `untracedUsage`, `unresolvedMeterInputs`

### EventLineageNotCountedNotBillableNotBillable

The tracking.

- `occurredAt` (datetime, required) — When billing tracked it.

### EventLineageNotCountedRevertedReverted

The revert.

- `revertedAt` (datetime, required) — When billing took it off its last line.

### EventLineageNotCountedVoidedVoided

The void.

- `voidedAt` (datetime, required) — When the event was voided.

### EventLineageUsagePeriod

The usage period the event counted in.

- `endsAt` (datetime, required, nullable) — End of the usage period; null when billing has no record of it.
- `startsAt` (datetime, required) — Start of the usage period.

### EventLineageQuantity

The quantity this event added, exact to 15 decimal places as billing counted it. Null when it is part of an aggregate settlement whose quantity belongs to the whole cell.

- `unit` (string, required) — What `value` is measured in: a time unit such as `minute` or `month`, or what a meter counts, such as `token` or `ticket`.
- `value` (string, required) — A non-negative exact decimal string, up to 15 fractional places.

### EventLineageHistoryQuantity

What the event added to the line, exact to 15 decimal places as billing counted it; null when billing counted it in aggregate.

- `unit` (string, required) — What `value` is measured in: a time unit such as `minute` or `month`, or what a meter counts, such as `token` or `ticket`.
- `value` (string, required) — A non-negative exact decimal string, up to 15 fractional places.

## Examples

**Response**

```json
{
  "object": "eventLineage",
  "asOf": "2024-01-15T09:30:00Z",
  "credits": [
    {
      "amount": "string",
      "chargedAt": "2024-01-15T09:30:00Z",
      "creditCurrency": "string",
      "creditGrant": "string",
      "customerUnit": "string"
    }
  ],
  "customer": "string",
  "event": "string",
  "eventName": "string",
  "history": [
    {
      "type": "received",
      "occurredAt": "2024-01-15T09:30:00Z"
    }
  ],
  "livemode": true,
  "notCounted": null,
  "partialFailure": {
    "occurredAt": "2024-01-15T09:30:00Z",
    "reason": "string",
    "step": "validation"
  },
  "receivedAt": "2024-01-15T09:30:00Z",
  "status": "counted",
  "timestamp": "2024-01-15T09:30:00Z",
  "usage": [
    {
      "countedAfterInvoice": true,
      "invoice": "string",
      "invoiceLine": "string",
      "orderLine": "string",
      "period": {
        "endsAt": "2024-01-15T09:30:00Z",
        "startsAt": "2024-01-15T09:30:00Z"
      },
      "quantity": {
        "unit": "month",
        "value": "1"
      },
      "status": "collecting",
      "usageLine": "string",
      "settlement": "string"
    }
  ],
  "voided": true
}
```

**SDK Code**

```python
import requests

url = "https://api.paid.ai/v1/event-lineages/event"

headers = {
    "Paid-Beta": "event_lineage=v1",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.paid.ai/v1/event-lineages/event';
const options = {
  method: 'GET',
  headers: {'Paid-Beta': 'event_lineage=v1', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.paid.ai/v1/event-lineages/event"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Paid-Beta", "event_lineage=v1")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.paid.ai/v1/event-lineages/event")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Paid-Beta"] = 'event_lineage=v1'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.paid.ai/v1/event-lineages/event")
  .header("Paid-Beta", "event_lineage=v1")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.paid.ai/v1/event-lineages/event', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Paid-Beta' => 'event_lineage=v1',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.paid.ai/v1/event-lineages/event");
var request = new RestRequest(Method.GET);
request.AddHeader("Paid-Beta", "event_lineage=v1");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Paid-Beta": "event_lineage=v1",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.paid.ai/v1/event-lineages/event")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```