...
Purpose | Search | ||
---|---|---|---|
Endpoint | /api/v1/search | ||
Method | GET | ||
(GET) Request params
(GET) Response fields
| query: (type: string) search query anonymous_id: (type: uuid) person identifier, generated by epica.js autocomplete_items: (type: array(string)) query suggestions
| ||
(POST) Request body params
| query: (type: string) search query anonymous_id: (type: uuid) person identifier, generated by epica.js
| ||
Errors |
| ||
Curl Example |
|
Platform API (need auth_token)
Filters
...
|
Platform API (need auth_token)
Filters
You can create your own filters based on search fields. There are some default filters after the initialization of the search app. Here is an example of how we use it
Purpose | Filters for full search | ||
---|---|---|---|
Endpoint | /api/v1/search/filters | ||
Method | GET | ||
(GET) Response fields
| filters: (type: array(object)) list of all filters
| ||
(POST/PUT) Request body params (POST/PUT) Request body example
| filters: (type: array(object)) list of new filters
| ||
(DELETE) Request body params (DELETE) Request body example
| filter_ids: (type: array(int)) list of filter ids to be delete | ||
Errors |
| ||
Curl Example |
|
...
Purpose | Setup fields for search | ||
---|---|---|---|
Endpoint | /api/v1/search/filter/items/{filter_id} | ||
Method | GET | ||
(GET) Request URL example (GET) Response fields (GET) Response example | /api/v1/search/filter/items/1
| ||
Errors |
| ||
Curl Example |
|
Fields setup
By default, all fields are included in the search, but you can exclude some of them. The endpoint is used in settings.
Purpose | Setup fields for search | |||||
---|---|---|---|---|---|---|
Endpoint | /api/v1/search/fields | |||||
Method | GET | |||||
(GET) Response fields (GET) Response example | search_fields: (type: array(object)) list of fields available for search
| |||||
(PUT) Request body params (PUT) Request body example
| fields: (type: array(object)) list of the field which should be modified
| Errors | 204: no content. It means that you forgot to pass fields in the request body.
| |||
Errors |
| |||||
Curl Example |
|
...
Purpose | Check the status of the search | ||
---|---|---|---|
Endpoint | /api/v1/search/info | ||
Method | GET | ||
(GET) Response body fields | availability: (type: bool) is search app ready or not | ||
Errors |
| ||
Curl Example |
|
...
Purpose | Store config | ||
---|---|---|---|
Endpoint | /api/v1/search/config | ||
Method | GET PUT | ||
(GET) Response body fields | display_not_active_products: (type: bool, default: false) filter by field active. Display all products if false | ||
(PUT) Request params | display_not_active_products: (type: bool, default: false) filter by field active. Display all products if false | ||
Errors |
| ||
Curl Example |
|
...
Purpose | Full rebuild |
---|---|
Endpoint | /api/v0/search/reindex |
Method | POST |
(POST) Request body params | schema: (type: string) company schema name. system field |
Errors |
|