Skip to content

LegalOn API (1.1.0)

API documentation for LegalOn services

Languages
Servers
The server URL is `{api_base_url}/rest/v1`. You can construct the server URL using the value of `api_base_url` provided in the response when obtaining an access token.
https://{api_base_url_without_scheme}/rest/v1

Users

Operations about user

Operations

User Groups

Operations about user group

Operations

Workspaces

Operations about all tenant workspaces/folders regardless of the user's access permissions.

Operations

Departments

Operations about department

Operations

Contracts(Files)

Operations to create, retrieve, update, and delete contracts. For operations that target a workspace, specify a workspace_id obtained via the common Workspaces endpoint (GET /workspaces).

Operations

Upload other file

Request

Uploads an other file to the specified workspace and returns an other_file_id.

Security
OAuth2ClientCredentials
Bodymultipart/form-datarequired

Upload other file request payload

workspace_idstring(uuid)required

Destination workspace ID

file_namestring[ 1 .. 255 ] charactersrequired

Other file name. Supported extensions are .pdf, .doc, .docx, .xls, .xlsx, .csv, .ppt, .pptx, .eml, .msg, .png, .gif, .jpg, and .jpeg.

mime_typestring[ 1 .. 255 ] charactersrequired

Other file MIME type. Supported MIME types are application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/csv, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, message/rfc822, application/vnd.ms-outlook, image/png, image/gif, and image/jpeg.

filestring(binary)required

Other file content.

curl -i -X POST \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/other-files' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F workspace_id=00000023-0000-0000-0001-000000000020 \
  -F file_name=appendix.xlsx \
  -F mime_type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet \
  -F 'file=<binary file content>'

Responses

Created

Bodyapplication/json
workspace_idstring(uuid)required

Workspace ID

other_file_idstring(uuid)required

Uploaded other file ID.

file_namestring[ 1 .. 255 ] charactersrequired

Other file name

mime_typestring[ 1 .. 255 ] charactersrequired

Other file MIME type

Response
application/json
{ "workspace_id": "00000023-0000-0000-0001-000000000020", "other_file_id": "00000016-0000-0000-0001-100000000201", "file_name": "appendix.xlsx", "mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }

Remove a related file link from a contract

Request

Removes only the link between the contract and the non-contract related file. The related file itself is not physically or logically deleted.

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

Contract document ID

related_file_idstring(uuid)required

Non-contract related file ID

curl -i -X DELETE \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}/related-files/{related_file_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

No Content

Response
No content

Workspaces

Workspaces/folders are the common units used to store and organize resources such as contracts. This endpoint returns the workspaces/folders the calling user has access to, as a tree. For operations that target a workspace (e.g., the Contract API), specify the workspace_id obtained here. To manage workspaces across the tenant (creation, permissions, etc.), see the admin workspace operations (/spaces).

Operations