create
Because
code has no flag, create Contracts with --input and the full {"contract": {...}} body. --input ignores the other body flags. CLI v1.3.0 also lists a --billing-time flag from its pinned spec. The API no longer accepts billing_time on Contracts, so leave it out.
Overrides
Only pending Contracts accept changes to applied rate cards and phases. An active Contract’s pricing is fixed. Override pricing per Contract with--rate-override on its rate phases: rate_model, rate_properties and optionally the billing interval. Structural fields such as currency, billing_timing and proration are not overridable. On update, --rate-override null removes the override.
Current usage
current-usage returns current_usage with totals and one entry per rate card: units, events_count, amount_cents, the rate phase and the billing window. Filter by --rate-card-code, --product-code, --product-filter-code or --product-type. --apply-taxes false leaves taxes out. A pending Contract has no usage. Totals can span several future invoices.
Endpoints newer than CLI v1.3.0
The live API has endpoints that CLI v1.3.0 does not generate. Reach them withlago api:
- Retrieve a specific Contract by code, including after it ends:
GET /api/v2/contracts/{external_id}?contract_code={code}. - Draft Contracts and
POST /api/v2/contracts/{external_id}/publish. - Contract alerts under
/api/v2/contracts/{external_id}/alerts.