Skip to main content

Document

Document Object

FieldTypeDescription
idsnowflakethe document’s unique identifier
organisation_idsnowflakethe id of the owning organisation
organisationorganisation objectthe owning organisation (full object or partial with only id)
origin_idsnowflake?the id of the document this one was forked from, if any
numberintegersequential number of the document within its organisation
formatted_numberstringhuman‑readable formatted number (e.g. “PRJ‑001”)
titlestringtitle of the document (2‑200 characters)
typedocument type objectthe document’s type (full object or partial with only id)
content_typestringMIME type of the stored content (e.g. application/pdf, text/markdown)
default_branch_idsnowflake?id of the default branch (draft or release)
default_branchdocument branch objectthe default branch (full object or partial with only id)
current_release_tag_idsnowflake?id of the tag that marks the current released version
current_release_tagdocument tag objectthe current release tag (full object or partial with only id)
bookmark_countintegernumber of users who have bookmarked this document
fork_countintegerhow many times the document has been forked
branch_countintegertotal number of branches that exist for this document
open_work_item_countintegercount of open work items linked to the document
closed_work_item_countintegercount of closed work items linked to the document
work_item_types_countobject<snowflake, work item type count>dictionary mapping work‑item‑type ids to their open/closed counts
project_idsnowflake?id of the project this document belongs to
projectproject objectthe owning project (full or partial)
package_idsnowflake?id of the package this document is part of
packagepackage objectthe package (full or partial)
discipline_idsnowflake?id of the discipline associated with the document
disciplinediscipline objectthe discipline (full or partial)
asset_group_idsnowflake?id of the permanent asset group linked to the document
asset_groupasset group objectthe asset group (full or partial, may include extra fields)
asset_idsnowflake?id of the specific asset linked to the document
assetasset objectthe asset (full or partial; if part of an asset‑group, includes group context)
fieldsobject<snowflake, { id:string, name:string?, type:integer, value:any, units:string? }>custom field values keyed by field id; each entry contains the field’s metadata and stored value
created_atISO8601 timestampwhen the document was originally created
created_byuser objectuser who created the document (full or partial)
updated_atISO8601 timestamplast time the document was edited (e.g. a new revision)
updated_byuser objectuser who performed the latest update
accessed_atISO8601 timestamp?moment the document was last accessed via the API, if supplied
trackingobjectoptional tracking information (structure defined by DocumentTrack)
bookmarkobjectoptional bookmark information for the requesting user
permissionsobject<Permission], boolean>permission flags returned for the caller (e.g. VIEW_DOCUMENTS, EDIT_DOCUMENTS)
protection_rulesobjectdocument‑level protection rules (if any)
is_deletedbooleanwhether the document is in a soft‑deleted state
deleted_atISO8601 timestamp?when the document was soft‑deleted
deleted_byuser objectuser who performed the deletion (full or partial)

Document Item Field Object

FieldTypeDescription
idsnowflakethe field’s identifier
organisation_idsnowflakethe identifier of the owning organisation
requiredbooleantrue if a value must be supplied for this field
namestringthe field’s name (2‑200 characters)
descriptionstringa human‑readable description of the field
typeItemFieldTypethe field type identifier (ItemFieldType enum)
unitsstringmeasurement units associated with the field (e.g. “kg”, “m”)
multi_linebooleantrue if the field accepts multi‑line text input
max_length?integer?maximum allowed length of a string value; omitted when not limited
default_valueobjectthe default value for the field (type depends on type)
valuesarray<object>list of enumeration values for fields of type enum (empty if none)
enabledbooleantrue when the field is active and can be used

Document Item Field Enum Value Object

FieldTypeDescription
idsnowflakethe enum value's identifier
valuestringthe textual representation of the enum value
updated_atISO8601 timestampwhen the enum value was last updated
document_field_idsnowflakethe id of the associated document field
updated_byuser objectthe user who performed the last update (contains only id)

Document Branch Object

FieldTypeDescription
idsnowflakethe document branch identifier
organisation_idsnowflakethe id of the organisation that owns the branch
revision_idsnowflakethe id of the document revision this branch points to
revisionobjectthe document revision (partial) referenced by revision_id
namestringthe branch name (2‑256 characters)
protectedbooleanwhether the branch is protected from deletion or modification
commit_countintegernumber of commits made on this branch
created_atISO8601 timestampwhen the branch was created
document_idsnowflakethe id of the document to which this branch belongs
documentdocument objectthe document itself or a partial object containing only its id
created_byuser objectthe user who created the branch (partial – contains only id)
is_deletedbooleantrue if the branch has been soft‑deleted
deleted_at?ISO8601 timestamp?when the branch was soft‑deleted, or null if not deleted
deleted_by?user object?the user who performed the deletion (partial – contains only id), or null

