Skip to content

LegalOn API (1.3.1)

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

案件

案件の作成、取得、更新、削除などの操作を提供します。案件の操作には、マターマネジメント Pro ライセンスを持つユーザーが所有する API クレデンシャルが必要です。

Operations

案件を検索

Request

概要

LegalOnの案件一覧と同じ検索条件、並び順、オフセット方式のページングで案件を検索します。

検索条件

既存の案件検索で利用できるすべての検索条件を、公開APIのリソース名で指定できます。たとえば、内部のSpace IDやLocation IDではなく、公開APIのワークスペースIDを指定します。

関連API

案件の公開メッセージまたは非公開メッセージを取得する場合は、タイムラインAPIを使用します。

Security
OAuth2ClientCredentials
Query
assignee_operatorstring

主担当者と副担当者の条件を結合する演算子。

Default "and"
Enum"and""or"
created_at_fromstring(date-time)

案件作成日時の開始境界(含む)。UTC オフセット付きの RFC 3339 形式で指定します。たとえば、UTC+09:00 で 2026-09-10 の 0時から検索する場合は、2026-09-10T00:00:00+09:00 を指定します。API は指定値が表す絶対時刻を比較し、タイムゾーンを補正しません。

created_at_relativestring(MatterRelativeDateFilter)[ 1 .. 1000 ] characters^(current,,(days|weeks|months|years)|anyFutur...

LegalOn の案件一覧と同じカンマ区切り形式の相対案件作成日時検索条件。

Example: created_at_relative=next,2,weeks
created_at_tostring(date-time)

案件作成日時の終了境界(含まない)。UTC オフセット付きの RFC 3339 形式で指定します。たとえば、UTC+09:00 で 2026-09-10 の終わりまで検索する場合は、翌日の 2026-09-11T00:00:00+09:00 を指定します。API は指定値が表す絶対時刻を比較し、タイムゾーンを補正しません。

custom_attributesArray of strings(MatterCustomAttributeFilter)[ 1 .. 50 ] items

GET /matters/custom-attribute-definitions が返す定義 ID と選択肢 ID を使用する、LegalOn の案件一覧と同じ JSON 文字列を繰り返す形式のカスタム項目検索条件。

Example: custom_attributes={"id":"00000000-0000-0000-0000-000000000010","t":"number","v":"1,100"}&custom_attributes={"id":"00000000-0000-0000-0000-000000000011","t":"date","v":",,true,next,2,weeks"}
due_date_fromstring(date-time)

案件の納期の開始境界(含む)。UTC オフセット付きの RFC 3339 形式で指定します。納期はテナントのタイムゾーンにおける暦日です。たとえば、テナントが UTC+09:00 で 2026-09-10 から検索する場合は、2026-09-10T00:00:00+09:00 を指定します。API は指定値が表す絶対時刻を比較し、タイムゾーンを補正しません。

due_date_relativestring(MatterRelativeDateFilter)[ 1 .. 1000 ] characters^(current,,(days|weeks|months|years)|anyFutur...

LegalOn の案件一覧と同じカンマ区切り形式の相対納期検索条件。

Example: due_date_relative=next,2,weeks
due_date_tostring(date-time)

案件の納期の終了境界(含まない)。UTC オフセット付きの RFC 3339 形式で指定します。たとえば、テナントが UTC+09:00 で 2026-09-10 の納期まで検索する場合は、翌日の 2026-09-11T00:00:00+09:00 を指定します。API は指定値が表す絶対時刻を比較し、タイムゾーンを補正しません。

include_unassigned_main_assigneeboolean

主担当者が未設定の案件を含めるかどうか。

Default false
include_unassigned_sub_assigneeboolean

副担当者が未設定の案件を含めるかどうか。

Default false
last_message_at_fromstring(date-time)

案件に紐づく最終メッセージ日時の開始境界(含む)。案件自体の更新日時ではなく、最終メッセージの日時で絞り込みます。UTC オフセット付きの RFC 3339 形式で指定します。たとえば、UTC+09:00 で 2026-09-10 の 0時から検索する場合は、2026-09-10T00:00:00+09:00 を指定します。API は指定値が表す絶対時刻を比較し、タイムゾーンを補正しません。

last_message_at_relativestring(MatterRelativeDateFilter)[ 1 .. 1000 ] characters^(current,,(days|weeks|months|years)|anyFutur...

LegalOnの案件一覧と同じカンマ区切り形式の相対最終メッセージ日時検索条件。

Example: last_message_at_relative=next,2,weeks
last_message_at_tostring(date-time)

案件に紐づく最終メッセージ日時の終了境界(含まない)。案件自体の更新日時ではなく、最終メッセージの日時で絞り込みます。UTC オフセット付きの RFC 3339 形式で指定します。たとえば、UTC+09:00 で 2026-09-10 の終わりまで検索する場合は、翌日の 2026-09-11T00:00:00+09:00 を指定します。API は指定値が表す絶対時刻を比較し、タイムゾーンを補正しません。

limitinteger[ 1 .. 100 ]

返却する案件の最大件数。

Default 50
main_assignee_idsArray of strings(uuid)non-empty

ユーザーAPIが返す主担当者のユーザーID。

matter_numberstring[ 1 .. 255 ] characters

案件番号の検索条件。

matter_typestring

案件タイプの検索条件。

Enum"other""legal_request""contract_review""contract_drafting"
offsetinteger>= 0

スキップする一致案件数。

Default 0
qstring[ 1 .. 1000 ] characters

案件の全文検索条件。

requester_idsArray of strings(uuid)non-empty

案件APIのレスポンスに含まれる requester.requester_id から取得した依頼者ID。ユーザーとゲストのどちらの依頼者IDも指定でき、複数指定時は OR で検索します。 案件の作成・更新ではメールアドレスと氏名で依頼者を指定しますが、既存の案件検索はID条件だけをサポートするため、検索では依頼者IDを指定します。ゲストの一覧APIは提供しません。

requesting_department_idsArray of strings(uuid)non-empty

部署APIが返す依頼部署ID。指定したいずれかの依頼部署に一致する案件を取得します。

sortArray of strings

並び順。未指定時は案件ID(matter_id)の降順です。

Items Enum"created_at:asc""created_at:desc""due_date:asc""due_date:desc""last_message_at:asc""last_message_at:desc"
status_idsArray of strings(uuid)non-empty

GET /matters/statuses が返す案件ステータス ID。指定したいずれかの案件ステータスに一致する案件を取得します。

sub_assignee_idsArray of strings(uuid)non-empty

ユーザーAPIが返す副担当者のユーザーID。

workspace_idstring(uuid)

ワークスペースAPIが返すワークスペースID。内部のSpace IDやLocation IDではなく、公開APIのワークスペースIDを指定します。

curl -i -X GET \
  'https://{api_base_url_without_scheme}/rest/v1/matters?assignee_operator=and&created_at_from=2019-08-24T14%3A15%3A22Z&created_at_relative=next%2C2%2Cweeks&created_at_to=2019-08-24T14%3A15%3A22Z&custom_attributes={%22id%22%3A%2200000000-0000-0000-0000-000000000010%22%2C%22t%22%3A%22number%22%2C%22v%22%3A%221%2C100%22}%2C{%22id%22%3A%2200000000-0000-0000-0000-000000000011%22%2C%22t%22%3A%22date%22%2C%22v%22%3A%22%2C%2Ctrue%2Cnext%2C2%2Cweeks%22}&due_date_from=2019-08-24T14%3A15%3A22Z&due_date_relative=next%2C2%2Cweeks&due_date_to=2019-08-24T14%3A15%3A22Z&include_unassigned_main_assignee=false&include_unassigned_sub_assignee=false&last_message_at_from=2019-08-24T14%3A15%3A22Z&last_message_at_relative=next%2C2%2Cweeks&last_message_at_to=2019-08-24T14%3A15%3A22Z&limit=50&main_assignee_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&matter_number=string&matter_type=other&offset=0&q=string&requester_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&requesting_department_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&sort=created_at%3Aasc&status_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&sub_assignee_ids=497f6eca-6276-4993-bfeb-53cbbbba6f08&workspace_id=497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

正常に案件一覧を取得

Bodyapplication/json
mattersArray of objects(Matter)required

一致した案件。

matters[].​matter_idstring(uuid)required

LegalOn が生成した案件 ID。

matters[].​matter_numberstringnon-emptyrequired

案件番号。

matters[].​titlestringnon-emptyrequired

案件名。

matters[].​overviewstringnon-empty

案件概要。未設定の場合は省略します。

matters[].​matter_typestringrequired

案件タイプ。

Enum"other""legal_request""contract_review""contract_drafting"
matters[].​due_datestring(date-time)

納期。未設定の場合は省略します。

matters[].​statusobject(MatterStatus)required

案件ステータス。

matters[].​status.​status_idstring(uuid)required

LegalOn が生成した案件ステータスID。

matters[].​status.​display_namestringnon-emptyrequired

案件ステータス名。

matters[].​assigneeobject(MainAssigneeReference)

案件の主担当者。未設定の場合は省略します。

matters[].​secondary_assigneeArray of objects(UserReference)required

案件の副担当者。

matters[].​secondary_assignee[].​user_idstring(uuid)required

LegalOn が生成したユーザー ID。

matters[].​secondary_assignee[].​display_namestringnon-emptyrequired

ユーザー表示名。

matters[].​requesterobject(RequesterReference)

案件の依頼者として解決されたユーザーまたはゲスト。

matters[].​requesting_departmentobject(DepartmentReference)

部署参照。

matters[].​custom_attributesArray of objects(MatterCustomAttribute)required

案件に設定されたカスタム項目。

matters[].​custom_attributes[].​custom_attribute_definitionobject(MatterCustomAttributeDefinition)required

案件カスタム項目の定義。

matters[].​custom_attributes[].​custom_attribute_definition.​custom_attribute_definition_idstring(uuid)required

LegalOn が生成したカスタム項目定義 ID。

matters[].​custom_attributes[].​custom_attribute_definition.​display_namestringnon-emptyrequired

カスタム項目の表示名。

matters[].​custom_attributes[].​custom_attribute_definition.​kindstringrequired

カスタム項目の値の種類。

Enum"single_selection""multiple_selection""single_line_text""number""date"
matters[].​custom_attributes[].​custom_attribute_definition.​display_orderinteger>= 0required

カスタム項目の表示順。

matters[].​custom_attributes[].​custom_attribute_definition.​optionsArray of objects(MatterCustomAttributeOption)required

選択可能な選択肢。選択型以外では空です。

matters[].​custom_attributes[].​custom_attribute_definition.​options[].​custom_attribute_option_idstring(uuid)required

LegalOn が生成したカスタム項目選択肢 ID。

matters[].​custom_attributes[].​custom_attribute_definition.​options[].​display_namestringnon-emptyrequired

選択肢の表示名。

matters[].​custom_attributes[].​custom_attribute_definition.​options[].​display_orderinteger>= 0required

選択肢の表示順。

matters[].​custom_attributes[].​option_idsArray of strings(uuid)

選択型カスタム項目の選択肢 ID。

matters[].​custom_attributes[].​text_valuestringnon-empty

一行テキスト型カスタム項目の値。

matters[].​custom_attributes[].​number_valueinteger(int32)>= 0

数値型カスタム項目の値。

matters[].​custom_attributes[].​date_valuestring(date-time)

日付型カスタム項目の値。

matters[].​workspaceobject(WorkspaceReference)required

ワークスペース参照。API クレデンシャルの所有者がワークスペースを閲覧できない場合は、両方のフィールドを省略し、空のオブジェクトを返します。

matters[].​workspace.​workspace_idstring(uuid)

LegalOn が生成したワークスペース ID。

matters[].​workspace.​display_namestringnon-empty

ワークスペース表示名。

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

案件の作成日時。

matters[].​last_message_atstring(date-time)

最終メッセージの日時。メッセージが存在しない場合は省略します。

total_sizeinteger>= 0required

一致した案件の総数。

Response
application/json
{ "matters": [ { … } ], "total_size": 1 }

案件を作成

Request

概要

案件を作成します。1回のリクエストで、依頼者、依頼部署、案件ステータス、主・副担当者、カスタム項目、最大10件の新規ファイルを指定できます。

指定項目

依頼者は必須で、メールアドレスと氏名で指定します。LegalOnは有効なユーザーを優先し、該当しない場合は既存ゲストの再利用または新規作成を行います。ユーザーまたはゲストのIDは直接指定できません。

新規ファイルはmultipart/form-dataのファイルパートにバイナリとして含めて送信してください。アップロードURL、ファイルパス、オブジェクトパスを取得・指定する必要はありません。

制約

  • このAPIは単件作成用です。データ移行のために繰り返し呼び出せますが、移行元の作成日時は保持できません。
  • 1ファイルあたり100MiB以下、合計200MiB以下とします。

処理上の注意

  • いずれかのファイルの検証またはアップロードに失敗した場合、案件を作成せずにリクエスト全体が失敗します。
  • 冪等性キーには対応していません。処理完了後に応答を受信できなかった場合、再送前に案件が作成済みでないか確認してください。再送すると案件と添付ファイルが重複して作成される可能性があります。
Security
OAuth2ClientCredentials
Bodymultipart/form-datarequired

案件作成リクエスト。

titlestring[ 1 .. 200 ] charactersrequired

案件名。

matter_typestringrequired

案件タイプ。

Enum"other""legal_request""contract_review""contract_drafting"
workspace_idstring(uuid)required

案件を作成するワークスペース。

overviewstring[ 1 .. 4000 ] characters

案件概要。

due_datestring(date-time)

納期。

requesterobject(RequesterInput)required

メールアドレスと氏名で指定する依頼者。ユーザーまたはゲストのIDは直接指定できません。

requester.​emailstring(email)<= 254 charactersrequired

依頼者のメールアドレス。LegalOnは有効なユーザーを優先し、該当しない場合は既存ゲストの再利用または新規作成を行います。

requester.​namestring[ 1 .. 300 ] charactersrequired

依頼者の氏名。既存ゲストを再利用する場合は、この値で氏名を更新します。

requesting_department_idstring(uuid)

設定する依頼部署。

status_idstring(uuid)

設定する案件ステータス。省略した場合は既定の案件ステータスを使用します。

main_assignee_idstring(uuid)

主担当者のユーザー ID。

sub_assignee_idsArray of strings(uuid)<= 30 itemsunique

副担当者のユーザー ID。同じユーザー ID は重複して指定できません。

custom_attributesArray of objects(MatterCustomAttributePatch)[ 1 .. 50 ] items

設定するカスタム項目。

  • 指定しない定義は設定されません。
  • 同じ定義 ID は重複して指定できません。
filesArray of strings(binary)<= 10 items

新規アップロードするバイナリファイル。フォームフィールドは最大10回指定できます。

ファイル名と Content-Type は各 multipart/form-data のファイルパートから取得します。ファイル名やMIMEタイプを別のメタデータフィールドで指定したり、保存先のパスを指定したりすることはできません。

  • ファイル名は拡張子を含めて200文字以下とし、改行を含めず、先頭または末尾をピリオドにしないでください。
  • 対応拡張子は .pdf、.doc、.docx、.xls、.xlsx、.csv、.ppt、.pptx、.eml、.msg、.png、.gif、.jpg、.jpeg です。
  • Content-Type は POST /files と同じメディアタイプ規則に従って拡張子と一致させてください。
curl -i -X POST \
  'https://{api_base_url_without_scheme}/rest/v1/matters' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F 'title=Review NDA' \
  -F matter_type=contract_review \
  -F workspace_id=00000000-0000-0000-0000-000000000003 \
  -F 'overview=Please review this NDA.' \
  -F 'requester[email]=requester@example.com' \
  -F 'requester[name]=Request User' \
  -F status_id=00000000-0000-0000-0000-000000000002 \
  -F main_assignee_id=00000000-0000-0000-0000-000000000004 \
  -F sub_assignee_ids=00000000-0000-0000-0000-000000000005 \
  -F 'custom_attributes[0][custom_attribute_definition_id]=00000000-0000-0000-0000-000000000010' \
  -F 'custom_attributes[0][text_value]=High priority' \
  -F 'files=<binary file content>'

Responses

正常に案件を作成

Bodyapplication/json
matter_idstring(uuid)required

LegalOn が生成した案件 ID。

Response
application/json
{ "matter_id": "00000000-0000-0000-0000-000000000001" }

案件を取得

Request

指定した案件を取得します。紐付け済みファイルとタイムラインは含みません。

Security
OAuth2ClientCredentials
Path
matter_idstring(uuid)required

LegalOn が生成した案件 ID。

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

Responses

正常に案件を取得

Bodyapplication/json
matter_idstring(uuid)required

LegalOn が生成した案件 ID。

matter_numberstringnon-emptyrequired

案件番号。

titlestringnon-emptyrequired

案件名。

overviewstringnon-empty

案件概要。未設定の場合は省略します。

matter_typestringrequired

案件タイプ。

Enum"other""legal_request""contract_review""contract_drafting"
due_datestring(date-time)

納期。未設定の場合は省略します。

statusobject(MatterStatus)required

案件ステータス。

status.​status_idstring(uuid)required

LegalOn が生成した案件ステータスID。

status.​display_namestringnon-emptyrequired

案件ステータス名。

assigneeobject(MainAssigneeReference)

案件の主担当者。未設定の場合は省略します。

secondary_assigneeArray of objects(UserReference)required

案件の副担当者。

secondary_assignee[].​user_idstring(uuid)required

LegalOn が生成したユーザー ID。

secondary_assignee[].​display_namestringnon-emptyrequired

ユーザー表示名。

requesterobject(RequesterReference)

案件の依頼者として解決されたユーザーまたはゲスト。

requesting_departmentobject(DepartmentReference)

部署参照。

custom_attributesArray of objects(MatterCustomAttribute)required

案件に設定されたカスタム項目。

custom_attributes[].​custom_attribute_definitionobject(MatterCustomAttributeDefinition)required

案件カスタム項目の定義。

custom_attributes[].​custom_attribute_definition.​custom_attribute_definition_idstring(uuid)required

LegalOn が生成したカスタム項目定義 ID。

custom_attributes[].​custom_attribute_definition.​display_namestringnon-emptyrequired

カスタム項目の表示名。

custom_attributes[].​custom_attribute_definition.​kindstringrequired

カスタム項目の値の種類。

Enum"single_selection""multiple_selection""single_line_text""number""date"
custom_attributes[].​custom_attribute_definition.​display_orderinteger>= 0required

カスタム項目の表示順。

custom_attributes[].​custom_attribute_definition.​optionsArray of objects(MatterCustomAttributeOption)required

選択可能な選択肢。選択型以外では空です。

custom_attributes[].​custom_attribute_definition.​options[].​custom_attribute_option_idstring(uuid)required

LegalOn が生成したカスタム項目選択肢 ID。

custom_attributes[].​custom_attribute_definition.​options[].​display_namestringnon-emptyrequired

選択肢の表示名。

custom_attributes[].​custom_attribute_definition.​options[].​display_orderinteger>= 0required

選択肢の表示順。

custom_attributes[].​option_idsArray of strings(uuid)

選択型カスタム項目の選択肢 ID。

custom_attributes[].​text_valuestringnon-empty

一行テキスト型カスタム項目の値。

custom_attributes[].​number_valueinteger(int32)>= 0

数値型カスタム項目の値。

custom_attributes[].​date_valuestring(date-time)

日付型カスタム項目の値。

workspaceobject(WorkspaceReference)required

ワークスペース参照。API クレデンシャルの所有者がワークスペースを閲覧できない場合は、両方のフィールドを省略し、空のオブジェクトを返します。

workspace.​workspace_idstring(uuid)

LegalOn が生成したワークスペース ID。

workspace.​display_namestringnon-empty

ワークスペース表示名。

created_atstring(date-time)required

案件の作成日時。

last_message_atstring(date-time)

最終メッセージの日時。メッセージが存在しない場合は省略します。

Response
application/json
{ "matter_id": "00000000-0000-0000-0000-000000000001", "matter_number": "MAT-0001", "title": "Review NDA", "overview": "Please review this NDA.", "matter_type": "contract_review", "status": { "status_id": "00000000-0000-0000-0000-000000000002", "display_name": "In progress" }, "secondary_assignee": [], "custom_attributes": [], "workspace": { "workspace_id": "00000000-0000-0000-0000-000000000003", "display_name": "Legal" }, "created_at": "2026-08-18T00:00:00Z", "last_message_at": "2026-08-18T00:00:00Z" }

ファイル

LegalOn のリソースで利用するファイルを作成・管理します。

Operations

ワークスペース

共通のワークスペース/フォルダは、契約書などのリソースを格納・整理する単位です。

Operations