Skip to main content
GET
Retrieve contract
API v2 is in beta. Endpoints return the X-Lago-Endpoint-Status: beta header.
Pass contract_code to retrieve a specific Contract: GET /contracts/{external_id}?contract_code={contract_code}. Several ended Contracts can share the same external_id, so use the code to select the historical record you need. Without a selector, the request returns the pending or active Contract.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

external_id
string
required

External id.

Example:

"external_123"

Query Parameters

expands[]
enum<string>[]

Relationships to include in this response. Only one expansion level is supported. Relationships to include.

Available options:
applied_rate_cards,
plan,
customer,
invoice_custom_sections
contract_code
string

Code of the contract to select. Required when multiple contracts share the external ID, including canceled and terminated contracts. Otherwise, it can be omitted. Omitting it when the external ID is ambiguous returns 422 value_is_mandatory on contract_code; a blank value returns 422 value_is_invalid. Exact contract code.

Minimum string length: 1
Example:

"initial"

Response

Successful response

contract response.

contract
object
required

Contract.