To set up it, simply install EPICA application in your Shopify store and feed will configure automatically. Make sure that you complete this step before usage and reading this document.
The main endpoint for search(/api/v1/search) do not need authorization, but also need a write_key which you can find in our platform in account settings. As EPICA company client, you can also have an auth token. You can read more about it here.
Shopify product has several variants and when you are searching, we display most relevant of them. This public endpoint does not need any auth. There are GET and POST methods here:
GET method works fast but returns only 6 most relevant products and some extra information about it. We use it in the search widget
POST method works a little bit longer but has extra features like filtering and paging. You can see it in full search page
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 |
|
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 |
|
This endpoint is used to get all possible values for the filter
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 |
|
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 |
| |
Curl Example |
|
It should take time between installation and usage
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 |
|
We are planning a lot of configs. Now there is only one serve config display_not_active_products.
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 |
|
It is admin v0 endpoint. It's used for all components rebuilding (feed, models, recommenders)
Purpose | Full rebuild |
---|---|
Endpoint | /api/v0/search/reindex |
Method | POST |
(POST) Request body params | schema: (type: string) company schema name. system field |
Errors |
|