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

# Budget outbound

# Tango Budget Outbound API

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

## Overview

Async **delta** REST API: client retrieves newly-approved or updated project-budget records from Tango. 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/projectmgmt/delta/budgets` | Initiate budget delta export — returns `gu_id`. |
| GET | `/v1/batch/status?gu_id=...&page_no=...` | Retrieve paginated records. |

## Integration logic

* Delta API: only newly-approved budgets or updates after the last integration run are included.
* `transaction_type = NEW` for newly approved budgets; `UPDATE` for changes to existing.
* Page size 5000; first page returned if `page_no` is omitted.
* Null fields are omitted from response JSON.

## Data model

| Field | Type | Notes |
| - | - | - |
| `transaction_type` | VARCHAR | `NEW` / `UPDATE` |
| `entity_type` | VARCHAR | e.g., `PROJECT` |
| `project_number` | VARCHAR | |
| `store_number` | VARCHAR | Store or site number depending on project source |
| `ownership_type` | VARCHAR | e.g., `Owned`, `Leased` |
| `budget_id` | NUMBER | |
| `line_number` | NUMBER | |
| `client_unique_num` | VARCHAR | |
| `milsetone_name` ⚠ | VARCHAR | **Typo in source** (should likely be `milestone_name`). Client Label: "Template Name". |
| `task_start_date` / `task_completion_date` | DATE | `MM/DD/YYYY` |
| `task_description` / `division` / `task_name` / `line_item_name` / `sub_task_type` / `sub_task_name` / `sub_line_item_name` / `task_type` / `account_code` / `comments` | VARCHAR | |
| `task_number` ⚠ | NUMBER → string | Mapping types as NUMBER but sample is `TSK125` (alphanumeric) |
| `proposed_budget` / `approved_budget` / `actual_cost` / `commitment` / `change_order` | NUMBER | |
| `budget_line_type` | VARCHAR | e.g., `General Costs` |
| `master_project_id` | NUMBER | |
| `expense_type` | VARCHAR | e.g., `Capital` |
| `n_ext_attr1` / `n_ext_attr2` | NUMBER | |
| `segment1`–`segment6` | VARCHAR | |
| `brand_name` ⚠ | NUMBER → string | Mapping types as NUMBER but sample is `Tango` (string) |

## Open Questions / Assumptions

* [ ] **Integration type header inconsistency** — header says `space Area outBOUND api` but the document is clearly about budgets (title, content, fields). Assumed a stale copy-paste from a different spec template.
* [ ] **`milsetone_name` typo** — should likely be `milestone_name`. Preserved verbatim.
* [ ] **`task_number` typed NUMBER** in mapping but sample is `TSK125` (alphanumeric). Schema uses string.
* [ ] **`brand_name` typed NUMBER** in mapping but sample is `Tango` (string). Schema uses string.
* [ ] **No validations** listed in the source doc.
* [ ] **Lookup codes** are `<TBD>` in Appendix.

## Changelog

| Ver | Date | Description | Author |
| - | - | - | - |
| 0.1 | 04/07/2025 | Initial Draft | Alpna Bansal |
| 0.2 | 03/10/2026 | Updated Functional Design, JSON and Data Mapping | Jasmin Thasleem |
| 0.3 | 04/22/2026 | Updated API architecture diagram | Alpna Bansal |
