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

List contract custom attribute definitions

Request

Returns definitions configured for the tenant. The response order follows Contract Management.

Security
OAuth2ClientCredentials
curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/custom-attribute-definitions' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
custom_attribute_definitionsArray of objects(ContractCustomAttributeDefinition)required
custom_attribute_definitions[].​setting_idstring(uuid)required

Definition ID.

custom_attribute_definitions[].​display_namestring[ 1 .. 50 ] charactersrequired

Display name.

custom_attribute_definitions[].​typestringrequired

Attribute value type.

Value"single_line_text"
custom_attribute_definitions[].​is_automatic_extractionbooleanrequired

Whether the value is extracted automatically.

custom_attribute_definitions[].​descriptionstring

Definition description.

custom_attribute_definitions[].​formatstring

Expected output format for automatic extraction.

Response
application/json
{ "custom_attribute_definitions": [ { … } ] }

Get contract custom attribute values

Request

Returns custom attribute values for the specified contract. Empty values are omitted.

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}/custom-attributes' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
custom_attributesArray of objects(ContractCustomAttribute)required
custom_attributes[].​setting_idstring(uuid)required

Definition ID.

custom_attributes[].​text_valuestring[ 1 .. 300 ] characters

Text value. Omitted when the value is empty.

custom_attributes[].​processing_statusstring

Automatic extraction status.

Enum"completed""failed""processing""not_applicable"
Response
application/json
{ "custom_attributes": [ { … } ] }

Update contract custom attribute values

Request

Updates 1 to 50 values in one request. Omitted definitions remain unchanged. Omit text_value on a specified definition to clear its value. If an unknown ID is included, the request is rejected and none of the values are updated.

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

Contract document ID.

Bodyapplication/jsonrequired
custom_attributesArray of objects(ContractCustomAttributePatch)[ 1 .. 50 ] itemsrequired
custom_attributes[].​setting_idstring(uuid)required

Definition ID.

custom_attributes[].​text_valuestring[ 1 .. 300 ] characters

New text value. Omit to clear the value.

curl -i -X PATCH \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}/custom-attributes' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom_attributes": [
      {
        "setting_id": "a85785e9-b0c4-4f26-bdb1-2832c57d90d8",
        "text_value": "string"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
custom_attributesArray of objects(ContractCustomAttribute)required
custom_attributes[].​setting_idstring(uuid)required

Definition ID.

custom_attributes[].​text_valuestring[ 1 .. 300 ] characters

Text value. Omitted when the value is empty.

custom_attributes[].​processing_statusstring

Automatic extraction status.

Enum"completed""failed""processing""not_applicable"
Response
application/json
{ "custom_attributes": [ { … } ] }

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