Skip to content

Overview of Entity Versioning

Some entities in Invora support versioning to track changes over time. This enables retrieving historical versions or querying data as of a specific point in time.

KeyVersion

Versioned entities include an id object with the following fields:

{
  "id": {
    "versionId": "9c8b7...",
    "key": "INV-001",
    "version": 3
  }
}
  • versionId: Unique identifier for a specific version of the entity.
  • key: Logical identifier that remains constant across all versions of the same entity.
  • version: Sequential version number starting from 0.

Querying by Time

Use timeReference in list endpoints to query data as it existed at a specific time or to return historical versions.

{
  "filter": {
    "timeReference": {
      "referenceDate": "2024-01-01T00:00:00Z",
      "historicalData": false
    }
  }
}
  • Set referenceDate to a timestamp to get the state at that time.
  • Set historicalData to true to return all versions over time. Group by id.key in your application if needed.