Skip to content

Get contract file

Request

Retrieve information about a file on a contract

Path
contractIdinteger, (int32)required

The system identifier for the contract

Example:5348
fileIdinteger, (int32)required

The system identifier for the file

Example:9456
const contractId = '5348';
const fileId = '9456';
const resp = await fetch(
  `https://api-sandbox.lawvu.com/v2/contracts/${contractId}/files/${fileId}`,
  {method: 'GET'}
);

const data = await resp.text();
console.log(data);

Responses

OK

Bodyapplication/json
idinteger or null, (int32)read-only

The system identifier for the file

Example:9456
namestring or null

The user defined name of the file resource For file resources with a type of file this includes the file extension

Example:"Standard NDA.docx"
displayIdstring or nullread-only

A system generated identifier of the file resource. Also known as "Document ID"

Example:"LV0001-0000123.1"
typestring or null(FileType)read-only

The type of file resource

Enum:"File""Folder""ContractDocument"
Example:"File"
folderobject or null(FolderReference)

The folder where the file resource is located

Folder is null when the file resource is located at the root of the resource

contentTypestring or nullread-only

The content type of the file binary

Example:"text/plain"
resourceobject or null(ResourceReference)read-only

The resource where the file resource is located within

restrictedboolean or nullread-only

Is the file resource access restricted

Default:false
Example:false
sizeinteger or null, (int64)read-only

The size of the file binary in bytes

Example:18139
versioninteger or null, (int32)read-only

The version of the file

Example:3
createdobject or null(AuditableUserReference)read-only

The user who created the file resource and when

modifiedobject or null(AuditableReference)read-only

The username who modified the file resource and when

Response
{ "id": 9456, "name": "Standard NDA.docx", "displayId": "LV0001-0000123.1", "type": "File", "folder": { "folder": {}, "id": 786, "name": "Drafts" }, "contentType": "text/plain", "resource": { "id": 78914, "type": "Contract" }, "restricted": false, "size": 18139, "version": 3, "created": { "dateUtc": "2024-12-25T00:00:00Z", "user": {}, "userName": "api.developer@lawvu.com" }, "modified": { "dateUtc": "2024-12-25T00:00:00Z", "userName": "api.developer@lawvu.com" } }