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

テナントに設定されている案件ステータスを取得します。

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

Responses

正常に案件ステータス一覧を取得

Bodyapplication/json
statusesArray of objects(MatterStatus)required

案件ステータス一覧。

statuses[].​status_idstring(uuid)required

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

statuses[].​display_namestringnon-emptyrequired

案件ステータス名。

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

案件カスタム項目定義一覧を取得

Request

テナントに設定されている案件カスタム項目定義を取得します。

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

Responses

正常に案件カスタム項目定義一覧を取得

Bodyapplication/json
custom_attribute_definitionsArray of objects(MatterCustomAttributeDefinition)required

案件カスタム項目定義一覧。

custom_attribute_definitions[].​custom_attribute_definition_idstring(uuid)required

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

custom_attribute_definitions[].​display_namestringnon-emptyrequired

カスタム項目の表示名。

custom_attribute_definitions[].​kindstringrequired

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

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

カスタム項目の表示順。

custom_attribute_definitions[].​optionsArray of objects(MatterCustomAttributeOption)required

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

custom_attribute_definitions[].​options[].​custom_attribute_option_idstring(uuid)required

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

custom_attribute_definitions[].​options[].​display_namestringnon-emptyrequired

選択肢の表示名。

custom_attribute_definitions[].​options[].​display_orderinteger>= 0required

選択肢の表示順。

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

案件を検索

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 }

ファイル

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

Operations

ワークスペース

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

Operations