Skip to content

LegalOn API (1.1.0)

API documentation for LegalOn services

Languages
Servers
サーバーのURLは `{api_base_url}/rest/v1` です。 アクセストークン取得時のレスポンスに含まれる `api_base_url` の値を用いてサーバーの URL を構成してください。
https://{api_base_url_without_scheme}/rest/v1

ユーザー

ユーザーに関する操作

Operations

ユーザーグループ

ユーザーグループに関する操作

Operations

ワークスペース

ユーザーの閲覧権限によらず、テナント内のすべてのワークスペース/フォルダに関する操作

Operations

部署

部署に関する操作

Operations

契約書(ファイル)

契約書の作成・取得・更新・削除などの操作を提供します。ワークスペースを対象とする操作では、共通の「ワークスペース」(GET /workspaces)で取得した workspace_id を指定してください。

Operations

契約書以外の関連ファイルを契約書に紐付け

Request

既存の契約書以外の関連ファイルを、指定した契約書に紐付けます。

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

契約書 ID

Bodyapplication/jsonrequired

既存ファイル関連付けリクエスト

related_file_idstring(uuid)required

紐付ける契約書以外の関連ファイル ID。成功レスポンスでは同じ ID を related_file_id として返し、紐付け解除時にもこの ID を使用する。

curl -i -X POST \
  'https://{api_base_url_without_scheme}/rest/v1/contracts/{document_id}/related-file-links' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "related_file_id": "00000016-0000-0000-0001-100000000301"
  }'

Responses

正常に既存ファイルを関連付け

Bodyapplication/json
document_idstring(uuid)required

契約書 ID

related_file_idstring(uuid)required

契約書以外の関連ファイル ID

Response
application/json
{ "document_id": "00000016-0000-0000-0001-100000000001", "related_file_id": "00000016-0000-0000-0001-100000000301" }

その他ファイルをアップロード

Request

その他ファイルを指定したワークスペース/フォルダにアップロードし、other_file_id を返します。

Security
OAuth2ClientCredentials
Bodymultipart/form-datarequired

その他ファイルアップロードリクエスト

workspace_idstring(uuid)required

保存先ワークスペース/フォルダID

file_namestring[ 1 .. 255 ] charactersrequired

その他ファイル名。対応拡張子は .pdf, .doc, .docx, .xls, .xlsx, .csv, .ppt, .pptx, .eml, .msg, .png, .gif, .jpg, .jpeg。

mime_typestring[ 1 .. 255 ] charactersrequired

その他ファイルの MIME タイプ。対応 MIME タイプは 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, image/jpeg。

filestring(binary)required

その他ファイル本体。

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

正常にその他ファイルをアップロード

Bodyapplication/json
workspace_idstring(uuid)required

ワークスペース ID

other_file_idstring(uuid)required

アップロードしたその他ファイル ID

file_namestring[ 1 .. 255 ] charactersrequired

その他ファイル名

mime_typestring[ 1 .. 255 ] charactersrequired

その他ファイルのMIMEタイプ

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" }

契約書から関連ファイルを解除

Request

契約書と契約書以外の関連ファイルの紐付けのみを解除します。関連ファイル自体の物理削除・論理削除は行いません。

Security
OAuth2ClientCredentials
Path
document_idstring(uuid)required

契約書 ID

related_file_idstring(uuid)required

契約書以外の関連ファイル 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

正常に関連ファイルの関連付けを解除

Response
No content

ワークスペース

共通のワークスペース/フォルダは、契約書などのリソースを格納・整理する単位です。本エンドポイントは、APIを呼び出すユーザーがアクセス権を持つワークスペース/フォルダをツリー構造で返します。契約書APIなどワークスペースを対象とする操作では、ここで取得した workspace_id を指定してください。テナント内全体の管理(作成・権限設定など)は管理者設定のワークスペース操作(/spaces)を参照してください。

Operations