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

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

apply_taxes
boolean
default:true

Apply taxes. Whether to include tax calculation.

Example:

true

rate_card_code
string

Rate card code. Exact code.

Example:

"example_code"

product_code
string

Product code. Exact code.

Example:

"example_code"

product_filter_code
string

Product filter code. Exact code.

Example:

"example_code"

product_type
enum<string>

Product type. Type of product. Metered products require a billable metric; fixed products must not reference one.

Available options:
metered,
fixed
Example:

"metered"

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

current usage response.

current_usage
object
required

Current usage across the contract open billing windows. This is not a preview of one invoice.