Upload document or create folder


post https://api.trivi.com/v2/documents/{documentItemUniqueId}

Document upload

Uploads a new document. Use the multipart request.

Body example:

Content-Type: multipart/related; boundary=boundary123
Content-Length: [NUMBER_OF_BYTES_IN_ENTIRE_REQUEST_BODY]

--boundary123
Content-Type: application/json; charset=UTF-8

{
    "name": "Document Name.pdf",
		... see DocumentItem object ...
}

--boundary123
Content-Type: application/pdf

[PDF_DATA]
--boundary123--

Maximum file size is 20 MB

Folder creating

Path Variables
documentItemUniqueId
string   required

GUID

Body
DocumentItem
uniqueId
string   optional

Only in GET UUID

fileId
integer   optional

Only in GET

Format int64
name
string   optional
size
integer   optional

Only in GET

In bytes

note
string   optional
parentUniqueId
string   optional

Only in GET UUID

Parent folder ID. If empty, the document is in the root.

itemType
number   optional

0 - File, 1 - Folder

folderType
number   optional

0 - Generic

children
Array of DocumentItem   optional

Only in GET

isReadOnly
boolean   optional

Only in GET

If null, the DocumentItem inherits settings from parent DocumentItem.

canBeChanged
boolean   optional

Only in GET

Based on current user permissions.

canChildrenBeCreated
boolean   optional

Only in GET

Based on current user permissions.

DocumentItem
uniqueId
string   optional

Only in GET UUID

fileId
integer   optional

Only in GET

Format int64
name
string   optional
size
integer   optional

Only in GET

In bytes

note
string   optional
parentUniqueId
string   optional

Only in GET UUID

Parent folder ID. If empty, the document is in the root.

itemType
number   optional

0 - File, 1 - Folder

folderType
number   optional

0 - Generic

children
Array of DocumentItem   optional

Only in GET

isReadOnly
boolean   optional

Only in GET

If null, the DocumentItem inherits settings from parent DocumentItem.

canBeChanged
boolean   optional

Only in GET

Based on current user permissions.

canChildrenBeCreated
boolean   optional

Only in GET

Based on current user permissions.