Skip to Content
Docs
API referenceManagement API

Billing subject states

GET
/billing/subject-state

billing.entitlement.v1.SubjectStateService/GetSubjectState (32-billing-overview.md, API Surface, Subject states; Data Model, Subject state). The subject's current state: its package, every feature it resolves a value for by key ({ type, value } for a boolean or numeric feature, { type, allowance, per, limit, overage, exhausted } for a metered one; billing-svc docs/questions.md, P107), seat_limit, suspended and suspension_cause, with a version that increases on every change. A subject with no state yet answers the defaults with version 0: customer_id, package and seat_limit null, the values of default_features as features (a metered default not exhausted), suspended false. Needs sys:billing:read on the root, and answers while billing is off (billing-svc docs/questions.md, P41). An unknown subject_type is invalid_subject_type; a user or organization not in the instance is subject_not_found. The RPC writes nothing, so X-Idempotency-Key is not read.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Query Parameters

subject_type*string

user, organization or external

subject_id*string

A user's or organization's id, or the client's own external id

Response Body

A subject_state 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/subject-state?subject_type=string&subject_id=string'
Example Response
{  "id": "string",  "object": "string"}