Companion to Tango #2377 (serializer + shaping parity for retyped Entity fields).
Tango's 0064_lakehouse_consumer_cleanup booleanizes nine Entity flag fields and drops source_type. After it ships, /api/entities/ and webhook alerts.entity.match payloads serialize those flags as JSON true / false / null instead of the legacy string tokens. tango-python should update its Entity Pydantic model to match.
Field type changes (str → bool)
| Field |
Old (str tokens) |
New (bool) |
registered |
"Y" |
true |
registration_status |
"Active" / "Inactive" |
true / false |
uei_status |
"Active" / "Not Active" |
true / false |
public_display_flag |
"Y" / "NPDY" |
true / false |
bonding_flag |
"YES" / "NO" |
true / false |
disaster_registry_flag |
"YES" / "NO" |
true / false |
debt_subject_to_offset |
"Y" / "N" |
true / false |
credit_card_usage |
"Y" / "N" |
true / false |
edi_information_flag |
"Y" / "N" |
true / false |
All nine should be Optional[bool] — pre-0064 tokens outside the known set (or NULL) map to None. The NPDY → false mapping for public_display_flag is the one non-obvious one; literal interpretation is "Not Publicly DisplaYed".
Other changes from the same migration
source_type: removed entirely from the API response. Remove it from the Pydantic model. Consumers that read entity.source_type should switch to entity.source (already populated, same semantic).
- Seven
*_desc top-level fields (purpose_of_registration_desc, entity_structure_desc, entity_type_desc, profit_structure_desc, organization_structure_desc, state_of_incorporation_desc, country_of_incorporation_desc) are removed from the default entity payload. They were already accessible via ?shape=…(*) expansion, which now derives {code, description} at render time and is unchanged in shape. If the SDK's Entity model has any of those top-level keys, drop them.
evs_source and exclusion_status_flag are now strictly enforced enums on the server ({"D&B", "E&Y"} and {"Y", "N", "D"} respectively). They still come back as strings; no SDK type change needed beyond optionally narrowing the field to a Literal[...].
Action items
~ Hal
Companion to Tango #2377 (serializer + shaping parity for retyped Entity fields).
Tango's
0064_lakehouse_consumer_cleanupbooleanizes nineEntityflag fields and dropssource_type. After it ships,/api/entities/and webhookalerts.entity.matchpayloads serialize those flags as JSONtrue/false/nullinstead of the legacy string tokens.tango-pythonshould update itsEntityPydantic model to match.Field type changes (str → bool)
registered"Y"trueregistration_status"Active"/"Inactive"true/falseuei_status"Active"/"Not Active"true/falsepublic_display_flag"Y"/"NPDY"true/falsebonding_flag"YES"/"NO"true/falsedisaster_registry_flag"YES"/"NO"true/falsedebt_subject_to_offset"Y"/"N"true/falsecredit_card_usage"Y"/"N"true/falseedi_information_flag"Y"/"N"true/falseAll nine should be
Optional[bool]— pre-0064 tokens outside the known set (or NULL) map toNone. TheNPDY→falsemapping forpublic_display_flagis the one non-obvious one; literal interpretation is "Not Publicly DisplaYed".Other changes from the same migration
source_type: removed entirely from the API response. Remove it from the Pydantic model. Consumers that readentity.source_typeshould switch toentity.source(already populated, same semantic).*_desctop-level fields (purpose_of_registration_desc,entity_structure_desc,entity_type_desc,profit_structure_desc,organization_structure_desc,state_of_incorporation_desc,country_of_incorporation_desc) are removed from the default entity payload. They were already accessible via?shape=…(*)expansion, which now derives{code, description}at render time and is unchanged in shape. If the SDK'sEntitymodel has any of those top-level keys, drop them.evs_sourceandexclusion_status_flagare now strictly enforced enums on the server ({"D&B", "E&Y"}and{"Y", "N", "D"}respectively). They still come back as strings; no SDK type change needed beyond optionally narrowing the field to aLiteral[...].Action items
Entitymodel field types intango/models.py.~ Hal