Welcome to the Clearlaw Connect API reference. Clearlaw Connect is organized around the REST methodology, and it uses resource-oriented URLs, and common HTTP response codes to indicate API errors.

All requests are authenticated using a time-restricted token, which can be obtained from the /obtain-token/ endpoint. To obtain your token you need to send a secret and an api-key.

Agreements

 

PATH

POST /precedents

 

Endpoint

POST /tenants/<tenant_id>/precedents

 

Description

This method allows you to post an executed agreement to your Clearlaw account for analysis. It returns a precedent ID.

 

Request Parameters

Tenant ID: The identification number assigned to the organization.

Request

1{

2  "file": {

3    "name": "abc.pdf",

4    "content": "SnVzdCBhIGRvY3VtZW50Lg=="

5  }

6}

 

Responses

201 Created

403 Forbidden, in the absence of tenant integration

 

Response Example (201 Created)

1{

2  "id": 1

3}

 

 

Returning Data Analysis

 

PATH

GET /extracted_facts

 

Endpoint

1GET /tenants/<tenant_id>/precedent/<precedent_id>/extracted_facts

 

Description

This method allows you to receive the key metadata identified and extracted in the document.

 

Request Parameters

Precedent ID: The identification number assigned to the document.

 

Responses

200 OK

403 Forbidden, in the absence of tenant integration

404 Not Found, in the absence of a tenant or precedent or in case the facts are not yet available

 

Response Example (200 ok)

 

1{

2  "facts": [

3    {

4      "class": "CONTRACTING_PARTY_FACT,

5      "offset": {

6        "start": 123,

7        "end": 126

8      },

9      "value": {

10        "original": "ABC",

11        "normalized": "ABC",

12        "display": "ABC"

13      }

14    },

15    ...

16  ]

17}

18


 

PATH

GET /clause-analysis

 

Endpoint

1GET /class-analysis/{id}/result

 

Description

This method allows you to receive the original clause text for clause types found in the document.

 

Request Parameters

Precedent ID: The identification number assigned to the document.

 

Responses

200 OK

403 Forbidden, in the absence of tenant integration

404 Not Found, in the absence of a tenant or precedent or in case the facts are not yet available

 

Response Example (200 ok)

1{

2"data": {

3"tenantId": 1,

4"analysisId": 1846,

5"status": "CLASS_ANALYSIS_STATUS_COMPLETED",

6"userContractClass": "MASTER_SERVICES_AGREEMENT",

7"predictedContractClass": "MASTER_SERVICES_AGREEMENT",

8"clauses": {

9  "clausesList": [

10    {

11      "offset": {

12        "start": 26,

13        "end": 355

14      },

15      "originalText": "\nThis Master Services Agreement ("Agreement") is entered into and made effective as of       ("Effective Date") by and between Agility Technologies, Inc., a Delaware corporation, located at 1544 Market St., Suite 200, San Francisco, California 94103 ("Agility") and________, a            , whose address is       ("Consultant"). ",

16      "plaintextSignature": "ffc308903ae121399817e19fea8652ab",

17      "clauseClassesList": [34

18      ]

19    },

20