Skip to content

API Methods

Complete reference for all TangoClient methods. Every method corresponds to a Tango API endpoint.

For details on filtering parameters, response fields, and ordering options, see the API Reference and Data Dictionary.


Contracts

Contracts use cursor-based pagination and the SDK maps some parameter names for convenience.

list_contracts()

resp = client.list_contracts(
    # Pagination
    cursor=None,          # cursor token from previous response
    limit=25,             # results per page (max varies by plan)

    # Response shaping
    shape=ShapeConfig.CONTRACTS_MINIMAL,
    flat=False,
    flat_lists=False,

    # Text / parties
    keyword=None,         # full-text search (maps to API: search)
    recipient_name=None,  # vendor name (maps to API: recipient)
    recipient_uei=None,   # vendor UEI (maps to API: uei)
    piid=None,            # procurement instrument identifier
    solicitation_identifier=None,

    # Agencies
    awarding_agency=None, # agency code, name, or abbreviation
    funding_agency=None,

    # Codes
    naics_code=None,      # NAICS code (maps to API: naics)
    psc_code=None,        # PSC code (maps to API: psc)
    set_aside_type=None,  # set-aside type (maps to API: set_aside)

    # Dates (YYYY-MM-DD)
    award_date=None,
    award_date_gte=None,
    award_date_lte=None,
    pop_start_date_gte=None,
    pop_start_date_lte=None,
    pop_end_date_gte=None,
    pop_end_date_lte=None,
    expiring_gte=None,
    expiring_lte=None,

    # Fiscal year
    fiscal_year=None,
    fiscal_year_gte=None,
    fiscal_year_lte=None,

    # Dollars
    obligated_gte=None,
    obligated_lte=None,

    # Type
    award_type=None,

    # Sorting
    sort=None,            # field name: award_date, obligated, total_contract_value
    order=None,           # "asc" or "desc" (SDK combines sort+order into API ordering param)
)

Returns PaginatedResponse with shaped contract objects.

Parameter name mappings

The SDK uses more descriptive parameter names than the raw API. Key mappings: keyword -> search, naics_code -> naics, psc_code -> psc, recipient_name -> recipient, recipient_uei -> uei, set_aside_type -> set_aside. The sort + order parameters are combined into the API's ordering parameter (e.g., sort="award_date", order="desc" becomes ordering=-award_date).


IDVs (Indefinite Delivery Vehicles)

IDVs use cursor-based pagination.

list_idvs()

resp = client.list_idvs(
    limit=25,
    cursor=None,
    shape=ShapeConfig.IDVS_MINIMAL,
    flat=False, flat_lists=False, joiner=".",

    # Filters (use raw API parameter names)
    search=None, piid=None, solicitation_identifier=None,
    awarding_agency=None, funding_agency=None,
    naics=None, psc=None, set_aside=None,
    idv_type=None, recipient=None, uei=None,
    award_date=None, award_date_gte=None, award_date_lte=None,
    fiscal_year=None, fiscal_year_gte=None, fiscal_year_lte=None,
    pop_start_date_gte=None, pop_start_date_lte=None,
    expiring_gte=None, expiring_lte=None,
    last_date_to_order_gte=None, last_date_to_order_lte=None,
    ordering=None,
)

get_idv(key)

idv = client.get_idv(
    "IDV_KEY",
    shape=ShapeConfig.IDVS_COMPREHENSIVE,
    flat=False, flat_lists=False, joiner=".",
)

list_idv_awards(key)

List child contract awards under an IDV. Returns shaped contract objects with cursor-based pagination.

awards = client.list_idv_awards("IDV_KEY", limit=25, cursor=None, shape=None)

list_idv_child_idvs(key)

List child IDVs under a parent IDV.

child_idvs = client.list_idv_child_idvs("IDV_KEY", limit=25, cursor=None, shape=None)

list_idv_transactions(key)

List modification transactions for an IDV.

txns = client.list_idv_transactions("IDV_KEY", limit=100, cursor=None)

OTAs (Other Transaction Agreements)

OTAs use cursor-based pagination.

list_otas()

resp = client.list_otas(
    limit=25, cursor=None,
    shape=ShapeConfig.OTAS_MINIMAL,
    flat=False, flat_lists=False, joiner=".",

    search=None, awarding_agency=None, funding_agency=None,
    recipient=None, uei=None,
    award_date=None, award_date_gte=None, award_date_lte=None,
    fiscal_year=None, fiscal_year_gte=None, fiscal_year_lte=None,
)

get_ota(key)

