Set a feature on a plan
Requires billing:write. Says that a plan carries a feature, and with how much of it. One cell of the pricing matrix.
An upsert, because a screen toggling a cell does not know whether that cell already had a row and should not have to. The feature’s kind decides which number the body may carry, and it is read from the feature rather than taken from you:
boolean— no number at all. It is included or it is not.metered—limitis required.-1is unlimited;0is a real limit, none at all.credit—included_quantityis required: how many units the plan grants per period.
Sending the wrong number for the kind is refused rather than ignored, in both directions.
Autorizações
A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange.
Cabeçalhos
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing. Absent, the session's default organization answers.
Parâmetros de caminho
The plan.
The feature it carries.
Parâmetros de consulta
Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.
live, test Corpo
Resposta
The cell.
One cell of the plan/feature matrix: how much of a feature a plan carries. A feature a plan does not carry is simply absent from the list.
The feature's kind, which decides which of the two numbers below applies.
boolean, metered, credit The ceiling, on a metered feature; null on the other kinds. -1 is unlimited and 0 is a real limit — none at all.
Whether limit is the unlimited sentinel, so a client never has to know the number.
How many credits the plan grants per period, on a credit feature; null otherwise.