gu_id polling) applies to every REST API integration in this docs site, so what you learn here transfers directly to AP, AR, GL, Lease, Sales, and the rest.
Need SFTP file-based integration instead? Jump to the SFTP file delivery section at the bottom.
Prerequisites
1
Get your API credentials
Contact your Tango onboarding lead to request a client identifier and API key. You’ll receive two values:
x-client— a string identifying your client.x-api-key— a secret bound to that client.
x-api-key in a secret manager, never in source control.2
Confirm a supplier site exists
The Contracts Inbound API upserts on the key
(supplier_site_number, contract_number). Your supplier_site_number must already exist in Tango — if it doesn’t, submission will fail with supplier_site_number does not exist.Ask your Tango onboarding lead which supplier site numbers are pre-loaded in your test environment, or pick one from the data your team has already migrated.3
Pick an environment
Use the test environment for everything in this guide:For production, swap the base URL to
https://api.tangoanalytics.com and the credentials to your prod values.Submit your first batch
The Contracts Inbound endpoint accepts a JSON body with arecords array. The minimum required fields per record are: contract_number, contract_name, supplier_site_number, contract_start_date, contract_end_date, contract_amount.
Hang onto that
gu_id — you’ll use it in the next step. It uniquely identifies the batch and can be polled repeatedly. If you lose it you cannot retrieve the result; you’d need to resubmit (which would also overwrite, since the upsert key is (supplier_site_number, contract_number)).Poll for status
Tango processes the batch asynchronously. Hit the shared status endpoint until you get a terminal state (COMPLETED or ERROR):
- PROCESSING
- COMPLETED
- ERROR (partial)
Handle errors properly
A few error patterns to watch for:HTTP 401 / 403 on submission
HTTP 401 / 403 on submission
Your
x-client / x-api-key headers are missing, mistyped, or don’t have access to the endpoint. Verify both values and confirm with Tango that your client has the right permissions enabled.HTTP 400 with `status: Error` on submission
HTTP 400 with `status: Error` on submission
The submission itself was rejected before queueing — usually a malformed JSON body or a content-type mismatch. The
status_message field will tell you which. A gu_id is NOT returned for these.`status: ERROR` on status poll with empty errors[]
`status: ERROR` on status poll with empty errors[]
Tango couldn’t process the batch at all (rare). Check
status_message for context; resubmit the batch.Per-record validation failures
Per-record validation failures
See the Validations table in the per-integration
.md reference for the full list of error messages. Common ones:<field> is missing or empty— required field omitted.<field> does not match expected format— usually a date in something other thanMM/DD/YYYY.supplier_site_number does not exist— referenced an unknown entity.<field> does not match lookup value— sent a value outside the configured lookup set.
Where to go next
Browse all integrations
See every available integration grouped by domain.
API reference
The full OpenAPI 3.1 spec catalogue.
Async patterns deep dive
More on
gu_id, pagination, retries, and idempotency.Field conventions
Date formats, null-omission rules, currency handling.
Alternative: SFTP file delivery
If you’re integrating via SFTP files instead of REST APIs, the flow is different but simpler:1
Get SFTP credentials
Tango will provision a username + password (or SSH key) for the relevant SFTP host:
- Production:
sftp.tangoanalytics.com - Test (SIT/UAT):
sftpdev.tangoanalytics.com
2
Drop a pipe-delimited `.txt` file
Use the integration’s documented path and naming pattern, e.g.:Body is one record per line, fields separated by
|. See the integration’s .md reference for the exact column order.3
Wait for Tango to consume the file
Tango’s batch program picks up files on a pre-agreed schedule. Once consumed, the file moves to a
Processed/ subfolder with a timestamp suffix. Any errors are written to a service log and emailed to the configured contact.Most file-based integrations have a REST API counterpart that’s preferred for new work. Check the integrations list to see which mode is appropriate for your use case.

