Recommender

In order to use Recommender API, you should install EPICA for Shopify application from Shopify AppStore and enable the recommender widget.

In all examples {write_key} can be obtained in EPICA Dashboard.

Version

Purpose

Get recommender API version

Endpoint

/api/v1/recommender/{write_key}/version

Auth

None

Method

GET

Request example

Response example

Errors

  • 500: server error.

Curl Example

Segments

There you can see all available segments of the recommender. Segment here is a type of recommender.

Purpose

Get recommender segments

Endpoint

Auth

Method

Request example

Response example

Errors

  • 500: server error.

Curl Example

Products

There you can make requests to get recommended products (general segment) for the particular user or other products according to the segments below.

Purpose

Get product items from different segments

Endpoint

Auth

Method

Request example

Body parameters

  • anonymous_ids - a list of users to process

  • fields - a list of return fields

  • filters - to apply filters by categories or tags

  • complementary_sku - a product sku for further processing

  • segment - to select type of return items ("general", "last_viewed", "most_popular", "trending", "new_arrivals", "complementary")

  • n_items - the amount of returned items

Request data example

Response example

Errors

  • 400: bad request. It means that you send an incorrect json or wrong parameters inside.

  • 500: server error.

Curl Example

Categories

You can make requests to get the recommended categories (general segment) for the particular user or other ones according to the segments below.

Purpose

Get category items from different segments

Endpoint

Auth

Method

Request example

Body parameters

  • anonymous_ids - a list of users to process

  • fields - a list of return fields

  • segment - to select type of return items ("general", "most_popular", "trending")

  • n_items - the amount of returned items

Request data example

Response example

Errors

  • 400: bad request. It means that you send an incorrect json or wrong parameters inside.

  • 500: server error.

Curl Example

 Accessing by config

You can make requests to get recommended products by pre-created configurations (check IDs in Shopify app UI) specifying a config_id.

Purpose

Accessing the recommender using the config

Endpoint

Auth

Method

Request example

Request data example

Response example

Errors

  • 500: server error.

Curl Example