Skip to Content
Docs
API referenceManagement API

Billing catalog promotion

GET /v1/billing/catalog

GET
/billing/catalog

billing.catalog.v1.CatalogPromotionService/ExportCatalog (34-billing-catalog.md, Promoting a catalog between instances; API Surface; billing-svc docs/questions.md, P113). The whole catalog as one document keyed by key, never by id: { pontive_document: "billing-catalog/v1", event_types, meters, products, features, pricing_units, rate_cards, packages, catalog_rules } (api-route-review D47), every list in key order, written as billing-svc wrote it. Needs sys:billing:read, and answers while billing is off, as every read does.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Response Body

A billing-catalog/v1 document

application/json
  1. response
Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/catalog'
Example Response
{}
POST
/billing/catalog/import

billing.catalog.v1.CatalogPromotionService/ImportCatalog (34-billing-catalog.md, Promoting a catalog between instances; API Surface; billing-svc docs/questions.md, P113). Body { document, dry_run, effective_at }: document is a billing-catalog/v1 document, passed to billing-svc byte for byte; dry_run is true when omitted, and returns the plan without applying it; with dry_run false the plan is applied in one transaction; effective_at (RFC 3339, default now) is when changed rates start. Answers the catalog_import_plan: dry_run, effective_at, created, changed, unchanged, absent (each { kind, key, fields }) and conflicts ({ kind, key, field, message }). An apply with conflicts is import_conflict, 409, with one details entry per conflict (field ..), and applies nothing. The body may be up to 6 MiB (an import document is at most 5 MB). Needs sys:billing:manage.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Header Parameters

X-Idempotency-Key?string

Idempotency key, read on an apply only

Response Body

A catalog_import_plan 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/catalog/import'
Example Response
{  "id": "string",  "object": "string"}