Skip to content

Elevate Document API (1.0)

Document management

Provides read & write access to Elevate documents

Definitions

  • Document - a file or folder. A file being a single unit of storage that has a name and can be uploaded or uploaded. A folder holds one or more files, and a folder can be empty until it is filled. A folder can also contain other folders, and there can be many levels of folders within folders
Languages
Servers
https://rest.elevatebilling.com/v1

documents

Document being a file or folder. A file being a single unit of storage that has a name and can be uploaded or downloaded. A folder holds one or more files, and a folder can be empty until it is filled. A folder can also contain other folders, and there can be many levels of folders within folders

Operations

Get a page of documents in a specific folder

Request

Security
bearerAuth
Query
pageinteger(int32)(PageParam)>= 1required

Page of results to show

Example: page=1
pageSizeinteger(int32)(ResultsPerPageParam)[ 1 .. 1000 ]required

Results to return per page

Example: pageSize=100
sortstring(SortParam)

Comma-delimited list of the fields to sort by - defaults to ascending order, suffix :desc to change

Example: sort=id,name | name:desc
fieldsstring(FieldsParam)

Comma-delimited list of the field(s) to return if only a subset is required

Example: fields=id,name
levelstring(DocumentLevel)required

Filter by document level, e.g. CUSTOMER

Value"CUSTOMER"
levelIdstring(IdFilterParam)required

Filter by level id, e.g. customer id 1234

Example: levelId=0
parentDocumentIdstring(IdFilterParam)

Filter by folder id, e.g. folder ABC with id 456, omitting this implies the root folder

Example: parentDocumentId=0
tagsstring(StringFilterParam)

Filter by tag name

Example: tags=xyz | in:x,y | like:xyz
namestring(StringFilterParam)

Filter by document name

Example: name=xyz | in:x,y | like:xyz
recursivestring(BooleanFilterParam)

Search all sub-folders below the folder level specified

