For the complete documentation index, see llms.txt. This page is also available as Markdown.

Legal Entity

Legal Entities facilitate segregation of accounting operations, financial statements and close process, and organizations can have multiple Legal entities in the system based on their business needs.

get
/apis/policy-sets/v1/policy/legal-entity

Retrieves all the legal entities associated with a specific tenant.

Responses
200

Get legal entity Policy

application/json
compliance_idstringOptional

A system-generated compliance ID to retrieve the legal entity.

compliance_namestringOptional

Name of the policy fetched by the system.

created_bystringOptional

ID of the user who created the policy.

created_onintegerOptional

Timestamp of the policy created by the user. This is a unix Epoch timestamp format.

last_modified_bystringOptional

ID of the user last modified by.

last_modified_onintegerOptional

Timestamp of the policy last modified on. This is a unix Epoch timestamp format.

policy_typestringOptional

Represents the type of policy.

statusstringOptional

Represents the status of the policy.

unique_keystringOptional

Represents the name of the legal entity.

version_idstringOptional

Represents the latest version of the policy.

get/apis/policy-sets/v1/policy/legal-entity
GET /apis/policy-sets/v1/policy/legal-entity HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Accept: */*
200

Get legal entity Policy

[
  {
    "compliance_id": "76dfe784-07c9-4591-a9bc-00933e16dd22",
    "compliance_name": "legal-entity",
    "compliance_spec": [
      {
        "active": true,
        "can_delete": true,
        "code": "LE-001",
        "created_at": 1761288693,
        "created_by": "username@rightrev.com",
        "description": "LE-001",
        "guid": "d0638fd1-9e4e-4fc9-8fd8-a0eee40353e5",
        "is_user_defined": true,
        "name": "LE-001",
        "transaction": false,
        "updated_at": 1761288693,
        "updated_by": "username@rightrev.com"
      },
      {
        "active": false,
        "can_delete": false,
        "code": "d521d869-2f00-4b17-85bf-2391d5d7bb1d",
        "created_at": 1758630290,
        "created_by": "RIGHTREV",
        "description": "Default Legal Entity",
        "guid": "d521d869-2f00-4b17-85bf-2391d5d7bb1d",
        "is_user_defined": false,
        "name": "Default Legal Entity",
        "transaction": false,
        "updated_at": 1758630290,
        "updated_by": "RIGHTREV"
      }
    ],
    "created_by": "RIGHTREV",
    "created_on": 1761816510,
    "last_modified_by": "RIGHTREV",
    "last_modified_on": 1761816510,
    "policy_type": "legal-entity",
    "status": "Active",
    "unique_key": "name",
    "version_id": "ef1ddc6d-fcfc-4e1b-bbdc-3ba7093467b6"
  }
]
patch
/apis/policy-sets/v1/policy/legal-entity/{compliance_id}

Add a new Legal Entity.

Path parameters
compliance_idstringRequired

User has to provide a compliance id to add a new legal entity. This compliance id can be fetched from the response of the Legal Entity Policy - GET API.

Body
compliance_namestringRequired

Name of the Policy.

unique_keystringRequired

Represents the name of the legal entity.

format_typestringRequired

It's a format of the data. For e.g. JSON

Responses
200

Add New legal entity Policy

application/json
compliance_idstringOptional

A system-generated compliance ID to add a new legal entity.

errorarrayOptional

Displays information about problems that occurred while handling the request. Commonly used to report validation errors, missing or invalid parameters, or other issues related to API processing.

patch/apis/policy-sets/v1/policy/legal-entity/{compliance_id}
PATCH /apis/policy-sets/v1/policy/legal-entity/{compliance_id} HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Content-Type: application/json
Accept: */*
Content-Length: 264

{
  "compliance_name": "legal_entity",
  "unique_key": "name",
  "format_type": "json",
  "compliance_spec": [
    {
      "code": "LE_03",
      "description": "This is a sample legal entity EDIT",
      "guid": "1",
      "name": "LE_03",
      "active": true,
      "transaction": false,
      "is_user_defined": true,
      "can_delete": true
    }
  ]
}
200

Add New legal entity Policy

{
  "compliance_details": [
    {
      "error": [],
      "message": "created successfully",
      "unique_key": "LE-00002"
    }
  ],
  "compliance_id": "1b8686ae-5fdc-414d-9042-4833b11aad0f",
  "error": []
}
put
/apis/policy-sets/v1/policy/legal-entity/{compliance_id}

Update the Legal Entity policy.

Path parameters
compliance_idstringRequired

User has to provide a compliance id to update a legal entity. This compliance id can be fetched from the response of the Legal Entity Policy - GET API.

Body
format_typestringRequired

Specifies the format (JSON) in which the data or file is processed.

compliance_namestringRequired

Name of the policy.

unique_keystringRequired

Unique key is code which is the name of the legal entity.

Responses
200

Update legal entity Policy

application/json
compliance_idstringOptional

A system-generated compliance ID to update a legal entity.

errorarrayOptional

Displays information about problems that occurred while handling the request. Commonly used to report validation errors, missing or invalid parameters, or other issues related to API processing.

put/apis/policy-sets/v1/policy/legal-entity/{compliance_id}
PUT /apis/policy-sets/v1/policy/legal-entity/{compliance_id} HTTP/1.1
Host: {realm}.{env}.rightrev.cloud/
Content-Type: application/json
Accept: */*
Content-Length: 394

{
  "format_type": "json",
  "compliance_name": "Sample legal entity",
  "unique_key": "code",
  "compliance_spec": [
    {
      "code": "LE-01080",
      "active": true,
      "name": "a1sHo000016hjcnIAA",
      "description": "LE_001",
      "transaction": false,
      "is_user_defined": true,
      "can_delete": true
    },
    {
      "code": "LE-01081",
      "active": true,
      "name": "a1sHo000016hnZ2IAI",
      "description": "LE_002",
      "transaction": false,
      "is_user_defined": true,
      "can_delete": true
    }
  ]
}
200

Update legal entity Policy

{
  "compliance_details": [
    {
      "error": [],
      "message": "created successfully",
      "unique_key": "LE-01080"
    },
    {
      "error": [],
      "message": "created successfully",
      "unique_key": "LE-01081"
    }
  ],
  "compliance_id": "c046db2c-e8d1-4f30-8aa5-89632cd8d510",
  "error": []
}

Last updated

Was this helpful?