Document Revision Object

FieldTypeDescription
idsnowflakethe revision’s identifier (stringified snowflake)
hashhashSHA‑256 hash of the revision content
document_idsnowflakethe identifier of the parent document
totp_tokenstring?optional one‑time password token supplied by the client
revisionstringthe human‑readable revision label (e.g. “A”, “1.0”)
titlestringthe title of the document at this revision
clause_prefix_formatstring?format string used to build clause prefixes
clause_prefix_idsnowflake?identifier of the prefix entity, if any
clause_digitsinteger?number of digits used for clause numbering
template_namestring?file name of the OOXML document template (if uploaded)
template_hashhash?SHA hash of the stored template file
template_name_xlsxstring?file name of the OOXML spreadsheet template (if uploaded)
template_hash_xlsxhash?SHA hash of the stored OOXML template file
treedocument tree?full document‑tree structure; omitted when a partial response is requested
parentsarray<string>list of parent revision identifiers (stringified snowflakes)
messagestring?short commit message for this revision
signedbooleantrue if the revision was cryptographically signed by its creator
created_byuser objectuser that created the revision
created_atISO8601 timestampcreation time of the revision

Document Type Object

FieldTypeDescription
idsnowflakethe document type's id
organisation_idsnowflakethe id of the organisation
namestringthe type's name (2-20 characters)
descriptionstringa description of the type
last_numberintegerthe largest number currently issued to a document
number_formatstringa string formatter
revision_formatintegerrevision format

Document Revision Sheet Object

Implements Orderable

FieldTypeDescription
revision_idsnowflakethe document revision's id
sheet_idsnowflakethe document sheet's id
namestringthe document sheet's name (2-20 characters)
orderintegerthe order of the sheet within the document

Document Revision Column Object

Implements Orderable

FieldTypeDescription
revision_idsnowflakethe document revision's id
column_idsnowflakethe document sheet's id
namestringthe document column's name (2-20 characters)
descriptionstringa description of the document column
typethe document column's data type
conditional_formattingstringthe conditional formatting condition

Document Revision Clause Object

Implements Orderable

FieldTypeDescription
revision_idsnowflakethe document revision's id
clause_idsnowflakethe document clause's id
textstringthe clause text (maximum 16 MiB including base 64 encoded image data)
fieldslist of document fieldsthe document field values
Document Data Types
Document Data Units
Document Data Formats
ValueNameDescription
0StringString
1DecimalDecimal number format 0.0000
2ScientificScientific notation 0.0000x10^0
3EngineeringScientific notation where the exponent is a multiple of 3 [..., -6, -3, 0, 3, 6, ...]
4TimeInstead of second, expressed in dd:hh:mm:ss
5UnixtimeNumber of seconds or milliseconds since the unix epoch expressed in ISO date format

Document Revision Field Object

FieldTypeDescription
revision_idsnowflakethe document revision's id
field_idsnowflakethe document field's id

Document Merge Request Object

FieldTypeDescription
organisation_idsnowflakethe organisation the merge request belongs to
numberintegera sequential number for the merge request
from_branch_idsnowflakethe branch to merge
to_branch_idsnowflakethe branch to be merged to
workflow_idsnowflakethe workflow that will trigger the merge
useruser objectthe creator of the document merge request
created_atISO8601 timestampwhen the document merge request was created

Revision Format

NameValueDescription
none0No numbering scheme, use this if you issue numbers from another system. This will allow the user to manually assign both the document number and the revision.
zero1This scheme uses the integer numbers starting at 0.
one2This scheme uses the integer numbers starting at 1.
major_minor3This scheme uses a version number of the scheme Major.Minor allowing either the Major or the Minor component to be incremented.
major_minor_revision4This scheme uses a version number of the scheme Major.Minor.Revision allowing either the Major or the Minor component to be incremented. The Revision component is always incremented.
alphabet5This is the default scheme and uses the letters A-Z skipping "I", "O", "Q", "S", "X", "Z". The initial revision is denoted by a dash "-".
alphabet_all6This scheme uses the letters A-Z with the initial revision denoted by a dash "-".

Clause Number Format

NameValueDescription
number0Document number
number_revision1Document number plus revision

Document Presence Object

FieldTypeDescription
session_idsnowflakethe presence record’s unique identifier
user_idsnowflakethe id of the user whose presence is being reported
useruser object?the user object
statusstringcurrent presence state – one of "offline", "online" or "idle"
view_idsnowflake?id of the document view the user is looking at (optional)
sheet_idsnowflake?id of the sheet within the view (optional)
clause_idsnowflake?id of the clause being edited/viewed (optional)
column_idsnowflake?id of the column within the clause (optional)
updated_atISO8601 timestampwhen the presence information was last updated

