Skip to main content
GET
/
v1beta
/
versions
/
{version_id}
/
record
TypeScript
import { Factify } from "@factify/sdk";

const factify = new Factify({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await factify.versions.getRecord({
    versionId: "ver_01h2abcd1234efgh5678jkmnpt",
  });

  console.log(result);
}

run();
{
  "document": {
    "layout": {
      "bindings": [
        {
          "table": {
            "column_widths_mm": [
              123
            ],
            "width_mode": "TABLE_WIDTH_MODE_UNSPECIFIED"
          },
          "fragments": [
            {
              "bounding_box": {
                "height": 123,
                "width": 123,
                "x": 123,
                "y": 123
              },
              "page_number": 123,
              "rotation_degrees": 123
            }
          ],
          "path": {
            "segments": [
              {
                "block": 123
              }
            ]
          }
        }
      ],
      "defaults": {
        "dimensions": {
          "height_mm": 123,
          "width_mm": 123
        },
        "direction": "DIRECTION_UNSPECIFIED",
        "margins": {
          "bottom_mm": 123,
          "left_mm": 123,
          "right_mm": 123,
          "top_mm": 123
        },
        "orientation": "ORIENTATION_UNSPECIFIED",
        "page_size": "PAGE_SIZE_UNSPECIFIED"
      },
      "extracted_at": "2023-11-07T05:31:56Z",
      "pages": [
        {
          "dimensions": {
            "height_mm": 123,
            "width_mm": 123
          },
          "orientation": "ORIENTATION_UNSPECIFIED",
          "page_number": 123
        }
      ],
      "record_id": "<string>",
      "source": {
        "attributes": {},
        "ingested_at": "2023-11-07T05:31:56Z",
        "remote_id": "<string>",
        "source_id": "<string>"
      }
    },
    "record": {
      "blocks": [
        {
          "code_block": {
            "code": "<string>",
            "language": "<string>"
          },
          "attributes": {},
          "id": "<string>"
        }
      ],
      "id": "<string>",
      "metadata": {
        "attributes": {},
        "extracted_at": "2023-11-07T05:31:56Z",
        "language": "<string>",
        "title": "<string>"
      },
      "source": {
        "attributes": {},
        "ingested_at": "2023-11-07T05:31:56Z",
        "remote_id": "<string>",
        "source_id": "<string>"
      }
    }
  },
  "id": "019d3b1b-c4a7-7376-b6f9-229f44354d27",
  "source_format": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

version_id
string
required

Version ID to retrieve the record for. Pattern: ver_[0-9a-hjkmnp-tv-z]{26}

Pattern: ^ver_[0-9a-hjkmnp-tv-z]{26}$
Example:

"ver_01h2abcd1234efgh5678jkmnpt"

Response

Success

GetRecordResponse contains the processed content and layout for a version. The content oneof is populated based on source_format:

  • document formats (pdf, docx, markdown): document field
  • spreadsheet formats (xlsx, csv): spreadsheet field
document
document · object
required

Populated for pdf, docx, and markdown formats.

id
string

Unique record ID (UUID format).

Example:

"019d3b1b-c4a7-7376-b6f9-229f44354d27"

source_format
string

Source format of the original upload (e.g., pdf, docx, xlsx, csv).