You’re hitting three separate issues that need to be addressed for full custom field API searchability:
1. Custom Field Indexing:
Your custom fields need explicit index configuration. Navigate to Admin > Data Modeling > Contract Schema and update each custom field:
{
"fieldName": "regulatory_category",
"indexed": true,
"indexType": "keyword"
}
Set indexType based on field purpose:
- “keyword” for exact-match categorical fields (regulatory_category, audit_status)
- “text” for fields needing partial matching (notes, descriptions)
- “date” for date fields (renewal_notice_date)
2. API Query Parameter Support:
Your query syntax is incorrect for custom fields. AEC 2022 requires the customFieldFilters parameter:
{
"customFieldFilters": [
{
"field": "regulatory_category",
"operator": "equals",
"value": "FDA"
}
],
"fields": ["contract_id", "custom.regulatory_category"]
}
Note the “custom.” prefix in the fields array - this is required to retrieve custom field values in API responses.
3. Search Index Rebuild:
After updating field configurations, trigger a manual index rebuild:
Access the AEC Admin Console > System > Search Index Management
- Select “Contract Management” module
- Choose “Rebuild Custom Field Index”
- Monitor progress in the job queue
For large datasets (>100K contracts), this can take 4-6 hours. The rebuild is necessary because existing records weren’t indexed for these fields when they were first created.
Additional Configuration Steps:
- Verify API user permissions include “custom_field_api_access” role
- Update your API integration to use the correct endpoint version (v2.1+ supports custom field filtering)
- Add custom fields to your API response schema mapping
- Test with a small dataset first using the sandbox environment
Query Examples After Configuration:
Single field filter:
{
"customFieldFilters": [{"field": "audit_status", "operator": "equals", "value": "pending"}]
}
Multiple field filter with date range:
{
"customFieldFilters": [
{"field": "regulatory_category", "operator": "equals", "value": "FDA"},
{"field": "renewal_notice_date", "operator": "between", "value": ["2025-01-01", "2025-12-31"]}
]
}
After implementing these changes, your nightly compliance reporting should successfully query custom fields. The key issue is that AEC separates UI and API search capabilities, requiring explicit configuration for API access to custom fields.