> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tangoanalytics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lease outbound

# Tango Lease Outbound API

> Generated from `Tango Lease Outbound API Integration Design Specification V0.7.docx` in SharePoint folder `02 Lease Integrations`.
> OAS spec: [`lease-outbound.yaml`](./lease-outbound.yaml)

## Overview

Async **delta** REST API: client retrieves lease records that were created or updated since the last integration run. Information from Basic Info, Options & Terms, Contacts, Recurring Costs, and Obligations tabs is included. Two-call pattern with `gu_id` and pagination.

**Owner:** Tango Analytics
**Spec version:** 0.7
**Status:** Draft (auto-generated — needs review). **Field-level mapping not extracted from source.**

## Base URLs

| Environment | URL |
| - | - |
| Production | `https://api.tangoanalytics.com` |
| Test (SIT/UAT) | `https://testapi.tangoanalytics.com` |

## Authentication

Headers `x-client` + `x-api-key`.

## Endpoints

| Method | Path | Summary |
| - | - | - |
| GET | `/v1/leasemgmt/delta/leases` | Initiate delta lease export — returns `gu_id`. |
| GET | `/v1/batch/status?gu_id=...&page_no=...` | Retrieve paginated lease records. |

### `GET /v1/leasemgmt/delta/leases`

**Response — 200 OK**

```json theme={null}
{ "status": "OK/Error", "status_message": "", "gu_id": "721c54c4-c7aa-4fa1-8fdfd6-c0cee161694d" }
```

### `GET /v1/batch/status?gu_id=...&page_no=...`

Null fields **omitted**. Default `page_no = 1`, page size 5000.

## Integration logic

* Delta semantics: only records updated after the last integration run are returned.
* Lookup behavior: lookup values displayed in the UI are exported when `extattribute1` is not populated.

## Data model

⚠ **The source design doc does not include a complete field-level data-mapping table.** Only `lease_num`, `name`, and `acct_type_code` appear in the truncated response sample. The Tango Lease entity is rich (Basic Info, Options & Terms, Contacts, Recurring Costs, Obligations, etc.), and the full payload structure must be inferred from the production API or another source.

The YAML defines `LeaseRecord` with `additionalProperties: true` and the three documented fields.

## Open Questions / Assumptions

* [ ] **Complete field list is missing** — re-source from a doc revision that includes the data-mapping table, or extract from the production API surface.
* [ ] **Tab-by-tab content** (Options & Terms, Recurring Costs, Obligations, etc.) is mentioned but not specified in the extracted text.
* [ ] **`acct_type_code`**: present in the sample but not described.
* [ ] **Lookup behavior** with `extattribute1` is described but not enumerated for which fields/lookups it applies to.
* [ ] **Pagination** page size 5000 (non-configurable per the doc).

## Changelog

| Ver | Date | Description | Author |
| - | - | - | - |
| 0.1 | 06/27/2025 | Initial Draft | Jasmin Thasleem, Alpna Bansal |
| 0.2 | 07/07/2025 | Updated JSON and Data Mapping | Jasmin Thasleem |
| 0.3 | 07/15/2025 | Updated JSON and Data Mapping | Jasmin Thasleem |
| 0.4 | 08/05/2025 | Updated JSON and URL | Jasmin Thasleem |
| 0.5 | 09/03/2025 | Updated Data Mapping | Jasmin Thasleem |
| 0.6 | 09/22/2025 | Updated JSON and Data Mapping | Jasmin Thasleem |
| 0.7 | 05/13/2026 | Updated JSON and Data Mapping | Jasmin Thasleem |
