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

# Vendor inbound api

# Tango Vendor (Supplier Sites) Inbound API

> Generated from `Tango Vendor API Integration Design Specification V1.3.docx` in SharePoint folder `01 Common Integrations`.
> OAS spec: [`vendor-inbound-api.yaml`](./vendor-inbound-api.yaml)

## Overview

Async REST API: client PUTs vendor / supplier-site records to Tango. Creates / updates supplier sites with addressing, payment, and banking info.

**Owner:** Tango Analytics
**Spec version:** 1.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 |
| - | - | - |
| PUT | `/v1/suppliermgmt/suppliersites` | Submit vendor records (async). |
| GET | `/v1/batch/status?gu_id=...` | Poll processing status. |

## Integration logic

* Upsert key: `(supplier_number, supplier_site_number)`.
* `Supplier_type` defaults to `LEASE` if blank.
* `Status = A` / `I` (Active / Inactive).

## Data model (required ✅)

| Field | Type | Req | Notes |
| - | - | - | - |
| `supplier_site_name` ⚠ | VARCHAR | ✅ | Source label has typo "Suppler Site Name" |
| `supplier_site_number` | VARCHAR | ✅ | |
| `supplier_site_type` | VARCHAR | ✅ | Client-defined (Lessee/Payee/Tenant/etc.) |
| `Supplier_type` ⚠ | VARCHAR | ✅ | `LEASE` / `PROJECT` / `ALL`. **PascalCase in source mapping** |
| `Supplier_number` ⚠ | VARCHAR | ✅ | **PascalCase in source mapping** |
| `primary_site` | VARCHAR | ✅ | Y/N |
| `is_payee` | VARCHAR | ✅ | Y/N |
| `Country` ⚠ | VARCHAR | ✅ | ISO 3-letter; PascalCase in source |
| `Status` ⚠ | VARCHAR | ✅ | `A` / `I`; PascalCase in source |
| `payment_term` / `supplier_rating` / `Partner` / `Prequalified` | – | – | |
| `address1` / `address2` / `address3` | VARCHAR | – | |
| `City` ⚠ / `State` ⚠ / `Zip` ⚠ | VARCHAR | – | 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` | – | – | Banking & payment info |
| `effective_date` | DATE | – | `MM/DD/YYYY` |

## Validations (sample)

1. `supplier_number` null → `supplier_number is missing or empty`
2. `status` null → `Status is missing or empty`
3. `status` not in (`A`, `I`) → `Status does not match expected value`
4. `Supplier_type` not in (`LEASE`, `PROJECT`, `ALL`) → `Supplier Type does not match expected value`

## Open Questions / Assumptions

* [ ] **PascalCase / lowercase casing inconsistency** for many fields in source data mapping (`Supplier_type`, `Supplier_number`, `Country`, `Status`, `City`, `State`, `Zip`, `Email`, `Fax`, `Partner`, `Prequalified`). Preserved verbatim — confirm actual wire format.
* [ ] **Source label typo** "Suppler Site Name" — preserved.
* [ ] **`record_key` type inconsistency** in error sample: one entry shows `0010` (no quotes — could be number) and another `"0005-005"` (string). Modelled as `oneOf`.
* [ ] **Lookup codes** are `<TBD>` in Appendix.

## Changelog (compressed)

| Ver | Date | Description | Author |
| - | - | - | - |
| 0.1–1.2 | 2020-2024 | (see source doc — 12 revisions) | Various |
| 1.3 | 04/22/2026 | Updated API architecture diagram | Alpna Bansal |