Document Share Object

FieldTypeDescription
idsnowflakethe share record identifier
documentdocument?the shared document (full object or { "id": "&lt;snowflake&gt;" } )
useruser?the user who is being granted access
organisationorganisation?the organisation that owns the share
typestringthe share type (e.g., "document" )
statusstringcurrent status of the share (e.g., "active", "revoked" )
scope_viewbooleantrue if the recipient may view the document
scope_editbooleantrue if the recipient may edit the document
scope_branchbooleantrue if the recipient may create branches for the document
scope_forkbooleantrue if the recipient may fork the document
scope_revisionsbooleantrue if the recipient may view document revisions
scope_exportbooleantrue if the recipient may export the document
share_to_users_organisationbooleantrue if the share is automatically propagated to all users in the organisation
shared_byuser?the user who created the share record

Create Document

POST /documents

Parameters
FieldTypeDescription
titlestringthe document's title (2 - 200 characters)

Fork Document

POST /documents/{document.id}

This operation will create a fork of the document. The new document will be returned.




Create Document Branch

POST /documents/{document.id}/branches

Parameters
FieldTypeDescription
namestringthe document branch's name (2 - 50 characters)

Create Document Sheet

POST /documents/{document.id}/revisions/{revision.hash}/sheets

This operation will create a new revision on the branch. The new revision will be returned. If the change cannot be merged then an error code will return.


{
"id": 123456,
"hash": abdf12,
"branch": {
"id": 5678,
"name": "draft",
"user": { },
"created_at": "2019-07-01T00:00:00+00:00",
}
}

Parameters
FieldTypeDescription
namestringthe document sheet's name (2 - 20 characters)

List Document Columns

GET /documents/{document.id}/revisions/{revision.hash}/columns

Get a list of columns for this revision of the document. Returns an array of document revision column objects.

Create Document Column

POST /documents/{document.id}/revisions/{revision.hash}/columns

This operation will create a new revision on the branch. The new revision will be returned. If the change cannot be merged then an error code will return.


{
"id": 123456,
"hash": abdf12,
"branch": {
"id": 5678,
"name": "draft",
"user": { },
"created_at": "2019-07-01T00:00:00+00:00"
}
}

Modify Document Column

PATCH /documents/{document.id}/revisions/{revision.hash}/columns/{column.id}

Parameters
FieldTypeDescription
name?stringthe document column's name (2-20 characters)
description?stringa description of the document column
type?the document column's data type
conditional_formatting?stringthe conditional formatting condition

Delete Document Column

DELETE /documents/{document.id}/revisions/{revision.hash}/columns/{column.id}

This operation will delete a column from a revision on the branch and create a new revision on the branch. The new revision will be returned. If the change cannot be merged then an error code will return.

Create Document Clause

POST /documents/{document.id}/revisions/{revision.hash}/clauses

This operation will create a new revision on the branch. The new revision will be returned. If the change cannot be merged then an error code will return.

Parameters
FieldTypeDescription
after?snowflakethe clause to insert the new clause after
before?snowflakethe clause to insert the new clause before

Modify Document Clause

PATCH /documents/{document.id}/revisions/{revision.hash}/clauses/{clause.id}

Parameters
FieldTypeDescription
after?snowflakethe clause to move the clause after
below?snowflakethe clause to move the clause below

Delete Document Clause

DELETE /documents/{document.id}/revisions/{revision.hash}/clauses/{clause.id}

This operation will delete a clause from a revision on the branch and create a new revision on the branch. The new revision will be returned. If the change cannot be merged then an error code will return.

Update Document Field

PATCH /documents/{document.id}/revisions/{revision.hash}/fields

This operation will create a new revision on the branch. The new revision will be returned. If the change cannot be merged then an error code will return.

This operation will cause all calculations to re-calculate.

Parameters
FieldTypeDescription
clause_idsnowflakethe clause the updated field belongs to
column_idsnowflakethe column the updated field belongs to
valuestringthe new value of the field

{
"id": 123450,
"hash": abdf12,
"user": {},
"created_at": "2019-07-01T00:00:00+00:00",
"fields": [
{
"column_id": 123453,
"clause_id": 123454,
"value": "field value",
"background_colour": ""
}
]
}

Get Document Revision

GET /documents/{document.id}/revisions/{revision.hash}

GET /documents/{document.id}/branches/{branch.name}

A document revision can be retrieved either by specifying a specific branch by name to get the latest revison, or by a specific revision's hash.


{
"id": 123450,
"hash" abdf12,
"user" { },
"created_at": "2019-07-01T00:00:00+00:00"
}