Skip to content

LegalOn API (1.3.1)

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

Delete a contract

Request

Deletes the specified contract. All versions and links to related files are also removed (the related files themselves are not deleted).

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

Contract document ID

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

Responses

No Content

Response
No content

Upload a new latest version

Request

Adds a new version to the specified contract.

  • Retrying the request can add another version.
Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

Contract document ID

Bodymultipart/form-datarequired
filestring(binary)required

Contract version file. The filename and media type come from the multipart file part.

document_status_codestring(document_status_code)

Contract document status code for pre-execution contracts. NONE represents no document status.

Enum"COUNTERPARTY_DRAFT""INTERNAL_DRAFT""COUNTERPARTY_REVISION""INTERNAL_REVISION""APPROVED_VERSION""READY_FOR_SIGNATURE""NONE"
curl -i -X POST \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}/versions' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string \
  -F document_status_code=COUNTERPARTY_DRAFT

Responses

Version created

Bodyapplication/json
document_version_idstring(uuid)required
Response
application/json
{ "document_version_id": "00000016-0000-0000-0001-100000000102" }

List contract versions

Request

Retrieves all versions of the specified contract in ascending order by version number.

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

Contract document ID

curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}/versions' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
document_idstring(uuid)required

Contract document ID

versionsArray of objects(contract_version_summary)required

Contract versions

versions[].​document_version_idstring(uuid)required

Contract version ID

versions[].​version_numberinteger>= 1required

Version number in the current version list order

versions[].​file_namestring[ 1 .. 255 ] charactersrequired

File name

versions[].​created_atstring(date-time)required

Contract version creation timestamp

versions[].​updated_atstring(date-time)required

Contract version update timestamp

Response
application/json
{ "document_id": "00000016-0000-0000-0001-100000000001", "versions": [ { … }, { … } ] }

Matters

Operations to create, retrieve, update, and delete matters. Matter operations require an API credential owned by a user with a Matter Management Pro license.

Operations

Files

Operations to create and manage files for LegalOn resources.

Operations

Workspaces

Workspaces/folders are the common units used to store and organize resources such as contracts.

Operations