For every text unit returned, a unitType identifier will be returned. This field is a number that maps to the system unit types.
The DiscoverText system unit types can be gotten from the following API call:
GET
https://api.discovertext.com/api/v1/system/unitTypes
Return Value: A list of unit types:
{
types: [
{ id: {type_id}, name: "{type_name}" },
{ id: {type_id}, name: "{type_name}" },
{ id: {type_id}, name: "{type_name}" },
...
]
}
As these types will rarely change, it is advisable to get them once and cache the results as needed.