ota = client.get_ota("OTA_KEY", shape=None, flat=False, flat_lists=False, joiner=".")

OTIDVs (Other Transaction IDVs)

OTIDVs use cursor-based pagination.

list_otidvs()

resp = client.list_otidvs(
    limit=25, cursor=None,
    shape=ShapeConfig.OTIDVS_MINIMAL,
    flat=False, flat_lists=False, joiner=".",
    # Same filter pattern as OTAs
)

get_otidv(key)

otidv = client.get_otidv("OTIDV_KEY", shape=None, flat=False, flat_lists=False, joiner=".")

Entities (Vendors / Recipients)

list_entities()

resp = client.list_entities(
    page=1, limit=25,
    shape=ShapeConfig.ENTITIES_MINIMAL,
    flat=False, flat_lists=False,

    search=None,          # text search
    name=None,            # entity name filter
    uei=None,             # unique entity identifier
    cage_code=None,       # CAGE code
    state=None,           # state code (e.g., "VA")
    zip_code=None,

    # Classification
    naics=None,           # NAICS code
    psc=None,             # PSC code
    socioeconomic=None,   # socioeconomic category
    purpose_of_registration_code=None,

    # Dollars
    total_awards_obligated_gte=None,
    total_awards_obligated_lte=None,
)

get_entity(key)

Retrieve a single entity by UEI or CAGE code.

entity = client.get_entity(
    "ZQGGHJH74DW7",  # UEI or CAGE code
    shape=ShapeConfig.ENTITIES_COMPREHENSIVE,
    flat=False, flat_lists=False,
)
print(entity.legal_business_name)
print(entity.cage_code)

Forecasts

list_forecasts()

resp = client.list_forecasts(
    page=1, limit=25,
    shape=ShapeConfig.FORECASTS_MINIMAL,
    flat=False, flat_lists=False,

    search=None, agency=None, status=None, source_system=None,
    naics_code=None, naics_starts_with=None,
    fiscal_year=None, fiscal_year_gte=None, fiscal_year_lte=None,
    award_date_after=None, award_date_before=None,
    modified_after=None, modified_before=None,
)

Opportunities

list_opportunities()

resp = client.list_opportunities(
    page=1, limit=25,
    shape=ShapeConfig.OPPORTUNITIES_MINIMAL,
    flat=False, flat_lists=False,

    search=None, active=None, agency=None,
    solicitation_number=None, notice_type=None,
    naics=None, psc=None, set_aside=None,
    place_of_performance=None,
    first_notice_date_after=None, first_notice_date_before=None,
    last_notice_date_after=None, last_notice_date_before=None,
    response_deadline_after=None, response_deadline_before=None,
)

Notices

list_notices()

resp = client.list_notices(
    page=1, limit=25,
    shape=ShapeConfig.NOTICES_MINIMAL,
    flat=False, flat_lists=False,

    search=None, active=None, agency=None,
    solicitation_number=None, notice_type=None,
    naics=None, psc=None, set_aside=None,
    posted_date_after=None, posted_date_before=None,
    response_deadline_after=None, response_deadline_before=None,
)

Grants

list_grants()

resp = client.list_grants(
    page=1, limit=25,
    shape=ShapeConfig.GRANTS_MINIMAL,
    flat=False, flat_lists=False,

    search=None, agency=None, status=None,
    opportunity_number=None, cfda_number=None,
    applicant_types=None,       # filter by eligible applicant types
    funding_categories=None,    # filter by funding category
    funding_instruments=None,   # filter by funding instrument
    posted_date_after=None, posted_date_before=None,
    response_date_after=None, response_date_before=None,
)

Protests

list_protests()

resp = client.list_protests(
    page=1, limit=25,
    shape=ShapeConfig.PROTESTS_MINIMAL,
    flat=False, flat_lists=False,

    search=None, agency=None, protester=None,
    case_number=None, solicitation_number=None,
    source_system=None, outcome=None, case_type=None,
    filed_date_after=None, filed_date_before=None,
    decision_date_after=None, decision_date_before=None,
)

Note

Protests do not support ordering.

get_protest(case_id)

protest = client.get_protest("B-12345", shape=None, flat=False, flat_lists=False)

Vehicles

list_vehicles()

resp = client.list_vehicles(
    page=1, limit=25,
    shape=ShapeConfig.VEHICLES_MINIMAL,
    flat=False, flat_lists=False, joiner=".",
    search=None,
)

get_vehicle(uuid)

vehicle = client.get_vehicle(
    "vehicle-uuid",
    shape=ShapeConfig.VEHICLES_COMPREHENSIVE,
    flat=False, flat_lists=False, joiner=".",
)

