Skip to content

Shared response objects

This page defines shared objects returned across Tango API endpoints, especially when using response shaping (?shape=).

Set-aside

Many endpoints expose a set_aside field. When expanded (e.g. set_aside(code,description)), it returns an object:

{
  "code": "SBA",
  "description": "Small Business Set Aside - Total"
}

If the underlying value is missing, the API returns null for set_aside.

For the full list of codes and their meanings, see Set-aside codes.

Date filters

All date range filters across the API require YYYY-MM-DD format (e.g. 2024-06-15). The API validates date inputs and returns HTTP 400 for:

  • Invalid format: any value that is not a valid YYYY-MM-DD string (e.g. 2024-13-01, not-a-date, 01/15/2024).
  • Inverted range: when the "after" / "gte" value exceeds the "before" / "lte" value (e.g. award_date_gte=2025-01-01&award_date_lte=2024-01-01).

The error response body includes a human-readable message identifying the invalid parameter and value.

Endpoints use two naming conventions for range pairs, but validation is identical:

Convention Example params
_gte / _lte pop_start_date_gte, pop_start_date_lte
_after / _before posted_date_after, posted_date_before

Fiscal year filters (fiscal_year, fiscal_year_gte, fiscal_year_lte) use YYYY format and are validated separately.

Office

Several endpoints expand an office into a common office object (for example: office(...), awarding_office(...), or funding_office(...) depending on the endpoint).

When expanded, office objects use this shape:

{
  "office_code": "1234",
  "office_name": "Office Name",
  "agency_code": "12",
  "agency_name": "Agency Name",
  "department_code": "1",
  "department_name": "Department Name"
}