List usage events for an invoice line
Trace a usage invoice line back to the billing entries, meter matches, and events that produced it (REV-6228). FK-driven; does not re-rate from live prices. --- **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. - `404 resource_missing` — the referenced resource does not exist or is not visible to your key. **Pagination** Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
Trace a usage invoice line back to the billing entries, meter matches, and events that produced it (REV-6228). FK-driven; does not re-rate from live prices.
Common errors
400 invalid_request— malformed payload or failed validation.401 authentication_error— missing, invalid, expired, or revoked credential. Codes:authentication_failed,invalid_api_key,expired_api_key,api_key_revoked,session_invalid,merchant_required. Carries aWWW-Authenticate: Bearerchallenge.404 resource_missing— the referenced resource does not exist or is not visible to your key.
Pagination
Offset-based with limit (default 25, max 100) and offset. The response pagination block includes total and hasMore. See the pagination guide for SDK auto-paging helpers.
Authorization
apiKey Your RevKeen merchant API key. Create and manage keys in Dashboard → Settings → Developer. Use rk_sandbox_* for staging/test and rk_live_* for production. The same key may be sent as Authorization: Bearer <key> if that suits your HTTP client better. A missing, invalid, expired, or revoked key returns 401 with a WWW-Authenticate: Bearer challenge; a valid key without the required scope returns 403.
In: header
Path Parameters
Invoice line item ID
uuidQuery Parameters
Cursor: return entries with id greater than this value
uuidMax billed entries to return (default 50, max 100)
When true, also return excluded-but-considered decisions for the line period
Response Body
application/json
application/json
application/json
application/json
curl "https://api.revkeen.com/v2/invoice-line-items/11111111-1111-4111-8111-111111111111/usage-events" \
-H "x-api-key: $REVKEEN_API_KEY"{ "object": "list", "data": [ { "outcome": "matched", "exclusion_reason": "string", "entry": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "amount_minor": 0, "precise_amount_minor": "string", "quantity": "string", "currency": "string", "rating_version": 0, "price_id": "5eff5d89-979e-4e4f-aa76-6cbbbf11362c", "price_terms_hash": "string" }, "match": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "meter_id": "1e13adc1-9ac9-453b-b100-17d2f2da2eb8", "meter_definition_version": 0, "aggregation": "string", "resolved_quantity": "string", "unit_of_measure_code": "string" }, "event": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "event_name": "string", "event_time": "2019-08-24T14:15:22Z", "quantity": "string", "idempotency_key": "string" } } ], "has_more": true, "url": "string", "line": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32", "meter_id": "1e13adc1-9ac9-453b-b100-17d2f2da2eb8", "usage_record_id": "90a89d16-1c16-4b07-9de4-90b4d3111430", "unit_amount_minor": 0, "total_amount_minor": 0, "currency": "string", "usage_quantity": "string", "billed_amount_minor_sum": 0 }}Update integration status PUT
Internal endpoint used by the sync worker to update the integration's status and last-sync timestamp after a run. Not intended for dashboard or external callers — requires the internal worker scope and is annotated `x-internal: true`. --- **Related endpoints** - `POST /integrations/{provider}/activate` — Activate integration - `POST /integrations/{provider}/deactivate` — Deactivate integration - `GET /integrations/{provider}` — Get integration status - `POST /integrations/{provider}/test` — Test integration credentials - `POST /integrations/{provider}/rotate` — Rotate integration credentials - `POST /integrations/{provider}/sync` — Trigger manual sync - `POST /integrations/{provider}/invoices/{externalInvoiceId}/refresh` — Refresh a single PracticeHub invoice - `GET /integrations/{provider}/invoices/{externalInvoiceId}/refresh-status` — Get demand invoice refresh status **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. - `404 resource_missing` — the referenced resource does not exist or is not visible to your key. **Idempotency** Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
Add invoice comment POST
Add a comment to an invoice. Set isInternal to true for merchant-only comments. --- **Related endpoints** - `PUT /invoices/external/batch` — Batch upsert invoices by external ID - `GET /invoices` — List invoices - `POST /invoices` — Create invoice - `GET /invoices/{id}` — Get invoice - `PATCH /invoices/{id}` — Update invoice - `DELETE /invoices/{id}` — Delete invoice - `POST /invoices/{id}/margin-estimate` — Estimate invoice net by payment rail - `POST /invoices/{id}/refund` — Refund invoice **Idempotency** Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).