Skip to main content

Get Version

Retrieve one version of a schema graph class by class ID and version number: the exact JSON Schema and field registry IDs active at that point in time.

Retrieve a specific version of a schema graph class by its class ID and integer version number. The response is the exact JSON Schema definition and field composition that was active at that point in the class's evolution, which makes this the endpoint for pinning, exporting, or validating against a historical structure.

Use it when you need determinism: client-side validation against the structure a batch of documents was extracted under, code generation from a known snapshot, or a side-by-side comparison of two versions in a changelog UI.

GET/v1/schema-graph/classes/{id}/versions/{version}

curl

Response

Response fields

idstringVersion UUID.
schema_class_idstringParent schema class UUID.
version_numberintegerVersion number.
json_schemaobjectJSON Schema definition for this version.
field_idsarrayArray of field registry UUIDs included in this version.
created_atstringISO 8601 creation timestamp.

Response

{
  "id": "ver-uuid-2",
  "schema_class_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "version_number": 2,
  "json_schema": {
    "type": "object",
    "properties": {
      "invoice_number": { "type": "string" },
      "vendor": { "type": "string" }
    }
  },
  "field_ids": ["field-uuid-1", "field-uuid-2"],
  "created_at": "2024-08-15T00:00:00.000Z"
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
404not_foundNo schema class with this ID exists for your organization, or the requested version number does not exist.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

The json_schema object is a valid JSON Schema you can use directly for client-side validation or code generation. The field_ids array maps each schema property back to its field registry entry, so you can cross-reference with GET /v1/fields/{id} for extraction instructions and occurrence statistics.

The path takes the integer version number (1, 2, 3), not the version UUID. List the versions first if you do not know which numbers exist.