Lookup

class ab.api.endpoints.lookup.LookupEndpoint(client)[source]

Reference/lookup data (ACPortal API).

Parameters:

client (HttpClient)

get_contact_types()[source]

GET /lookup/contactTypes

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_contact_types.html Response model: List[ContactTypeEntity]

Return type:

list[ContactTypeEntity]

get_countries()[source]

GET /lookup/countries

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_countries.html Response model: List[CountryCodeDto]

Return type:

list[CountryCodeDto]

get_job_statuses()[source]

GET /lookup/jobStatuses

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_job_statuses.html Response model: List[JobStatus]

Return type:

list[JobStatus]

get_items(*, job_display_id=None, job_item_id=None)[source]

GET /lookup/items

Parameters:
  • job_display_id (Optional[int]) – Optional job display ID filter.

  • job_item_id (Optional[str]) – Optional job item ID filter.

Return type:

list[LookupItem]

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_items.html Query params: LookupItemsParams Response model: List[LookupItem]

get_by_key(key)[source]

GET /lookup/{masterConstantKey}

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_by_key.html Response model: List[LookupValue]

Parameters:

key (str)

Return type:

list[LookupValue]

get_by_key_and_id(key, value_id)[source]

GET /lookup/{masterConstantKey}/{valueId}

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_by_key_and_id.html Response model: LookupValue

Parameters:
Return type:

LookupValue

get_access_keys()[source]

GET /lookup/accessKeys

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_access_keys.html Response model: List[AccessKey]

Return type:

list[AccessKey]

get_access_key(access_key)[source]

GET /lookup/accessKey/{accessKey}

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_access_key.html Response model: AccessKeySetup

Parameters:

access_key (str)

Return type:

AccessKeySetup

get_ppc_campaigns()[source]

GET /lookup/PPCCampaigns

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_ppc_campaigns.html Response model: List[PPCCampaign]

Return type:

list[PPCCampaign]

get_parcel_package_types()[source]

GET /lookup/parcelPackageTypes

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_parcel_package_types.html Response model: List[ParcelPackageType]

Return type:

list[ParcelPackageType]

get_document_types(*, document_source=None)[source]

GET /lookup/documentTypes

Parameters:

document_source (Optional[str]) – Optional document source filter.

Return type:

list[DocumentTypeBySource]

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_document_types.html Query params: LookupDocumentTypesParams Response model: List[DocumentTypeBySource]

get_common_insurance()[source]

GET /lookup/comonInsurance

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_common_insurance.html Response model: List[CommonInsuranceSlab]

Return type:

list[CommonInsuranceSlab]

get_density_class_map(*, carrier_api=None)[source]

GET /lookup/densityClassMap

Parameters:

carrier_api (Optional[str]) – Optional carrier API filter.

Return type:

list[DensityClassEntry]

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_density_class_map.html Query params: LookupDensityClassMapParams Response model: List[DensityClassEntry]

get_refer_categories()[source]

GET /lookup/referCategory

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_refer_categories.html Response model: List[LookupValue]

Return type:

list[LookupValue]

get_refer_category_hierarchy()[source]

GET /lookup/referCategoryHeirachy

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/get_refer_category_hierarchy.html Response model: List[LookupValue]

Return type:

list[LookupValue]

reset_cache()[source]

GET /lookup/resetMasterConstantCache

Docs: https://ab-sdk.readthedocs.io/en/latest/api/lookup/reset_cache.html

Return type:

None

Per-endpoint reference

Each route-backed method has its own page rendering the HTTP route, the Python and CLI call signatures, and the request/response model field tables. This is the page help(api.lookup.<method>) links to via its Docs: footer. These pages are generated by scripts/generate_endpoint_docs.py and kept current by a CI freshness gate.

Methods

get_contact_types

GET /lookup/contacttypes — List all contact types.

Returns: list[ContactTypeEntity]`

from ab import ABConnectAPI

api = ABConnectAPI(env="staging")
types = api.lookup.get_contact_types()
for t in types:
    print(t.name)

get_countries

GET /lookup/countries — List all countries.

Returns: list[CountryCodeDto]`

countries = api.lookup.get_countries()

get_job_statuses

GET /lookup/jobstatuses — List all job statuses.

Returns: list[JobStatus]`

statuses = api.lookup.get_job_statuses()

get_items

GET /lookup/items — List lookup items.

Returns: list[LookupItem]`

items = api.lookup.get_items()