Skip to Content
Docs
API referenceManagement API

Billing event types

GET
/billing/event-types

billing.metering.v1.EventTypeService/ListEventTypes (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). The instance's event types, newest first.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Query Parameters

page?integer

Page number, from 1

limit?integer

Items per page, 1 to 100, default 25

status?string

active or archived

origin?string

client or detected

Response Body

A list of event_type objects with pagination

application/json
  1. response
data?array<>
object?string
pagination?

Pagination is the page answered (api-route-review D9).

Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/event-types'
Example Response
{  "data": [    {      "id": "string",      "object": "string"    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}
POST
/billing/event-types

billing.metering.v1.EventTypeService/CreateEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Defines an event type before any event of its key is sent: origin client, validation warn unless given (none, warn or reject), auto_enrich true unless given. Each property is { key, type, required, description }, type string, number or boolean, up to 100. A key already used, detected or defined, is event_type_key_conflict; at the instance's limit of active event types, event_type_limit_reached.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

An event_type 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://api.us.pontive.com/v1/billing/event-types'
Example Response
{  "id": "string",  "object": "string"}
POST
/billing/event-types/infer

billing.metering.v1.EventTypeService/InferEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Takes { event }, one sample event as it would be sent, and answers a draft: the key, and one property per property of the sample with its value's type, each required false. Nothing is saved, so the draft has an empty id, null timestamps, and X-Idempotency-Key is not read; the client edits the draft and creates it.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Response Body

A draft event_type 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://api.us.pontive.com/v1/billing/event-types/infer'
Example Response
{  "id": "string",  "object": "string"}
GET
/billing/event-types/{event_type}

billing.metering.v1.EventTypeService/GetEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). An event type by its etyp_ id or its key. Each property carries its source, types_seen, first_seen_at and last_seen_at, read-only. An unknown one is event_type_not_found.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

event_type*string

The event type's etyp_ id or its key (api-route-review D55)

Response Body

An event_type 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 GET 'https://api.us.pontive.com/v1/billing/event-types/string'
Example Response
{  "id": "string",  "object": "string"}
PATCH
/billing/event-types/{event_type}

billing.metering.v1.EventTypeService/UpdateEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). A field left out keeps its value; the key does not change. properties replaces the whole list: a property left out is removed, one set or changed becomes source client, and [] removes them all. properties, auto_enrich and validation may not be null. Removing a property a meter names, or changing its type away from number where a meter needs one, is event_type_property_in_use.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

event_type*string

The event type's etyp_ id or its key (api-route-review D55)

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

An event_type 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 PATCH 'https://api.us.pontive.com/v1/billing/event-types/string'
Example Response
{  "id": "string",  "object": "string"}
POST
/billing/event-types/{event_type}/archive

billing.metering.v1.EventTypeService/ArchiveEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Refused with event_type_in_use while a meter's current or future version names it. Events of an archived type are accepted with no check and no enrichment.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

event_type*string

The event type's etyp_ id or its key (api-route-review D55)

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

An event_type 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://api.us.pontive.com/v1/billing/event-types/string/archive'
Example Response
{  "id": "string",  "object": "string"}
POST
/billing/event-types/{event_type}/unarchive

billing.metering.v1.EventTypeService/UnarchiveEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). At the instance's limit of active event types, refused with event_type_limit_reached.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

event_type*string

The event type's etyp_ id or its key (api-route-review D55)

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

An event_type 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://api.us.pontive.com/v1/billing/event-types/string/unarchive'
Example Response
{  "id": "string",  "object": "string"}