Skip to Content
Docs
API referenceUsage ingest API

Billing usage

POST /v1/usage/events

POST
/v1/usage/events

billing.metering.v1.UsageService/IngestUsageEvents (33-metering.md, API Surface; Ingestion; Event types and schemas). The body is a JSON array of 1 to 500 events. Only non-accepted results are listed, and accepted events with schema warnings: each result carries warnings (an accepted event under the event type's validation warn) and violations (one rejected with schema_mismatch under reject), each { code, property, expected }.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A IngestResult object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X POST 'https://ingest.us.pontive.com/v1/usage/events'
Example Response
{  "id": "string",  "object": "string"}
POST
/v1/usage/events/void

billing.metering.v1.UsageService/VoidUsageEvents (33-metering.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

The VoidUsageEventsResponse fields

application/json
  1. response
Example Request
curl -X POST 'https://ingest.us.pontive.com/v1/usage/events/void'
Example Response
{}