Documents: GetDocument

Returns information about a document in a room. You can optionally request the contents of the document, which is returned in base64-encoded format.

To find the documentId of the document that you want to retrieve, use the Rooms::GetDocuments method.

Request

HTTP request

GET /restapi/v2/accounts/{accountId}/documents/{documentId}

Parameters

Parameter NameValueDescription
Path Parameters
documentIdinteger

(Required) The id of the document.

accountIdstring

(Required) The id of the account.

Optional Query Parameters
includeContentsboolean

(Optional) When set to true, includes the contents of the document in the base64Contents property of the response. The default value is false.

Responses

CodeDescriptionReference
200

Document successfully retrieved.

Document
400

Bad request. See ErrorCode and Message for details

ApiError
401

Not authorized to make this request.

ApiError

SDK Method

Documents::GetDocument

Definitions

ApiError

This object describes errors that occur. It is valid only for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

Document

Contains information about a document.

documentIdinteger

The id of the document.

namestring

The file name associated with the document.

roomIdinteger

The id of the room associated with the document.

ownerIdinteger

The id of the user who owns the document.

sizeinteger

The size of the document in bytes.

folderIdinteger

The id of the folder that holds the document.

createdDatestring

The date and time when the document was created. This is a read-only value that the service assigns.

Example: 2019-11-11T17:15:14.82

isSignedboolean

When set to true, indicates that the document is signed.

base64Contentsstring

The base64-encoded contents of the document. This property is only included in the response when you use the includeContents query parameter and set it to true.

}} />