# Get Lease By ID

<mark style="color:blue;">`GET`</mark> /v3/leases/<mark style="color:orange;">{leaseId}</mark>

## Request

The details below help you form your HTTP requests to this endpoint.

### Headers

You may need to provide specific headers.

<table><thead><tr><th>Name</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>customer-token</td><td>string</td><td>true</td><td>Customer's authentication token</td></tr><tr><td>x-version-override</td><td>string</td><td>false</td><td>N/A</td></tr></tbody></table>

### Path Parameters

The endpoint path expects parameters.

<table><thead><tr><th>Name</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>leaseId</td><td>string</td><td>true</td><td>Lease agreement identifier</td></tr></tbody></table>

## Response

The details below help you understand the responses you could get from this endpoint.

### Samples

Below are samples of responses, with tabs corresponding to returned status code.

{% tabs %}
{% tab title="200" %}

```javascript
{
    "data": {
        "leaseId": "\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1YTk...",
        "contract": "...base64 html contract",
        "leaseStatus": "signed",
        "frequency": "weekly",
        "term": 52,
        "payment": 17.28,
        "cashPrice": 400,
        "costOfRental": 440,
        "isExpired": false
    }
}
```

{% endtab %}

{% tab title="400" %}

```javascript
{
    "error": {
        "statusCode": 400,
        "code": "UserAlreadyExists",
        "message": "User already exists with email ex@example.com",
        "data": {}
    }
}
```

{% endtab %}

{% tab title="404" %}

```javascript
{
    "error": {
        "statusCode": 404,
        "code": "LeaseNotFound",
        "message": "The lease requested was not found",
        "data": {}
    }
}
```

{% endtab %}
{% endtabs %}

### Schema

The response's schema is outlined below.

<table><thead><tr><th>Name</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td>object</td><td>false</td><td>N/A</td></tr><tr><td>data.leaseId</td><td>string</td><td>true</td><td>A unique identifier for the generated lease</td></tr><tr><td>data.contract</td><td>string</td><td>true</td><td>The lease contract, expressed as base64-encoded HTML</td></tr><tr><td>data.leaseStatus</td><td>string</td><td>true</td><td>N/A</td></tr><tr><td>data.frequency</td><td>string</td><td>true</td><td>Frequency of lease payments</td></tr><tr><td>data.term</td><td>number</td><td>true</td><td>Term of the lease</td></tr><tr><td>data.payment</td><td>number</td><td>true</td><td>Periodic payment with tax</td></tr><tr><td>data.cashPrice</td><td>number</td><td>false</td><td>Cash price of the lease</td></tr><tr><td>data.costOfRental</td><td>number</td><td>true</td><td>Cost of the lease</td></tr><tr><td>data.isExpired</td><td>boolean</td><td>false</td><td>Whether the lease has expired</td></tr></tbody></table>
