> ## 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.

# Ar outbound api

# Tango AR Outbound API

> Generated from `Tango AR Outbound API Integration Design Specification V1.0.docx` in SharePoint folder `02 Lease Integrations`.
> OAS spec: [`ar-outbound-api.yaml`](./ar-outbound-api.yaml)

## Overview

Async REST API: client GETs approved receivables (billings) from Tango. Two-call pattern with `gu_id` and paginated retrieval. Page size 5000.

**Owner:** Tango Analytics
**Spec version:** 1.0
**Status:** Draft (auto-generated — needs review)

## 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/receivables` | Initiate AR export — returns `gu_id`. |
| GET | `/v1/batch/status?gu_id=...&page_no=...` | Retrieve paginated records. |

### `GET /v1/leasemgmt/receivables`

Optional query params: `calendar_year`, `calendar_month`, `country`, `financial_group`.

**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=...`

Default `page_no = 1`, page size 5000. Null fields are **omitted** from the JSON.

## Data model (required ✅)

| Field | Type | Req | Notes |
| - | - | - | - |
| `rec_id` | NUMBER | ✅ | Tango unique receivable ID |
| `lease_num` | VARCHAR | ✅ | |
| `status` | VARCHAR | ✅ | Lease status |
| `term_status` | VARCHAR | ✅ | |
| `loc_num` | VARCHAR | ✅ | |
| `cus_num` | VARCHAR | ✅ | Customer (supplier site) number |
| `sys_gen_flag` | VARCHAR | – | |
| `category` / `type` | VARCHAR | ✅ | |
| `year` / `month` | VARCHAR | ✅ | Calendar (mapping note) |
| `effective_date` / `applies_from_date` / `applies_to_date` | DATE | – | `MM/DD/YYYY` |
| `inv_id` | VARCHAR | – | |
| `currency` / `receivable_currency` | VARCHAR | – | |
| `net` / `total_tax` / `gross` | NUMBER | – | |
| `tax_rate` / `tax1` / `tax2` | NUMBER | – | |
| `receivable_status` | VARCHAR | – | Charge status |
| `remit_message` / `inv_num` | VARCHAR | – | |
| `due_date` / `creation_date` | DATE | – | |
| `gl_acc` / `country` / `legal_entity` | VARCHAR | – | |
| `seg1`–`seg6` / `seg1_gl`–`seg6_gl` | VARCHAR | – | Segment columns |
| `extattribute1`–`extattribute15` | VARCHAR | – | |
| `supplier_number` | VARCHAR | – | |

## Open Questions / Assumptions

* [ ] **Source typo**: the doc mapping lists `segt2_gl` instead of `seg2_gl`. Preserved verbatim in the schema; confirm whether the real Tango field name is `seg2_gl`.
* [ ] **`year` / `month` typing mismatch**: response example shows `"year": "2020"` (string), the mapping says VARCHAR, but the comment says "Calendar year/month" implying numeric. Schema follows mapping (string).
* [ ] **Status response shape** for this endpoint is documented less completely than AP Outbound's — assumed the same paginated header pattern.
* [ ] **Lookup codes** are `<TBD>` in Appendix.

## Changelog

| Ver | Date | Description | Author |
| - | - | - | - |
| 0.1–0.9 | 2021-2025 | (see source doc) | Various |
| 1.0 | 04/22/2026 | Updated API Architecture | Jasmin Thasleem |
