post https://{host}/api_gateway/cortex/v1/search
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
Parameter | Type | Description | Required |
---|---|---|---|
entityType | String | The type of entity to search. Supported values: TRANSACTION, CUSTOMER. | Yes |
limit | Integer | The 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 |
offset | Integer | The 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 |
searchConditions | Array | List of conditions to filter the search results. | Yes |
fieldId | String | The field name to search. eg: ,billNumber, deliveryStatus etc. For search using prefix (Customer OR crteria), use field ID as search_prefix . | Yes |
operator | Enum | The comparison operator. Supported values EQUALS, STARTS_WITH, and RANGE (for date or date time fields). You cannot apply RANGE on multiple fields. | Optional |
values | Array | Values to search against the field name (fieldId ). For billDate, the date should be provided in epoch format. | Yes |
Response parameters
Parameter | Type | Description |
---|---|---|
pagination | Object | Contains details about the pagination of the response. |
pagination.limit | Integer | The maximum number of records returned per request. |
pagination.offset | Integer | The starting index for fetching records. For instance, an offset=10 would skip the first 10 records and start returning results from the 11th record onwards. |
pagination.sortBy | String | The field used to sort the results. |
pagination.sortOrder | String | The sorting order (ASC for ascending, DESC for descending). |
pagination.total | Integer | The total number of records available. |
data | Array | Contains the list of entities returned in the response. |
data[].entityType | String | The type of entity retrieved (e.g., TRANSACTION ). Based on the search, |
Transaction or Customer Search Details | Based on the defined search, the transaction or customer details along with the custom field/extended field/other enrichment details appear. | |
warnings | Array | List of warning messages, if any. |
errors | Array | List of error messages, if any. |