Skip to main content
API v2 is in beta. Endpoints return the X-Lago-Endpoint-Status: beta header.

Contract.

lago_id
string<uuid>
required

Unique identifier created by Lago.

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

external_id
string
required

External id.

Example:

"example"

code
string | null
required

Immutable contract code. Null for existing contracts created without a code.

Example:

"initial"

lago_customer_id
string<uuid>
required

Customer identifier created by Lago.

Example:

"1a901a90-1a90-1a90-1a90-1a901a901a90"

external_customer_id
string
required

External customer identifier.

Example:

"customer_123"

name
string | null
required

Name.

Example:

"example"

plan_code
string | null
required

Optional plan code. Plan-less contracts use directly attached rate cards.

Example:

"standard"

status
enum<string>
required

Lifecycle status. A draft never bills until it is published.

Available options:
draft,
pending,
active,
terminated,
canceled
Example:

"pending"

consolidate_invoice
boolean
required

Consolidate invoice.

Example:

false

purchase_order_number
string | null
required

Purchase order number.

Example:

"example"

billing_anchor_date
string<date> | null
required

Optional billing anchor.

Example:

null

effective_billing_anchor_date
string<date> | null
required

Resolved billing anchor.

Example:

null

skip_invoice_custom_sections
boolean
required

Skip invoice custom sections.

Example:

false

started_at
string<date-time> | null
required

Started at.

Example:

null

ended_at
string<date-time> | null
required

Ended at.

Example:

null

terminated_at
string<date-time> | null
required

Terminated at.

Example:

null

canceled_at
string<date-time> | null
required

Canceled at.

Example:

null

created_at
string<date-time>
required

UTC creation timestamp, with microsecond precision.

Example:

"2022-04-29T08:59:51.123456Z"

updated_at
string<date-time>
required

UTC timestamp of the last update, with microsecond precision.

Example:

"2022-04-29T08:59:51.123456Z"

applied_rate_cards
object[]

Present only with expands[]=applied_rate_cards.

plan
object | null

Present only with expands[]=plan.

customer
object

Present only with expands[]=customer.

invoice_custom_sections
object[]

Present only with expands[]=invoice_custom_sections.