post https://{host}/v2/search/entity
You can use this API and search for a transaction data.
The Entity Search API allows you to search for specific entities (such as customers or transactions) based on defined search criteria.
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.
API endpoint
{host}//v2/search/entity
Body parameters
Parameter | Type | Description | Required |
---|---|---|---|
entityType | String | The type of entity to search Supported values: TRANSACTION, CUSTOMER. | Yes |
searchConditions | Array | List of conditions to filter the search results. | Yes |
fieldId | String | The field name to search. eg: ,billNumber, deliveryStatus etc | Yes |
operator | Enum | The comparison operator. Supported values EQUALS, STARTS_WITH. | Optional |
values | Array | Values to search against the field name (fieldId ). | Yes |
enrichmentFields | Object | Specifies additional data fields to be retrieved in the response. | Yes |
enrichedFields | Array | Additional enriched fields to be included in the search result. For example, if you want to include customer status in your response when searching for customer data, you can add customerStatus in the enrichedFields. Supported Fields Customer Entity: - customerStatus - statusLabel - registeredDate - loyaltyStatus - registeredStoreCode - registeredStoreName - cardNumber - cardSeriesName - lastUpdatedOn Transaction Entity- payment_mode - outlier_status - transaction_notes - last_updated_on_date_time If not required, you can leave this field empty.When enrichedFields are provided as an empty list, no enrichment will be applied for any field in the response. This can be useful when certain fields are not required for a specific query. | Optional |
customFields | Array | Custom fields that need to be included in the search results. For example, if you want to add information about a custom field called 'booking ID' in the response, you can specify the custom field name as 'booking ID'. If not required, you can leave this field empty. You can use an asterisk ([*]) sign in custom fields to include all available fields in that category in the response. If no values are mentioned, no custom fields will be fetched. | Optional |
extendedFields | Array | Extended fields that need to be included in the search results. For example, if you want to add information about an extended field called 'Gender' in the response, you can specify the extended field name as 'booking ID'. If not required, you can leave this field empty. You can use an asterisk ([*]) sign in extended fields to include all available fields in that category in the response. If no values are defined, no extended fields will be fetched. | Optional |
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. |