Skip to main content
GET
Fetch plan instance version

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string<uuid>
required

The unique identifier of the plan instance version in our system.

Response

Schema representing a plan instance version, one state of the charges of a plan instance. Each change of the charges creates a version: the active version is the one that billing uses, and a restore can bring back any of the others.

id
string<uuid>
required

The unique identifier of the plan instance version in our system.

planInstanceId
string<uuid>
required

The unique identifier of the plan instance that the version belongs to.

planVersionId
string<uuid>
required

The unique identifier of the plan version that the version comes from.

versionNumber
integer
required

The number of the version in its plan instance, from 1, one more for each new version.

Required range: x >= 1
isActive
boolean
required

Whether billing uses this version. A plan instance has one active version.

planInstanceVersionReason
enum<string>
required

Why the version exists: created_from_plan_version (it comes from a plan version of the plan), duplicated_from_contract (a copy of a plan instance of another contract), manual_override (an update of the charges of the plan instance), readjustment (a rate adjustment) or rollback (a restore of an earlier version).

Available options:
created_from_plan_version,
duplicated_from_contract,
manual_override,
readjustment,
rollback
metadata
object
required

The details of how the version came to exist, by reason, such as the plan version that it comes from, the version before it or the percentage of a rate adjustment, or null when Aira recorded none.

customFields
object
required

The custom field values that the version was created with. An update of the plan instance sets them, and every other way of creating a version leaves them empty.

Example:
createdAt
string<date-time>
required

The moment when Aira created the version.

planCharges
object[]
required

The plan charges of the version.

A fixed charge: the same amount in every charge period, billed on the invoice that its billing timing names.