list_vehicle_awardees(uuid)

awardees = client.list_vehicle_awardees(
    "vehicle-uuid",
    page=1, limit=25,
    shape=ShapeConfig.VEHICLE_AWARDEES_MINIMAL,
    flat=False, flat_lists=False, joiner=".",
)

Subawards

list_subawards()

resp = client.list_subawards(
    page=1, limit=25,
    shape=ShapeConfig.SUBAWARDS_MINIMAL,
    flat=False, flat_lists=False,

    award_key=None, awarding_agency=None, funding_agency=None,
    prime_uei=None, sub_uei=None, recipient=None,
    fiscal_year=None, fiscal_year_gte=None, fiscal_year_lte=None,
)

GSA eLibrary Contracts

list_gsa_elibrary_contracts()

resp = client.list_gsa_elibrary_contracts(
    page=1, limit=25,
    shape=ShapeConfig.GSA_ELIBRARY_CONTRACTS_MINIMAL,
    flat=False, flat_lists=False, joiner=".",

    search=None, contract_number=None, key=None,
    piid=None, schedule=None, sin=None, uei=None,
)

get_gsa_elibrary_contract(uuid)

contract = client.get_gsa_elibrary_contract("uuid", shape=None, flat=False, flat_lists=False, joiner=".")

IT Dashboard Investments

list_itdashboard_investments()

resp = client.list_itdashboard_investments(
    page=1, limit=25,
    shape=ShapeConfig.ITDASHBOARD_INVESTMENTS_MINIMAL,
    flat=False, flat_lists=False, joiner=".",

    search=None, agency_code=None, agency_name=None,
    type_of_investment=None,
    updated_time_after=None, updated_time_before=None,
    cio_rating=None, cio_rating_max=None,
    performance_risk=None,
)

get_itdashboard_investment(uii)

investment = client.get_itdashboard_investment(
    "UII-CODE",
    shape=ShapeConfig.ITDASHBOARD_INVESTMENTS_COMPREHENSIVE,
    flat=False, flat_lists=False, joiner=".",
)

Organizations

list_organizations()

resp = client.list_organizations(
    page=1, limit=25,
    shape=ShapeConfig.ORGANIZATIONS_MINIMAL,
    flat=False, flat_lists=False,

    search=None, cgac=None, parent=None,
    level=None, type=None, include_inactive=None,
)

get_organization(fh_key)

org = client.get_organization("ORG_KEY", shape=None, flat=False, flat_lists=False)

Agencies & Offices

These endpoints return simple objects (not shaped).

list_agencies() / get_agency(code)

agencies = client.list_agencies(page=1, limit=25, search=None)
agency = client.get_agency("GSA")
print(agency["name"])

list_offices() / get_office(code)

offices = client.list_offices(page=1, limit=25, search=None)
office = client.get_office("4732")

Reference Data

list_business_types()

types = client.list_business_types(page=1, limit=25)

list_naics()

codes = client.list_naics(
    page=1, limit=25,
    search=None,
    employee_limit=None,
    employee_limit_gte=None, employee_limit_lte=None,
    revenue_limit=None,
    revenue_limit_gte=None, revenue_limit_lte=None,
)

Webhooks

Manage webhook subscriptions and endpoints programmatically. See the Webhooks Partner Guide for concepts and setup.

Event Types

event_types = client.list_webhook_event_types()

Subscriptions

# List
subs = client.list_webhook_subscriptions(page=1, page_size=None)

# Get
sub = client.get_webhook_subscription("sub-id")

# Create
sub = client.create_webhook_subscription(
    subscription_name="New contracts",
    payload={"event_type": "contract.created", "endpoint_id": "ep-id"},
)

# Update
sub = client.update_webhook_subscription(
    "sub-id",
    subscription_name="Updated name",
    payload=None,
)

# Delete
client.delete_webhook_subscription("sub-id")

Endpoints

# List
endpoints = client.list_webhook_endpoints(page=1, limit=25)

# Get
ep = client.get_webhook_endpoint("ep-id")

# Create
ep = client.create_webhook_endpoint(
    callback_url="https://example.com/webhook",
    is_active=True,
)

# Update
ep = client.update_webhook_endpoint("ep-id", callback_url=None, is_active=False)

# Delete
client.delete_webhook_endpoint("ep-id")

Testing

# Test delivery to an endpoint
result = client.test_webhook_delivery(endpoint_id="ep-id")

# Get sample payload for an event type
sample = client.get_webhook_sample_payload(event_type="contract.created")