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

# Mac request inbound

# Tango Create MAC Request Inbound API

> Generated from `Tango Create MAC Request Inbound API Integration Design Specification V0.6.docx` in SharePoint folder `03 Space Integrations`.
> OAS spec: [`mac-request-inbound.yaml`](./mac-request-inbound.yaml)

## Overview

Async REST API for creating MAC (Move/Add/Change) requests in Tango. Request type drives which `from_*` / `to_*` fields are populated.

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

## Endpoints

| Method | Path | Summary |
| - | - | - |
| PUT | `/v1/spacemgmt/batch/moverequest` | Create MAC requests (async). |
| GET | `/v1/batch/status?gu_id=...` | Poll status. |

## Integration logic

| `request_type` | `from_*` fields | `to_*` fields |
| - | - | - |
| Add (`MOVE_REQ` to new) | Blank | Filled |
| Modify | Filled | Filled |
| Remove (`EXIT`) | Filled | Blank |

## Data model (required ✅)

| Field | Type | Req | Notes |
| - | - | - | - |
| `request_type` | VARCHAR | ✅ | Lookup: `MOVE_REQ` / `EXIT` / `NEW_HIRE` / `LOCKER_REQUEST` |
| `ext_request_number` | VARCHAR | ✅ | Client Integration ID. Source validation #1 references `CLIENT_REQUEST_NUMBER` — same field |
| `requested_by` | VARCHAR | ✅ | Employee Number of creator |
| `requested_for` | VARCHAR | ✅ | Person Number of subject employee |
| `requested_date` | DATE | – | `YYYY-MM-DD` format (different from other Tango APIs' MM/DD/YYYY) |
| `from_property` / `from_building` / `from_floor` / `from_space` / `from_area` ⚠ | VARCHAR | conditional | `from_area` typed `VARHCAR` (typo) in source |
| `to_property` / `to_building` / `to_floor` / `to_space` / `to_area` | VARCHAR | conditional | |
| `asset_number` | VARCHAR | – | |
| `justification` / `notes` / `mac_group` | VARCHAR | – | |
| `from_locker` ⚠ / `to_locker` ⚠ | VARCHAR | – | Fields don't yet exist in Tango per source note |
| `c_ext_attr1..10` | VARCHAR | – | Custom strings |
| `c_ext_lov1..5` | VARCHAR | – | Custom lookups |
| `n_ext_lov1..5` ⚠ | NUMBER | – | Naming inconsistency — typed NUMBER but named `_lov` |
| `d_ext_lov1..5` ⚠ | DATE | – | Naming inconsistency — should likely be `d_ext_attr*` |

## Validations

1. `CLIENT_REQUEST_NUMBER` NULL → `Client Integration Id is missing`
2. `requested_for` NULL/invalid → `Employee ID is invalid or missing`
3. `requested_by` NULL/invalid → `Employee ID is invalid or missing`
4. `request_type` invalid → `Request Type is invalid`

## Open Questions / Assumptions

* [ ] **`from_area` typed `VARHCAR`** (typo for VARCHAR) in source mapping. Preserved.
* [ ] **Naming asymmetry**: `n_ext_lov*` and `d_ext_lov*` use `_lov` suffix while `c_ext_attr*` and `c_ext_lov*` follow a different pattern. Likely a copy-paste error — confirm whether numeric/date extensions are `_attr` or `_lov`.
* [ ] **`from_locker` / `to_locker`** flagged in source as not yet existing in Tango. Spec includes them but they may not be wired up.
* [ ] **Validation #1 references `CLIENT_REQUEST_NUMBER`** but field is `ext_request_number`. Assumed same field, different label.
* [ ] **`requested_date` uses YYYY-MM-DD**, not MM/DD/YYYY like other Tango APIs. Confirm.
* [ ] **Source references SNOW (ServiceNow)** as the upstream system — the `Field` column in data mapping lists SNOW field names.
* [ ] **Host URL is placeholder `<<hostname>>/<<context>>`** in source.

## Changelog

| Ver | Date | Description | Author |
| - | - | - | - |
| 0.1 | 06/10/2022 | Initial Draft | Olivia Aneye |
| 0.2 | 07/21/2022 | Updated | Olivia Aneye |
| 0.3 | 09/12/2022 | Integration Status & formatting | Jasmin Thasleem |
| 0.4 | 11/23/2022 | Integration Status | Jasmin Thasleem |
| 0.5 | 10/1/2023 | Reformatted | Michael Phoenix |
| 0.6 | 04/22/2026 | Updated API architecture diagrams | Alpna Bansal |
