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

# Customer supplier outbound

# Tango Customer / Supplier Outbound API

> Generated from `Tango Customer-Supplier Outbound API Integration Design Specification V0.3.docx` in SharePoint folder `01 Common Integrations`.
> OAS spec: [`customer-supplier-outbound.yaml`](./customer-supplier-outbound.yaml)

## Overview

Async **delta** REST API: client retrieves customer or supplier records from Tango (the supplier module produces both; `record_type` disambiguates). Two-call pattern with `gu_id` and pagination (5000/page).

**Owner:** Tango Analytics
**Spec version:** 0.3
**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/suppliermgmt/delta/suppliers` | Initiate delta export — returns `gu_id`. |
| GET | `/v1/batch/status?gu_id=...&page_no=...` | Retrieve paginated records. |

## Integration logic

* Delta API: only records updated after the last integration run are returned.
* `record_type` distinguishes Customer vs Supplier.
* `insert_update_flag` is `I` for new records or `U` for updates.
* `ein_ssn` is an encrypted string — Tango shares the decryption key with the client out-of-band.
* Null fields are omitted from response JSON.

## Data model (no required-field column)

| Field | Type | Notes |
| - | - | - |
| `supplier_number` | VARCHAR | |
| `supplier_type` | VARCHAR | `LEASE` / `PROJECT` / `ALL` |
| `record_type` | VARCHAR | `Customer` or `Supplier` |
| `legal_entity_type` | VARCHAR | `Company` / `Person` |
| `supplier_first_name` / `supplier_last_name` | VARCHAR | Populated for Person records |
| `supplier_site_name` / `supplier_site_number` | VARCHAR | |
| `supplier_site_type` | VARCHAR | Client-defined (Lessee/Payee/Tenant/etc.) |
| `primary_site` / `is_payee` | VARCHAR | Y/N |
| `payment_term` | VARCHAR | |
| `supplier_rating` | NUMBER | |
| `Partner` ⚠ / `Prequalified` ⚠ | VARCHAR | PascalCase in source mapping vs lowercase in sample JSON |
| `address1` / `address2` / `address3` | VARCHAR | |
| `City` ⚠ / `State` ⚠ / `Zip` ⚠ | VARCHAR | PascalCase in source mapping |
| `Country` ⚠ | VARCHAR | 3-letter (e.g., `USA`); PascalCase in source |
| `Status` ⚠ | VARCHAR | `Active` / `Inactive`; PascalCase in source |
| `Email` ⚠ / `Fax` ⚠ | VARCHAR | PascalCase in source |
| `contact_person` / `business_phone` / `cell_phone` | VARCHAR | |
| `payment_method` / `tax_id` / `bank_routing` / `bank_account` / `payment_email` / `payment_comments` | VARCHAR | |
| `effective_date` | DATE `MM/DD/YYYY` | |
| `creation_date` / `last_update_date` | TIMESTAMP | |
| `created_by` / `last_updated_by` | VARCHAR | |
| `insert_update_flag` | VARCHAR | `I` / `U` |
| `ein_ssn` 🔒 | VARCHAR | **Encrypted PII**; decryption key shared out-of-band |
| `c_ext_attr01..05` | VARCHAR | Custom string attributes |
| `c_ext_lov1..5` | VARCHAR | Custom lookups |
| `n_ext_attr01..05` | NUMBER | Custom numeric attributes |

## Open Questions / Assumptions

* [ ] **Direction inconsistency**: header `Source: CLIENT SYSTEM / Destination: TANGO` contradicts the description ("exporting from Tango to the client"). Treated as outbound per the description.
* [ ] **Field name casing mismatch** between mapping (`Partner`, `Prequalified`, `City`, `State`, `Zip`, `Country`, `Status`, `Email`, `Fax`, PascalCase) and the sample JSON (all lowercase). Mapping preserved verbatim — confirm wire format.
* [ ] **`ein_ssn` encryption**: confirm encryption algorithm and key-exchange mechanism with Tango onboarding before production use.
* [ ] **`country` sample shows `"null"`** (string `null`, not JSON null). May be a doc typo; treated as a regular string.

## Changelog

| Ver | Date | Description | Author |
| - | - | - | - |
| 0.1 | 03/25/2024 | Initial Draft | Jasmin Thasleem |
| 0.2 | 03/27/2025 | Added PII fields and external attributes | Alpna Bansal |
| 0.3 | 04/22/2026 | Updated API architecture diagram | Alpna Bansal |
