Billing subject states
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.
BearerAuthAuthorization<token>Access token as "Bearer "
subject_type*stringuser, organization or external
subject_id*stringA user's or organization's id, or the client's own external id
A subject_state object
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X GET 'https://api.us.pontive.com/v1/billing/subject-state?subject_type=string&subject_id=string'{ "id": "string", "object": "string"}