Perform Search (Cortex API)

🚧

Notes

  • Make sure that you have access to EntitySearch resource. For more information, see access group documentation.
  • By default, this search (cortex search) is not enbabled for all the orgs. Raise a Jira ticket to the sustenance team to activate.
  • Make sure that a valid search criteria is available.
  • Deleted customers are not included in the search results.

This API is used when you want only matching customer or transaction ID values in the results for a given search. Further, if you want to add additional information to the search result, use the Datafield API to enrich the search result.

API endpoint

{host}//api_gateway/cortex/v1/search

Body parameters

ParameterTypeDescriptionRequired
entityTypeStringThe type of entity to search. Supported values: TRANSACTION, CUSTOMER.Yes
limitIntegerThe default value is often set to 10. The maximum value supported is 20. The search result is listed as per the customer registration date. The newly added customer is listed first.No
offsetIntegerThe starting point for the pagination. The default value for offset is 0, meaning the pagination starts from the first record. Any non-negative integer, representing the starting point for the pagination, is supported.No
searchConditionsArrayList of conditions to filter the search results.Yes
fieldIdStringThe field name to search. eg: ,billNumber, deliveryStatus etc. For search using prefix (Customer OR crteria), use field ID as search_prefix.Yes
operatorEnumThe comparison operator. Supported values EQUALS, STARTS_WITH, and RANGE (for date or date time fields). You cannot apply RANGE on multiple fields.Optional
valuesArrayValues to search against the field name (fieldId). For billDate, the date should be provided in epoch format.Yes

Response parameters

ParameterTypeDescription
dataArrayContains the list of entities returned in the response.
data[].entityTypeStringThe type of entity retrieved (e.g., TRANSACTION). Based on the search,
Transaction or Customer Search DetailsBased on the defined search, the transaction or customer details along with the custom field/extended field/other enrichment details appear.
warningsArrayList of warning messages, if any.
errorsArrayList of error messages, if any.

Error Codes

Error CodeDescription
1000Header not present
1002Entity type cannot be empty
1003Field descriptions cannot be empty
1004Field identifier cannot be empty
1005Field data source cannot be empty
1006Field data type cannot be empty
1007Problems with search conditions
1011Offset cannot be negative
1023Some search conditions are null or empty
1024Field identifier is missing
1025Search operator is missing
1026Search values are missing
1027Search conditions must be present
1028Only one value supported for equals operator
1029Indexed fields are missing from search conditions
1042Maximum range operators allowed per search exceeded
1043Range search only supported on date fields
1044Range search on date field only allowed with values in epoch
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!