Get account field definitions
account.definitions() -> AccountDefinitionsResponse
GET/v1/accounts/definitions
Returns the schema for all field and relationship definitions available on accounts, including both system-defined and custom fields. Useful for understanding the shape of account data before creating or updating records. See Fields and relationships for more details.
Required scope: accounts:read
Rate limit category: Read
Returns
Get account field definitions
from lightfield import Lightfield
client = Lightfield(
api_key="My API Key",
)
account_definitions_response = client.account.definitions()
print(account_definitions_response.field_definitions){
"fieldDefinitions": {
"foo": {
"description": "description",
"label": "label",
"typeConfiguration": {
"foo": "string"
},
"valueType": "ADDRESS",
"id": "id",
"readOnly": true
}
},
"objectType": "objectType",
"relationshipDefinitions": {
"foo": {
"cardinality": "HAS_ONE",
"description": "description",
"label": "label",
"objectType": "objectType",
"id": "id"
}
}
}Returns Examples
{
"fieldDefinitions": {
"foo": {
"description": "description",
"label": "label",
"typeConfiguration": {
"foo": "string"
},
"valueType": "ADDRESS",
"id": "id",
"readOnly": true
}
},
"objectType": "objectType",
"relationshipDefinitions": {
"foo": {
"cardinality": "HAS_ONE",
"description": "description",
"label": "label",
"objectType": "objectType",
"id": "id"
}
}
}