Skip to main content

Search Submissions

The Search Submissions API allows you to search for submissions within a specific form using field-level filters. This is useful for finding submissions by specific field values such as email, expiry date, or any other form field.

API Endpoint

POST {base_url}/ExtForm/submissions/search

Request Format

This endpoint accepts a POST request with a JSON body containing the form ID, optional state filters, and optional field-level filters.

Request Headers

Content-Type: application/json
Authorization: Bearer {token}

Request Body

{
"formId": "7ac9ab5e-4123-4456-b8c3-123456789012",
"states": ["Onboarding", "Approved"],
"email": "john@example.com",
"filters": [
{
"fieldId": "field-id-for-expiry-date",
"value": "2026-02-01",
"operator": "GreaterThanOrEqual"
}
]
}

Request Body Fields

FieldTypeRequiredDescription
formIdstringYesThe unique identifier of the form to search submissions for
statesarray of stringsNoList of KYC state values to filter by. If omitted, all states are included
emailstringNoFilter submissions by customer email (case-insensitive exact match). Matches against the email from the customer profile (UserDetails for individuals, Company for legal entities)
filtersarray of objectsNoList of field-level filters. All filters are combined with AND logic

Filter Object

FieldTypeRequiredDescription
fieldIdstringYesThe unique identifier of the field to filter on. Use the Get Form Fields API to retrieve field IDs
valuestringYesThe value to compare against
operatorstringNoThe comparison operator. Defaults to Equals

Filter Operators

OperatorDescriptionExample Use Case
EqualsExact match (default)Find a submission where email is exactly "john@example.com"
ContainsPartial text match (case-sensitive)Find submissions where name contains "John"
LessThanValue is strictly less than the filter valueFind submissions where amount is less than "5000"
GreaterThanValue is strictly greater than the filter valueFind submissions where expiry date is after "2026-02-01"
LessThanOrEqualValue is less than or equal to the filter valueFind submissions expiring on or before "2026-03-01"
GreaterThanOrEqualValue is greater than or equal to the filter valueFind submissions with amount at least "1000"

Supported Field Types for Filtering

The following answer model field types can be used in filters. Click the links to see the full answer model documentation.

Field TypeSupported OperatorsValue FormatExample
TextEquals, ContainsPlain string"john@example.com"
Text AreaEquals, ContainsPlain string"some description"
RichTextBoxEquals, ContainsPlain string"content to search"
Date PickerEquals, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqualISO date (yyyy-MM-dd)"2026-02-01"
NumericEquals, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqualDecimal number as string"1500.50"

Valid KYC State Values

The states parameter can include one or more of the following values from the KycStateEnum:

ValueDisplay NameDescription
NewNewInitial state for newly created submissions
OnboardingOnboardingCustomer is in the process of completing their submission
ComplianceReviewCompliance ReviewSubmission is under review by the compliance team
ApprovedApprovedSubmission has been approved
RejectedRejectedSubmission has been rejected
OnboardingAfterRejectionOnboarding After RejectionCustomer is updating their submission after a previous rejection

Response Format

{
"statusCode": 200,
"messages": ["Processed successfully"],
"result": {
"count": 1,
"submissions": [
{
"submissionId": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
"customerId": "cust-12345",
"customerName": "John Smith",
"submissionDate": "2023-05-15T14:30:45Z",
"kycState": "Onboarding",
"email": "john.smith@example.com",
"matchedValues": {
"field-id-for-email": "john.smith@example.com",
"field-id-for-expiry-date": "2026-02-15"
}
}
]
}
}

Response Fields

FieldDescription
countTotal number of submissions matching the filters
submissionsArray of submission objects
submissions[].submissionIdUnique identifier for the submission
submissions[].customerIdUnique identifier for the customer
submissions[].customerNameFull name of the customer
submissions[].submissionDateDate and time when the submission was created
submissions[].kycStateCurrent KYC state of the submission
submissions[].emailEmail address of the customer associated with the submission
submissions[].matchedValuesDictionary of field ID to actual stored value for each filtered field. Only present when filters are provided. Date values are formatted as yyyy-MM-dd, numeric values as decimal strings

Example Usage

Find submissions by email

curl -X POST \
'{base_url}/ExtForm/submissions/search' \
-H 'Authorization: Bearer your_token_here' \
-H 'Content-Type: application/json' \
-d '{
"formId": "7ac9ab5e-4123-4456-b8c3-123456789012",
"email": "john@example.com"
}'

Find submissions with expiry date within the next 10 days

curl -X POST \
'{base_url}/ExtForm/submissions/search' \
-H 'Authorization: Bearer your_token_here' \
-H 'Content-Type: application/json' \
-d '{
"formId": "7ac9ab5e-4123-4456-b8c3-123456789012",
"states": ["Approved"],
"filters": [
{
"fieldId": "expiry-date-field-id",
"value": "2026-02-20",
"operator": "LessThanOrEqual"
}
]
}'

Combine multiple filters (AND logic)

curl -X POST \
'{base_url}/ExtForm/submissions/search' \
-H 'Authorization: Bearer your_token_here' \
-H 'Content-Type: application/json' \
-d '{
"formId": "7ac9ab5e-4123-4456-b8c3-123456789012",
"states": ["Onboarding", "ComplianceReview"],
"filters": [
{
"fieldId": "name-field-id",
"value": "John",
"operator": "Contains"
},
{
"fieldId": "amount-field-id",
"value": "5000",
"operator": "GreaterThan"
}
]
}'

Error Handling

Status CodeDescriptionSolution
400Invalid form IDCheck that the form ID is correctly formatted
400Invalid state valueEnsure state values exactly match the KycStateEnum names
400Field not foundVerify the field ID exists using the Get Form Fields API
400Unsupported field type for filteringOnly Text, TextArea, RichTextBox, DatePicker, and Numeric fields support filtering
400Invalid operator for field typeCheck the supported operators table for the field type being filtered
400Invalid date or numeric valueEnsure dates use yyyy-MM-dd format and numeric values are valid decimals
401UnauthorizedVerify your authentication token
403ForbiddenCheck that your account has permission to access this form's submissions
500Internal server errorContact support with the error details

Important Notes

  1. All filters are combined using AND logic -- a submission must match every filter to be included in the results.
  2. The states parameter is optional. If omitted, submissions in all states are returned.
  3. The filters parameter is optional. If omitted, the endpoint behaves like the Get Submissions API but without requiring states.
  4. Field IDs can be retrieved using the Get Form Fields API.
  5. The operator field defaults to Equals if not specified.