Example: recursive=true | false
curl -i -X GET \
  'https://rest.elevatebilling.com/v1/documents?page=1&pageSize=100&sort=id%2Cname+%7C+name%3Adesc&fields=id%2Cname&level=CUSTOMER&levelId=0&parentDocumentId=0&tags=xyz+%7C+in%3Ax%2Cy+%7C+like%3Axyz&name=xyz+%7C+in%3Ax%2Cy+%7C+like%3Axyz&recursive=true+%2C+false' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/jsonArray [
idinteger(int64)read-only

Document identifier

Example: 1
parentDocumentIdinteger(int64)

Parent document identifier

Example: 1
levelIdinteger(int64)

Level identifier, e.g. customer id

Example: 1
levelstring(DocumentLevel)required

Level of document

Value"CUSTOMER"
typestring(DocumentType)

Type of document

Enum"FILE""FOLDER"
namestring[ 1 .. 100 ] characters[a-zA-Z0-9_.\-\s]*required

File of folder name

Example: "/helloworld.doc"
ownerstring[ 1 .. 150 ] characters[\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...read-only

Owner of document, the person who uploaded the file or created the folder

Example: "Tommy Tynan"
ownerUserIdinteger(int64)read-only

User id for the owner of the document

Example: 1
sizeInKbinteger(int64)read-only

Size of document in Kilo Byte (KB)

Example: 1
pathstring[ 1 .. 1000 ] characters[\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...read-only

Parent folder name, might be missing for root

Example: "/folder1/folder2/"
uploadDateTimestring(date-time)read-only

File or folder upload date and time

tagsArray of objects(Tag)

Zero or more tags associated with the file or folder. Might be 'Star' or 'Private' or even 'Deleted'

]
Response
application/json
[ { "id": 1, "parentDocumentId": 1, "levelId": 1, "level": "CUSTOMER", "type": "FILE", "name": "/helloworld.doc", "owner": "Tommy Tynan", "ownerUserId": 1, "sizeInKb": 1, "path": "/folder1/folder2/", "uploadDateTime": "2019-08-24T14:15:22Z", "tags": [] } ]

Check if documents exists

Request

Security
bearerAuth
Query
levelstring(DocumentLevel)required

Filter by document level, e.g. CUSTOMER

Value"CUSTOMER"
levelIdstring(IdFilterParam)required

Filter by level id, e.g. customer id 1234

Example: levelId=0
parentDocumentIdstring(IdFilterParam)

Filter by folder id, e.g. folder ABC with id 456, omitting this implies the root folder

Example: parentDocumentId=0
tagsstring(StringFilterParam)

Filter by tag name

Example: tags=xyz | in:x,y | like:xyz
namestring(StringFilterParam)

Filter by document name

Example: name=xyz | in:x,y | like:xyz
recursivestring(BooleanFilterParam)

Search all sub-folders below the folder specified

Example: recursive=true | false
curl -i -X HEAD \
  'https://rest.elevatebilling.com/v1/documents?level=CUSTOMER&levelId=0&parentDocumentId=0&tags=xyz+%7C+in%3Ax%2Cy+%7C+like%3Axyz&name=xyz+%7C+in%3Ax%2Cy+%7C+like%3Axyz&recursive=true+%2C+false' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Exists

Headers
X-Total-Countinteger

Total number of documents

Body

Upload a new file or create a new folder

Request

Security
bearerAuth
Bodymultipart/form-datarequired

New file or folder

fileContentmultipartFile(binary)

File content in application/excel format

uploadobject(Document)
curl -i -X POST \
  https://rest.elevatebilling.com/v1/documents \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F fileContent=null \
  -F 'upload[parentDocumentId]=1' \
  -F 'upload[levelId]=1' \
  -F 'upload[level]=CUSTOMER' \
  -F 'upload[type]=FILE' \
  -F 'upload[name]=/helloworld.doc' \
  -F 'upload[tags][0][name]=string'

Responses

OK - document uploaded

Bodyapplication/json
idinteger(int64)read-only

Document identifier

Example: 1
parentDocumentIdinteger(int64)

Parent document identifier

Example: 1
levelIdinteger(int64)

Level identifier, e.g. customer id

Example: 1
levelstring(DocumentLevel)required

Level of document

Value"CUSTOMER"
typestring(DocumentType)

Type of document

Enum"FILE""FOLDER"
namestring[ 1 .. 100 ] characters[a-zA-Z0-9_.\-\s]*required

File of folder name

Example: "/helloworld.doc"
ownerstring[ 1 .. 150 ] characters[\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...read-only

Owner of document, the person who uploaded the file or created the folder

Example: "Tommy Tynan"
ownerUserIdinteger(int64)read-only

User id for the owner of the document

Example: 1
sizeInKbinteger(int64)read-only

Size of document in Kilo Byte (KB)

Example: 1
pathstring[ 1 .. 1000 ] characters[\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...read-only

Parent folder name, might be missing for root

Example: "/folder1/folder2/"
uploadDateTimestring(date-time)read-only

File or folder upload date and time

tagsArray of objects(Tag)

Zero or more tags associated with the file or folder. Might be 'Star' or 'Private' or even 'Deleted'

Response
application/json
{ "id": 1, "parentDocumentId": 1, "levelId": 1, "level": "CUSTOMER", "type": "FILE", "name": "/helloworld.doc", "owner": "Tommy Tynan", "ownerUserId": 1, "sizeInKb": 1, "path": "/folder1/folder2/", "uploadDateTime": "2019-08-24T14:15:22Z", "tags": [ {} ] }

Find a document using the document identifier

Request

Security
bearerAuth
Path
idinteger(int64)(IdParam)>= 1required

Document identifier

Example: 1
curl -i -X GET \
  https://rest.elevatebilling.com/v1/documents/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Found document

Bodyapplication/json
idinteger(int64)read-only

Document identifier

Example: 1
parentDocumentIdinteger(int64)

Parent document identifier

Example: 1
levelIdinteger(int64)

Level identifier, e.g. customer id

Example: 1
levelstring(DocumentLevel)required

Level of document

Value"CUSTOMER"
typestring(DocumentType)

Type of document

Enum"FILE""FOLDER"
namestring[ 1 .. 100 ] characters[a-zA-Z0-9_.\-\s]*required

File of folder name

Example: "/helloworld.doc"
ownerstring[ 1 .. 150 ] characters[\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...read-only

Owner of document, the person who uploaded the file or created the folder

Example: "Tommy Tynan"
ownerUserIdinteger(int64)read-only

User id for the owner of the document

Example: 1
sizeInKbinteger(int64)read-only

Size of document in Kilo Byte (KB)

Example: 1
pathstring[ 1 .. 1000 ] characters[\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...read-only

Parent folder name, might be missing for root

Example: "/folder1/folder2/"
uploadDateTimestring(date-time)read-only

File or folder upload date and time

tagsArray of objects(Tag)

Zero or more tags associated with the file or folder. Might be 'Star' or 'Private' or even 'Deleted'

Response
application/json
{ "id": 1, "parentDocumentId": 1, "levelId": 1, "level": "CUSTOMER", "type": "FILE", "name": "/helloworld.doc", "owner": "Tommy Tynan", "ownerUserId": 1, "sizeInKb": 1, "path": "/folder1/folder2/", "uploadDateTime": "2019-08-24T14:15:22Z", "tags": [ {} ] }

Update a file or folder's attributes

Request

Security
bearerAuth
Path
idinteger(int64)(IdParam)>= 1required

Document identifier

Example: 1
Bodyapplication/json-patch+jsonrequired

A set of JSONPatch operations to be performed

Array [
opstringrequired

The JSON Patch operation to be performed

Enum"add""remove""replace""move""copy""test"
pathstringrequired

A JSON-Pointer

valueobject

The value to be used within the operations

fromstring

A string containing a JSON Pointer value

]
curl -i -X PATCH \
  https://rest.elevatebilling.com/v1/documents/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json-patch+json' \
  -d '[
    {
      "op": "replace",
      "path": "/name",
      "value": "MyFile.txt"
    }
  ]'

Responses

Success

Bodyapplication/json
idinteger(int64)read-only

Document identifier

Example: 1
parentDocumentIdinteger(int64)

Parent document identifier

Example: 1
levelIdinteger(int64)

Level identifier, e.g. customer id

Example: 1
levelstring(DocumentLevel)required

Level of document

Value"CUSTOMER"
typestring(DocumentType)

Type of document

Enum"FILE""FOLDER"
namestring[ 1 .. 100 ] characters[a-zA-Z0-9_.\-\s]*required

File of folder name

Example: "/helloworld.doc"
ownerstring[ 1 .. 150 ] characters[\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...read-only

Owner of document, the person who uploaded the file or created the folder

Example: "Tommy Tynan"
ownerUserIdinteger(int64)read-only

User id for the owner of the document

Example: 1
sizeInKbinteger(int64)read-only

Size of document in Kilo Byte (KB)

Example: 1
pathstring[ 1 .. 1000 ] characters[\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...read-only

Parent folder name, might be missing for root

Example: "/folder1/folder2/"
uploadDateTimestring(date-time)read-only

File or folder upload date and time

tagsArray of objects(Tag)

Zero or more tags associated with the file or folder. Might be 'Star' or 'Private' or even 'Deleted'

Response
application/json
{ "id": 1, "parentDocumentId": 1, "levelId": 1, "level": "CUSTOMER", "type": "FILE", "name": "/helloworld.doc", "owner": "Tommy Tynan", "ownerUserId": 1, "sizeInKb": 1, "path": "/folder1/folder2/", "uploadDateTime": "2019-08-24T14:15:22Z", "tags": [ {} ] }

Download the contents of the file or folder

Request

Download the contents of the file or folder. If a folder it will zip the files and folders within

Security
bearerAuth
Path
idinteger(int64)(IdParam)>= 1required

Document identifier

Example: 1
curl -i -X GET \
  https://rest.elevatebilling.com/v1/document-contents/1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

A file contents or zip file of folder

Bodyapplication/octet-stream
string(binary)