Campaigns — API Reference
Prepare personalized communication for your Customers
100 endpoints across 7 tags.
Screen views
GET /schema-service/v3/screen-views/{feedSlug}/generate — Generate screen view from feed
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByFeedGetV2
When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned data is empty.
IMPORTANT: When the request's context is a Workspace or Synerise User JWT, only screen views with the audience set to ALL ("Everyone" in the Synerise Web Application) can be generated.
If the feed doesn't contain any screen views whose audience matches the JWT context of the request, the response is error 404.
API consumers: Workspace (Business Profile), Synerise User, Profile (Client), Anonymous Profile, Incognito Profile
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feedSlug | path | string | required | Slug of the screen view feed |
Responses
| Status | Description |
|---|---|
200 application/json | Processed JSON content |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v3/screen-views/{feedSlug}/generate — Generate screen view from feed
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/generateScreenViewByFeedPostV2
When this method is called, the Synerise backend finds all screen view campaigns applicable to the JWT context and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned data is empty.
IMPORTANT: When the request's context is a Workspace or Synerise User JWT, only screen views with the audience set to ALL ("Everyone" in the Synerise Web Application) can be generated.
If the feed doesn't contain any screen views whose audience matches the JWT context of the request, the response is error 404.
API consumers: Workspace (Business Profile), Synerise User, Profile (Client), Anonymous Profile, Incognito Profile
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feedSlug | path | string | required | Slug of the screen view feed |
Request body
application/json · object
Responses
| Status | Description |
|---|---|
200 application/json | Processed JSON content |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v3/screen-views/%7BfeedSlug%7D/generate \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"property1":"string","property2":"string"}'
POST /schema-service/screen-views/create — Create screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view
Create a screen view.
API consumer: Synerise User
User role permission required: assets_docs: create
Request body
application/json · schema-service-CreateScreenViewRequest
| Field | Type | Required | Description |
|---|---|---|---|
priority | integer | required | Priority determines which screen view to show to a customer if their profile matches the conditions of more than one screen view. 1 is the highest priority.
|
name | string | optional | Name of the screen view |
directoryId | string | required | UUID of a directory. Directories can be used to organize documents and screen views for display in the Synerise Web Application. If you want to organize documents for screen view campaigns, use document groups instead. If you want to organize screen views for display, use screen view feeds instead. |
content | object | required | Content of the screen view |
audience | object | required | The profiles (clients) which have access to this resource |
schedule | object | optional | Configuration of the schedule |
feedId | string | required | UUID of the feed where this screen view is assigned. |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screen-views/create \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"priority":99,"name":"string","directoryId":"786c2ec1-fb9a-4593-b705-005b34c18c18","content":{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false},"audience":{"targetType":"SEGMENT","segments":["string"],"query":"{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"},"schedule":{"enabled":true,"endDate":"2019-08-24T14:15:22Z","endType":"NEVER","parts":[{"startDay":1,"startTime":"08:18:03","endDay":1,"endTime":44283}],"periodType":"ENTIRE","startDate":"2019-08-24T14:15:22Z","startType":"NOW","timezone":"Europe/Warsaw"},"feedId":"30c3a808-1315-453b-94cf-0ccb129b558b"}'
POST /schema-service/v2/screen-views/createNew — Initialize screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-new-screen-view
Create a screen view. It is created as a blank, without any conditions.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Request body (required)
application/json · schema-service-CreateRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | optional | If no name is provided, defaults to "Unnamed document" or Screen View Campaign" (depending on what you are initializing). |
directory | string | optional | If no directory is provided, the default directory is used. |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/createNew \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string","directory":"5277859d-f92c-478c-acab-7680a97fea68"}'
POST /schema-service/v2/screen-views/{screenViewId}/content — Add content to screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-content
Add content to a screen view. This overwrites any existing content.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Request body
application/json · schema-service-ScreenViewContent
| Field | Type | Required | Description |
|---|---|---|---|
json | object | required | JSON structure of the screen view. By default, a newly created screen view has the following json value:
"collection": "{% screenviewcollection %}"
The {% screenviewcollection %} insert is used to pick and display the documents from the documents in documents or groups.
If this insert is not used, you must manually insert each document with {% document slug%}.
|
documents | array<string> | required | An array of documents. If groups is used, this array must be empty.
|
data | array<any> | optional | An array of documents or Brickworks records |
groups | array<schema-service-DocumentGroupId> | required | An array of document groups, If documents is used, this array must be empty.
|
groupsOrder | boolean | optional | By default, group are ordered for display by their priority. When this field is set to true, they are displayed according to their order in the groups array instead.
|
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/content \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false}'
POST /schema-service/v2/screen-views/{screenViewId}/audience — Add audience to screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-audience
Define the audience for a screen view.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Request body
application/json · schema-service-Audience
| Field | Type | Required | Description |
|---|---|---|---|
targetType | enum<"SEGMENT", "QUERY", "ALL"> | required | The method of defining the audience:
SEGMENT sets the audience to segmentations whose UUIDs are provided in segments
QUERY sets the audience to an analytics query provided in query
ALL sets the audience to all profiles in the database
|
segments | array<string> | optional | An array of segmentation IDs. Used with targetType: SEGMENT
|
query | string | optional | Stringified analysis object for the segmentation analytics engine. Used with targetType: QUERY. Refer to the Analytics API Reference.
|
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/audience \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"targetType":"SEGMENT","segments":["string"],"query":"{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"}'
PUT /schema-service/v2/screen-views/{screenViewId}/priority — Update screen view priority
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/updateScreenViewPriority
Update priority in a screen view.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Request body
application/json · schema-service-screenViewPriority
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/priority \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data 99
PUT /schema-service/v2/screen-views/{screenViewId}/name — Rename screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/updateNameOfScreenView
Update the name of a screen view. You can update the names of active screen views.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Request body (required)
application/json · string
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/name \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '"string"'
POST /schema-service/v2/screen-views/{feedSlug}/generate/by/{identifierType} — Preview screen view with a profile context
This endpoint can be used to preview a generated document as a Workspace or Synerise User. To generate the output as a profile (client), use one of the following methods:
When this method is called, the Synerise backend finds all screen view campaigns in the requested feed which are applicable to the profile and returns the screen view with the highest priority (1). Inserts are processed. If an insert can't be processed, the returned data is empty.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feedSlug | path | string | required | Slug of the screen view feed |
identifierType | path | enum<"id", "uuid", "email", "custom_identify"> | required | Type of the profile identifier. The value is sent in identifierValue in the request body.
|
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the profile identifier selected in identifierType (profile ID is sent as a string)
|
params | object | optional | Additional parameters |
Responses
| Status | Description |
|---|---|
200 application/json | Processed JSON content |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BfeedSlug%7D/generate/by/%7BidentifierType%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string","params":{"property1":"string","property2":"string"}}'
GET /schema-service/v2/screen-views/feeds — List screen view feeds
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/feed-list
Returns a list of screen view feeds.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Responses
| Status | Description |
|---|---|
200 application/json | List of feeds |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/v2/screen-views/feeds \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/feeds — Create screen view feed
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/add-feed
Create a new screen view feed.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Request body
application/json · schema-service-ScreenViewFeed
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | required | Unique slug of the screen view feed |
name | string | required | Name of the screen view feed |
Responses
| Status | Description |
|---|---|
200 application/json | Feed created |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/feeds \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"slug":"string","name":"string"}'
GET /schema-service/v2/screen-views — List screen views
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/screen-views-list
Returns a paginated list of screen views.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | optional | |
limit | query | number | optional | Limit of items per page |
search | query | string | optional | A string to search for in resource names |
directoryId | query | string | optional | UUID of the directory for filtering the results |
status | query | enum<"DRAFT", "ACTIVE", "SCHEDULED", "PAUSED", …> | optional | |
feedId | query | string | optional |
Responses
| Status | Description |
|---|---|
200 application/json | List of screen views |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/schema-service/v2/screen-views?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&feedId=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /schema-service/v2/screen-views/{screenViewId} — Get screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/get-screen-view
Retrieve the details of a screen view.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Details of the screen view |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
DELETE /schema-service/v2/screen-views/{screenViewId} — Delete screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/delete-screen-view
Delete a screen view.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_DELETE
User role permission required: assets_docs: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Screen view deleted |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/{screenViewId}/copy — Copy screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/copy-screen-view
Copy a screen view. The copy receives the DRAFT status, regardless of the status of the original screen view.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Data of the created copy |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/copy \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /schema-service/v2/screen-views/{screenViewId}/predecessors — Get predecessors for screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/screenview-predecessors-get
Retrieve information about documents or screen views that refer to the requested screen view.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Entities which refer to the requested screen view |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/predecessors \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /schema-service/v2/screen-views/{screenViewId}/successors — Get successors for screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/screenview-successors-get
Retrieve information about documents referenced from the requested screen view.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Documents referenced from the requested screen view |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/successors \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /schema-service/v2/screen-views/directory — List screen view directories
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/directory-list
Returns a list of screen view directories.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Responses
| Status | Description |
|---|---|
200 application/json | List of directories |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/v2/screen-views/directory \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/directory — Add screen view directory
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/add-directory
Create a directory for screen views.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Request body
application/json · schema-service-NewDirectory
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | Name of the directory |
Responses
| Status | Description |
|---|---|
200 application/json | Directory created |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/directory \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string"}'
POST /schema-service/v2/screen-views/directory/{directoryId} — Rename screen view directory
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/update-name-directory
Update the name of a screen view directory.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_DELETE
User role permission required: assets_docs: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
directoryId | path | string | required | UUID of the directory |
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string"}'
DELETE /schema-service/v2/screen-views/directory/{directoryId} — Delete screen view directory
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/deleteDirectory
Delete a screen view directory. The contents are moved into the default directory.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_DELETE
User role permission required: assets_docs: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
directoryId | path | string | required | UUID of the directory |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/schema-service/v2/screen-views/directory/%7BdirectoryId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/{screenViewId}/directory/{directoryId}/attach — Assign screen view to directory
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/attach-screen-views-to-directory
Assign a screen view to a directory. A screen view can only belong to one directory and using this endpoint overwrites the current assignment.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_DELETE
User role permission required: assets_docs: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
directoryId | path | string | required | UUID of the directory |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/directory/%7BdirectoryId%7D/attach \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/{screenViewId}/feed — Assign screen view to feed
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/create-screen-view-feed
Assign a screen view to a feed.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Request body
application/json · string
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/feed \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '"497f6eca-6276-4993-bfeb-53cbbbba6f08"'
POST /schema-service/v2/screen-views/feeds/{feedId} — Rename screen view feed
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/update-name-feed
Update the name of a screen view feed.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feedId | path | string | required | UUID of a screen view feed |
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | New name of the feed |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string"}'
DELETE /schema-service/v2/screen-views/feeds/{feedId} — Delete screen view feed
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/deleteFeed
Delete a screen view feed. The screen views currently in this feed are moved to the default feed.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_DELETE
User role permission required: assets_docs: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feedId | path | string | required | UUID of a screen view feed |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/schema-service/v2/screen-views/feeds/%7BfeedId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/scheduler/entry — Schedule object
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/schedule-object
Add a schedule to a document or screen view.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Request body
application/json · schema-service-SchedulerRequest
| Field | Type | Required | Description |
|---|---|---|---|
externalId | string | optional | UUID of the screen view or document that the schedule applies to |
type | enum<"SCREENVIEW", "DOCUMENT"> | optional | Type of the scheduled object |
schedule | object | optional | Configuration of the schedule |
Responses
| Status | Description |
|---|---|
200 application/json | Schedule added |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/scheduler/entry \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"externalId":"3200d382-adfe-4314-ab30-798cdd0fcdb5","type":"SCREENVIEW","schedule":{"enabled":true,"endDate":"2019-08-24T14:15:22Z","endType":"NEVER","parts":[{"startDay":1,"startTime":"08:18:03","endDay":1,"endTime":44283}],"periodType":"ENTIRE","startDate":"2019-08-24T14:15:22Z","startType":"NOW","timezone":"Europe/Warsaw"}}'
GET /schema-service/scheduler/entry/{objectType}/{objectId} — Get schedule the schedule of an object
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/getschedule-object
Get schedule object.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
objectId | path | string | required | Screen view or document ID |
objectType | path | enum<"SCREENVIEW", "DOCUMENT"> | required | Object type |
Responses
| Status | Description |
|---|---|
200 application/json | Schedule details |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | Object has no schedule; or an exception occurred. |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/scheduler/entry/%7BobjectType%7D/%7BobjectId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/{screenViewId}/status/finish — Finish screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/finish-screen-view
Finish a screen view. A finished document is no longer displayed.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/finish \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/{screenViewId}/status/resume — Resume screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/resume-screen-view
Resume a screen view that was paused.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/resume \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/{screenViewId}/status/activate — Activate screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/activate-screen-view
Activate a screen view. It can be displayed to customers.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/activate \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/v2/screen-views/{screenViewId}/status/pause — Pause screen view
/api-reference/loyalty-and-engagement#tag/Screen-views/operation/pause-screen-view
Pause a screen view. Until resumed, it can't be displayed to customers.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/v2/screen-views/%7BscreenViewId%7D/status/pause \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Recommendation campaigns
GET /recommendations/v2/campaigns — Get all recommendation campaigns
Fetch all recommendation campaigns.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: RECOMMENDATIONS_V2_MANY_CAMPAIGN_READ
User role permission required: campaigns_recommendations: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | optional | Page number |
limit | query | integer | optional | Maximum number of campaigns on a page |
sortBy | query | enum<"createdAt", "updatedAt", "startDate", "endDate", …> | optional | Name of the field by which data will be sorted |
ordering | query | enum<"asc", "desc"> | optional | Sorting order |
includeMeta | query | boolean | optional | If true, a meta JSON block with pagination data is included in the response body.
If false, the pagination data is included in the response headers.
|
type | query | string | optional | Filters the results by campaign type. |
state | query | array<enum<"draft", "active", "paused">> | optional | Shows only results with states matching this parameter. When this parameter is omitted, all campaigns are returned regardless of state. |
search | query | string | optional | Searches campaigns by the specified phrase in their id and title.
|
Responses
| Status | Description |
|---|---|
200 application/json | Returns paginated campaigns. If showMeta was set to true, the metadata is included in the JSON response. If it was set to false, the metadata is included in the headers.
|
404 application/json | Could not find campaigns |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/campaigns?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sortBy=SOME_STRING_VALUE&ordering=SOME_STRING_VALUE&includeMeta=SOME_BOOLEAN_VALUE&type=SOME_STRING_VALUE&state=SOME_ARRAY_VALUE&search=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/campaigns — Create a recommendation campaign
Create a new recommendation campaign.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: RECOMMENDATIONS_V2_CAMPAIGN_CREATE
User role permission required: campaigns_recommendations: create
Request body (required)
application/json · object
All the details of a campaign
Responses
| Status | Description |
|---|---|
200 application/json | OK campaign has been returned |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/campaigns \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0,"personalizedBoostingStrength":0},"title":"string","slug":"string","description":"string","startDate":"string","endDate":"string","state":"draft","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0,"useDefaultDistinctFilters":true,"useDefaultItemFilters":true}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"}}'
GET /recommendations/v2/campaigns/{campaignId} — Get recommendation campaign details
/api-reference/ai-recommendations#tag/Recommendation-campaigns/operation/GetRecommendationCampaignV2
Retrieve the details of a single campaign.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: RECOMMENDATIONS_V2_SINGLE_CAMPAIGN_READ
User role permission required: campaigns_recommendations: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | string | required | ID of the campaign |
Responses
| Status | Description |
|---|---|
200 application/json | Data of a single campaign |
404 application/json | Could not find campaign |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/campaigns/{campaignId} — Update a recommendation campaign
Update a recommendation campaign by changing the parameters or copying the definition from another campaign.
When you copy from another campaign:
- the following campaign data is NOT updated:
titlestatestart_dateend_datecampaignIdcreatedAt
modified_by_user_idchanges to the user who performed the update
API consumers: Workspace (Business Profile), Synerise User
API key permission required: RECOMMENDATIONS_V2_CAMPAIGN_UPDATE
User role permission required: campaigns_recommendations: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | string | required | ID of the campaign |
Request body (required)
application/json · recommendation-campaigns-RecommendationCampaignUpdateRequest
Definition of the updated campaign.
| Field | Type | Required | Description |
|---|---|---|---|
copyConfigurationFrom | string | required | Source campaign ID.
When you copy from another campaign:
the following campaign data is NOT updated:
title
state
start_date
end_date
campaignId
createdAt
modified_by_user_id changes to the user who performed the update
|
Responses
| Status | Description |
|---|---|
200 application/json | Campaign updated and returned |
404 application/json | Could not find campaign |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0},"campaignId":"string","title":"string","slug":"string","description":"string","startDate":"string","endDate":"string","createdAt":"string","updatedAt":"string","state":"draft","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","additionalResponseAttributes":["string"],"slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0,"useDefaultDistinctFilters":true,"useDefaultItemFilters":true}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"},"abTest":{"experimentId":0,"variantId":0,"status":"NotStarted","isBaseline":true},"crossWorkspaceMode":{"enabled":true}}'
DELETE /recommendations/v2/campaigns/{campaignId} — Delete a recommendation campaign
Delete a recommendation campaign. This operation is irreversible.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: RECOMMENDATIONS_V2_CAMPAIGN_DELETE
User role permission required: campaigns_recommendations: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | string | required | ID of the campaign |
Responses
| Status | Description |
|---|---|
200 application/json | OK campaign has been deleted |
404 application/json | Could not find campaign |
500 application/json | An error occurred |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/campaigns/state — Change campaigns' states
Change the status of one or more campaigns.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: RECOMMENDATIONS_V2_STATE_CAMPAIGN_UPDATE
User role permission required: campaigns_recommendations: update
Request body (required)
application/json · recommendation-campaigns-RecommendationStateChangeRequestV2
List of updated campaign IDs and new states.
| Field | Type | Required | Description |
|---|---|---|---|
state | enum<"draft", "active", "paused", "deleted"> | required | Campaign status |
ids | array<string> | required | An array of campaign IDs. |
Responses
| Status | Description |
|---|---|
200 application/json | Campaigns status changed |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/campaigns/state \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"state":"draft","ids":["string"]}'
POST /recommendations/v2/campaigns/{campaignId}/copy — Copy a recommendation campaign
Copy a campaign. The copied campaign's state will be draft and slug will be undefined.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: RECOMMENDATIONS_V2_COPY_CAMPAIGN_CREATE
User role permission required: campaigns_recommendations: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | string | required | ID of the campaign |
Responses
| Status | Description |
|---|---|
200 application/json | Copy created and returned |
404 application/json | Could not find campaign |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/campaigns/%7BcampaignId%7D/copy \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /recommendations/v2/campaigns/simplified — Get simplified recommendation campaigns
Fetch simplified recommendation campaign data.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: RECOMMENDATIONS_V2_MANY_SIMPLIFIED_CAMPAIGN_READ
User role permission required: campaigns_recommendations: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
type | query | array<string> | optional | Filter by campaign type. |
state | query | array<enum<"draft", "active", "paused">> | optional | Filter by states. |
Responses
| Status | Description |
|---|---|
200 application/json | Simplified campaigns returned |
404 application/json | Could not find campaign |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/campaigns/simplified?type=SOME_ARRAY_VALUE&state=SOME_ARRAY_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Recommendation statistics
POST /recommendations/v2/campaigns/stats — Get recommendation campaign statistics
/api-reference/ai-recommendations#tag/Recommendation-statistics/operation/PostCampaignsStats
Retrieves the statistics of campaigns defined in the request.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: AI_STATS_READ
User role permission required: campaigns_recommendations: read
Request body (required)
application/json · object
Request for recommendation campaigns stats.
| Field | Type | Required | Description |
|---|---|---|---|
campaignIds | array<string> | required | List of campaign IDs for which the statistics are requested. Must not be empty. |
from | string | optional | Upper bound of the interval for which the statistics will be retrieved.Must be provided with to, otherwise the filter is treated as unspecified.If not specified, the interval is last 7 days.
|
to | string | optional | Lower bound of the interval for which the statistics will be retrieved.Must be provided with from, otherwise the filter is treated as unspecified.If not specified, the interval is last 7 days.
|
timeZone | string | optional | Time zone identifier. |
Responses
| Status | Description |
|---|---|
200 application/json | Statistics returned |
500 application/json | Service error |
4xx application/json | Incorrect request |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/campaigns/stats \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignIds":["string"],"from":"2019-08-24","to":"2019-08-24","timeZone":"Europe/Warsaw"}'
GET /recommendations/v2/campaigns/stats/global — Get global recommendation campaign statistics
/api-reference/ai-recommendations#tag/Recommendation-statistics/operation/GetCampaignsGlobalStats
Retrieves the statistics of all recommendation campaigns.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: AI_STATS_READ
User role permission required: campaigns_recommendations: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string | optional | Upper bound of the interval for which the statistics will be retrieved.Must be provided with from, otherwise the filter is treated as unspecified.If not specified, the interval is last 7 days.
|
to | query | string | optional | Lower bound of the interval for which the statistics will be retrieved. If not specified, the interval is last 7 days. |
timeZone | query | string | optional | Time zone identifier. |
Responses
| Status | Description |
|---|---|
200 application/json | Statistics returned |
500 application/json | Service error |
4xx application/json | Incorrect request |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/campaigns/stats/global?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /recommendations/v2/campaigns/{campaignId}/stats — Get recommendation campaign statistics
/api-reference/ai-recommendations#tag/Recommendation-statistics/operation/GetCampaignStats
Retrieves the statistics of a single recommendation campaign.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: AI_STATS_READ
User role permission required: campaigns_recommendations: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | string | required | ID of the recommendation campaign |
from | query | string | optional | Upper bound of the interval for which the statistics will be retrieved.Must be provided with from, otherwise the filter is treated as unspecified.If not specified, the interval is last 7 days.
|
to | query | string | optional | Lower bound of the interval for which the statistics will be retrieved. If not specified, the interval is last 7 days. |
timeZone | query | string | optional | Time zone identifier. |
Responses
| Status | Description |
|---|---|
200 application/json | Statistics returned |
500 application/json | Service error |
4xx application/json | Incorrect request |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /recommendations/v2/campaigns/{campaignId}/products/stats — Get statistics for top items in a campaign
/api-reference/ai-recommendations#tag/Recommendation-statistics/operation/GetRecoTopProductsStats
Retrieves the statistics of top products for a single recommendation campaign.
API consumers: Workspace (Business Profile), Synerise User
API key permission required: AI_STATS_READ
User role permission required: campaigns_recommendations: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignId | path | string | required | ID of the recommendation campaign |
from | query | string | optional | Upper bound of the interval for which the statistics will be retrieved.Must be provided with from, otherwise the filter is treated as unspecified.If not specified, the interval is last 7 days.
|
to | query | string | optional | Lower bound of the interval for which the statistics will be retrieved. If not specified, the interval is last 7 days. |
timeZone | query | string | optional | Time zone identifier. |
metric | query | enum<"views", "clicks", "revenue", "generations", …> | optional | The response will include statistics for up to 10 top-performing items according to the selected metric, sorted from best to worst.
If not specified, the default metric is views.
views - the number of displayed recommendation frames.
generations - the number of generated recommendation frames.
clicks - the number of times an item in a recommendation frame was clicked.
charges - the number of transactions caused by the recommendation.
revenue - the revenue generated by the recommendation.
|
Responses
| Status | Description |
|---|---|
200 application/json | Statistics returned |
500 application/json | Service error |
4xx application/json | Incorrect request |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/campaigns/50NCGoRK0VRb/products/stats?from=SOME_STRING_VALUE&to=SOME_STRING_VALUE&timeZone=Europe%2FWarsaw&metric=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Recommendations
GET /recommendations/v2/recommend/campaigns/{campaignIdentifier} — Get recommendations by campaign
/api-reference/ai-recommendations#tag/Recommendations/operation/GetRecommendationsByCampaignV2
This method allows you to retrieve recommendations based on a campaignID or a slug and a context. The context is built based on:
- campaign identifier (required)
- profile UUID
- items (for example, items currently in the basket)
- item exclusions
This is the recommended and simplest way to fetch recommendations.
Before you use this method, you must to create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.
API consumers: AI API key (legacy), Web SDK Tracker, Workspace (Business Profile)
API key permission required: API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignIdentifier | path | string | required | Recommendation campaign identifier - a campaignID or a slug |
clientUUID | query | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
itemId | query | string | optional | Item ID or item IDs for the recommendation context. This parameter is:
required for similar/complementary items campaigns.
optional for personalized campaigns.
This parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.
You can repeat this parameter in order to pass a number of context-creating items, for example, in a cart recommendation campaign.
This overrides the itemsSource settings of the campaign definition.
Alternatively, you can pass the itemsSourceType and itemsSourceId parameters to use context items from source (aggregate or expression). These parameters can't be used at the same request with itemId.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
itemsSourceType | query | enum<"aggregate", "expression"> | optional | Item ID or item IDs source type for the recommendation context.
Must be used with itemSourceId. This overrides the itemsSource settings of the campaign definition.
In recommendations whose models doesn't use the item context, the attributes of those items can only be used in filters.
If the items' source type is 'aggregate', the aggregate result will be used as context items. If the items' source type is 'expression', the expression result will be used as context items.
The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.
Alternatively, you can pass the itemId parameter to define context items directly. Only one of these options is allowed at the same time.
|
itemsSourceId | query | string | optional | Source of item IDs for the recommendation context. In recommendations whose models doesn't use the item context, the attributes of those items can only be used in filters.
Must be used with itemsSourceType.
If the items' source type is 'aggregate', this is the aggregate's ID. If the items' source type is 'expression', this is the expression's ID.
The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.
Alternatively, you can pass the itemId parameter to define context items directly. Only one of these options is allowed at the same time.
|
externalItemId | query | string | optional | Items provided by an external recommendation model to be returned as recommendation results. You can repeat this parameter to pass multiple external items. This parameter is used with campaigns of type "external-items". |
itemIdExcluded | query | string | optional | IDs of items that will be excluded from the generated recommendations. For example, items already added to the basket. |
additionalFilters | query | string | optional |
IMPORTANT:
The filtersJoiner attribute is REQUIRED when additionalFilters is included. If filtersJoiner is missing, the additional filters do not work.
Do NOT send multiple instances of this parameter.
Additional filters. These are merged with the campaign's own filters according to the logic in filtersJoiner.
This parameter must include all the additional filters as a single string, for example additionalFilters=effectivePrice>300 AND effectivePrice<400 (the spaces are required).
|
filtersJoiner | query | enum<"AND", "OR", "REPLACE"> | optional | Defines the logic of merging additionalFilters with the campaign's existing filters.
REPLACE replaces the campaign's filters with your filters.
AND matches if both your filters and the campaign filters are met.
OR matches if at least one of the filters is met.
|
additionalElasticFilters | query | string | optional |
IMPORTANT:
The elasticFiltersJoiner attribute is REQUIRED when additionalElasticFilters is included. If elasticFiltersJoiner is missing, the additional filters do not work.
Do NOT send multiple instances of this parameter.
Additional elastic filters. These are merged with the campaign's own elastic filters according to the logic in elasticFiltersJoiner.
This parameter must include all the additional filters as a single string, for example additionalElasticFilters=effectivePrice>300 AND effectivePrice<400 (the spaces are required).
|
elasticFiltersJoiner | query | enum<"AND", "OR", "REPLACE"> | optional | Defines the logic of merging additionalElasticFilters with the campaign's existing elastic filters.
REPLACE replaces the campaign's filters with your filters.
AND matches if both your filters and the campaign filters are met.
OR matches if at least one of the filters is met.
|
displayAttribute | query | string | optional | Item attribute whose value will be returned in the recommendation response. The parameter value will be merged with the configuration of the recommendation. This parameter can be passed multiple times. |
includeContextItems | query | boolean | optional | When true, the recommendation response will include context items metadata. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements. |
404 application/json | No recommendations could be generated for the specified campaign and context. |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D?clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&inventoryChannelId=SOME_STRING_VALUE&itemsSourceType=SOME_STRING_VALUE&itemsSourceId=SOME_STRING_VALUE&externalItemId=SOME_STRING_VALUE&itemIdExcluded=SOME_STRING_VALUE&additionalFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&filtersJoiner=SOME_STRING_VALUE&additionalElasticFilters=effectivePrice%3E300%20AND%20effectivePrice%3C400&elasticFiltersJoiner=SOME_STRING_VALUE&displayAttribute=SOME_STRING_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/campaigns — Get recommendations by campaign
/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendationsByCampaignV2
This method allows you to retrieve recommendations based on a campaignID or slug and a context. The context is built based on:
- campaign ID or slug (one of those is required)
- profile UUID
- items (for example, items currently in the basket)
- item exclusions
This is the recommended and simplest way to fetch recommendations.
Before you use this method, you must to create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.
API consumers: AI API key (legacy), Web SDK Tracker, Workspace (Business Profile)
API key permission required: API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_READ
Request body
application/json · recommendations-api-materializer-PostRecommendationsRequest
| Field | Type | Required | Description |
|---|---|---|---|
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
campaignId | string | optional | Recommendation campaign ID for establishing the context |
slug | string | optional | Recommendation campaign slug for establishing the context |
items | array<string> | optional | An array of item identifiers (itemId in the item feed) for the context. This could be, for example, the current basket, or the item that is currently being viewed.
This overrides the itemsSource settings of the campaign definition.
This parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.
Alternatively, you can use the itemsSource object to get item IDs from an aggregate or expression. items and itemsSource can't be used at the same time.
|
itemsSource | object | optional | Source of the Item ID or item IDs for the recommendation context.
This overrides the itemsSource settings of the campaign definition.
This parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.
The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.
Alternatively, you can pass the itemId parameter to define context items directly. Only one of these options is allowed at the same time.
|
itemsExcluded | array<string> | optional | Items (identified by itemId in the item feed) that will be excluded from the generated recommendations. For example, items already added to the basket.
|
additionalFilters | string | optional |
IMPORTANT:
The filtersJoiner attribute is REQUIRED when additionalFilters is included. If filtersJoiner is missing, the additional filters do not work.
Do NOT send multiple instances of this parameter.
Additional filters. These are merged with the campaign's own filters according to the logic in filtersJoiner.
This parameter must include all the additional filters as a single string, for example additionalFilters=effectivePrice>300 AND effectivePrice<400 (the spaces are required).
|
filtersJoiner | enum<"AND", "OR", "REPLACE"> | optional | Defines the logic of merging additionalFilters with the campaign's existing filters.
REPLACE replaces the campaign's filters with your filters.
AND matches if both your filters and the campaign filters are met.
OR matches if at least one of the filters is met.
|
additionalElasticFilters | string | optional |
IMPORTANT:
The elasticFiltersJoiner attribute is REQUIRED when additionalElasticFilters is included. If elasticFiltersJoiner is missing, the additional filters do not work.
Do NOT send multiple instances of this parameter.
Additional elastic filters. These are merged with the campaign's own elastic filters according to the logic in elasticFiltersJoiner.
This parameter must include all the additional filters as a single string, for example additionalElasticFilters=effectivePrice>300 AND effectivePrice<400 (the spaces are required).
|
elasticFiltersJoiner | enum<"AND", "OR", "REPLACE"> | optional | Defines the logic of merging additionalElasticFilters with the campaign's existing elastic filters.
REPLACE replaces the campaign's filters with your filters.
AND matches if both your filters and the campaign filters are met.
OR matches if at least one of the filters is met.
|
displayAttributes | array<string> | optional | An array of item attributes which value will be returned in a recommendation response. The array will be merged together with the configuration of the recommendation. |
includeContextItems | boolean | optional | When true, the recommendation response will include context items metadata. |
recommendedItemsFromExternalModel | array<array<string>> | optional | Items provided by an external recommendation model to be returned as recommendation results. This parameter is used with campaigns of type "external-items". |
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
Responses
| Status | Description |
|---|---|
200 application/json | Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements. |
404 application/json | No recommendations could be generated for the specified campaign and context. |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/campaigns \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"clientUUID":"string","campaignId":"string","slug":"string","items":["string"],"itemsSource":{"type":"aggregate","id":"string"},"itemsExcluded":["string"],"additionalFilters":"effectivePrice>300 AND effectivePrice<400","filtersJoiner":"AND","additionalElasticFilters":"effectivePrice>300 AND effectivePrice<400","elasticFiltersJoiner":"AND","displayAttributes":["string"],"includeContextItems":true,"recommendedItemsFromExternalModel":[["string"]],"inventoryContext":{"channelIds":["string"]},"params":{"source":"mobile"}}'
POST /recommendations/v2/recommend/campaigns/{campaignIdentifier}/by/{identifierName} — Get recommendations by campaign and profile identifier
Before you use this method: you must create a recommendations campaign in Synerise. All the recommendation filters and parameters will be handled for you automatically according to a campaign's configuration.
The method allows you to retrieve recommendations based on a campaignID or a slug, profile's identifier name (the value of the identifier is provided in the request body), and a context. The context is built based on:
- campaign identifier (required)
- identifierName (required)
- identifierValue (required)
- items (for example, items currently in the basket)
- item exclusions
API consumers: Workspace (Business Profile), Synerise User
API key permission required: API_MATERIALIZER_V2_RECOMMEND_WITH_CUSTOM_ID_RECOMMENDATIONS_READ
User role permission required: campaigns_recommendations: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
campaignIdentifier | path | string | required | Recommendation campaign identifier - a campaignID or a slug |
identifierName | path | enum<"id", "uuid", "email", "custom_identify"> | required | The name of the profile identifier to use for the request. By default, the allowed identifier types are id, uuid, email, and custom_identify. This may be changed in the workspace configuration.
|
Request body
application/json · recommendations-api-materializer-PostRecommendationsWithIdentifierValueRequest
| Field | Type | Required | Description |
|---|---|---|---|
identifierValue | string | required | Value of the identifier selected in the path attributes |
items | array<string> | optional | An array of item identifiers (itemId in the item feed) for the context. This could be, for example, the current basket, or the item that is currently being viewed.
This overrides the itemsSource settings of the campaign definition.
This parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.
Alternatively, you can use the itemsSource object to get item IDs from an aggregate or expression. items and itemsSource can't be used at the same time.
|
itemsSource | object | optional | Source of the Item ID or item IDs for the recommendation context.
This overrides the itemsSource settings of the campaign definition.
This parameter can be passed in all recommendations. In recommendations which don't use the context item as part of the recommendation model, the context item can only be used to create filters.
The item ID source (aggregate or expression) should return a string or an array of strings. If it returns numerical values, the recommendations engine attempts to convert them into strings while processing the request.
Alternatively, you can pass the itemId parameter to define context items directly. Only one of these options is allowed at the same time.
|
itemsExcluded | array<string> | optional | Items (identified by itemId in the item feed) that will be excluded from the generated recommendations. For example, items already added to the basket.
|
additionalFilters | string | optional |
IMPORTANT:
The filtersJoiner attribute is REQUIRED when additionalFilters is included. If filtersJoiner is missing, the additional filters do not work.
Do NOT send multiple instances of this parameter.
Additional filters. These are merged with the campaign's own filters according to the logic in filtersJoiner.
This parameter must include all the additional filters as a single string, for example additionalFilters=effectivePrice>300 AND effectivePrice<400 (the spaces are required).
|
filtersJoiner | enum<"AND", "OR", "REPLACE"> | optional | Defines the logic of merging additionalFilters with the campaign's existing filters.
REPLACE replaces the campaign's filters with your filters.
AND matches if both your filters and the campaign filters are met.
OR matches if at least one of the filters is met.
|
additionalElasticFilters | string | optional |
IMPORTANT:
The elasticFiltersJoiner attribute is REQUIRED when additionalElasticFilters is included. If elasticFiltersJoiner is missing, the additional filters do not work.
Do NOT send multiple instances of this parameter.
Additional elastic filters. These are merged with the campaign's own elastic filters according to the logic in elasticFiltersJoiner.
This parameter must include all the additional filters as a single string, for example additionalElasticFilters=effectivePrice>300 AND effectivePrice<400 (the spaces are required).
|
elasticFiltersJoiner | enum<"AND", "OR", "REPLACE"> | optional | Defines the logic of merging additionalElasticFilters with the campaign's existing elastic filters.
REPLACE replaces the campaign's filters with your filters.
AND matches if both your filters and the campaign filters are met.
OR matches if at least one of the filters is met.
|
displayAttributes | array<string> | optional | An array of item attributes which value will be returned in a recommendation response. The array will be merged together with the configuration of the recommendation. |
includeContextItems | boolean | optional | When true, the recommendation response will include context items metadata. |
recommendedItemsFromExternalModel | array<array<string>> | optional | Items provided by an external recommendation model to be returned as recommendation results. This parameter is used with campaigns of type "external-items". |
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
Responses
| Status | Description |
|---|---|
200 application/json | Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements. |
404 application/json | No recommendations could be generated for the specified campaign and context. |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/campaigns/%7BcampaignIdentifier%7D/by/%7BidentifierName%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"identifierValue":"string","items":["string"],"itemsSource":{"type":"aggregate","id":"string"},"itemsExcluded":["string"],"additionalFilters":"effectivePrice>300 AND effectivePrice<400","filtersJoiner":"AND","additionalElasticFilters":"effectivePrice>300 AND effectivePrice<400","elasticFiltersJoiner":"AND","displayAttributes":["string"],"includeContextItems":true,"recommendedItemsFromExternalModel":[["string"]],"inventoryContext":{"channelIds":["string"]},"params":{"source":"mobile"}}'
POST /recommendations/v2/recommend/campaigns/preview — Preview campaign recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/PostPreviewRecommendations
This method allows you to preview recommendations for a campaign with a given configuration before creating it.
Note: This method is not an alternative to creating recommendations for an existing campaign. It is intended for testing purposes only.
The recommendation context is built based on:
- profile UUID
- items
- item exclusions
API consumers: Workspace (Business Profile), Synerise User
API key permission required: API_MATERIALIZER_V2_RECOMMEND_CAMPAIGNS_RECOMMENDATIONS_PREVIEW_READ
User role permission required: campaigns_recommendations: read
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
clientUUID | string | optional | UUID of the client |
items | array<recommendations-api-materializer-Item> | optional | A list of itemIds for building the context. Alternatively, you can use the itemsSource parameter to provide the context. Item context is required by these recommendation types: similar, cross-sell, set-complement, visually-similar, item-comparison. In other recommendation types, the item context is optional, but may be used by the model when scoring items.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). |
Responses
| Status | Description |
|---|---|
200 application/json | Recommendations for the provided context. The response schema depends on your Workspace configuration. The schema below only includes the static elements. |
404 application/json | No recommendations could be generated for the specified campaign and context. |
429 application/json | The user has sent too many requests in a given amount of time ("rate limiting"). |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/campaigns/preview \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"clientUUID":"50829d26-5337-410e-9365-b40f7a01bb61","items":["string"],"includeContextItems":false,"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"type":"similar","parameters":{"additionalResponseAttributes":["string"],"boostMetric":"string","sortMetric":"string","boostMetricStrength":-100,"shuffleNumItems":0,"personalizedBoostingStrength":0},"title":"preview","campaignId":"preview","filterRules":{"excludePurchasedItems":true,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":true,"elasticExcludePurchasedItemsSinceDays":0},"itemsCatalogId":"string","slots":[{"name":"string","itemMin":0,"itemMax":0,"filterRules":{"filters":"string","elasticFilters":"string"},"distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]},"attribute":{"name":"string","levelRangeModifier":0},"numRows":0,"numItems":0}],"keepSlotsOrder":true,"personalizeSlotsOrder":false,"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"itemsSource":{"type":"aggregate","id":"string"}}'
GET /recommendations/v2/recommend/items/users/{clientUuid} — Personalized recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/RecommendForUserV2
Retrieve item recommendations for a profile.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_PERSONALIZED_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUuid | path | string | required | Recommendations will be generated for the provided profile UUID. |
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
excludePurchasedItems | query | boolean | optional | When true, the recommendation results will include only items that the profile hasn't purchased before.IMPORTANT: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation. |
excludePurchasedItemsSinceDays | query | integer | optional | Limits the application of the excludePurchasedItems filter to a specified number of days.
|
filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
elastic:filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
itemId | query | string | optional | Item identifier, equal to itemId from the item feed. It can be used to define the item context of the query.
|
itemCatalogId | query | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
crossWorkspaceMode | query | boolean | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
Responses
| Status | Description |
|---|---|
200 application/json | Personalized recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/users/{clientUuid} — Personalized recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendForUserV2
Retrieve item recommendations for a profile.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_PERSONALIZED_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUuid | path | string | required | Recommendations will be generated for the provided profile UUID. |
Request body (required)
application/json · recommendations-rust-all-SlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
keepSlotsOrder | boolean | optional |
When true, the data array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in data are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
When false, the data array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.
The additional extras.slots object always shows slots and items as if this setting was true.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
personalizeSlotsOrder | boolean | optional | Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
sortMetric | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
boostingParameters | object | optional | Result boosting parameters |
boostingStrategies | array<recommendations-rust-all-BoostingStrategyV2> | optional | Boosting strategies |
crossWorkspaceMode | object | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
slots | array<recommendations-rust-all-SlotSchemaV2Rust> | required | Slot definitions. To apply default values and fetch all the results as a single slot, send slots as an array with one empty object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Personalized recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
POST /recommendations/v2/recommend/items/users/{clientUuid}/sections — Section recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendSectionsForUserV2
Retrieve item recommendations grouped by attribute.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_SECTION_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUuid | path | string | required | Information will be shown for the provided profile UUID. |
Request body (required)
application/json · recommendations-rust-all-SectionsSlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
metadataCatalogId | string | optional | ID of the catalog which stores attribute metadata |
slots | array<recommendations-rust-all-SectionSlotSchemaV2> | required | Slots data |
Responses
| Status | Description |
|---|---|
200 application/json | Section recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/sections \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"metadataCatalogId":"string","slots":[{"name":"string","attribute":{"name":"string","levelRangeModifier":0},"numRows":1,"numItems":1,"filters":"string","elasticFilters":"string"}]}'
POST /recommendations/v2/recommend/items/users/{clientUuid}/attributes — Attribute recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendAttributesForUserV2
Retrieve attribute recommendations.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_ATTRIBUTE_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUuid | path | string | required | Information will be shown for the provided profile UUID. |
Request body (required)
application/json · recommendations-rust-all-AttributesSlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
metadataCatalogId | string | optional | ID of the catalog which stores attribute metadata |
slots | array<recommendations-rust-all-AttributeSlotSchemaV2> | required | Slots data |
Responses
| Status | Description |
|---|---|
200 application/json | Attribute recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/attributes \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"metadataCatalogId":"string","slots":[{"name":"string","attribute":{"name":"string","levelRangeModifier":0},"minNumItems":1,"maxNumItems":5,"filters":"string","elasticFilters":"string"}]}'
GET /recommendations/v2/recommend/items/users/{clientUuid}/last — Last viewed recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/RecommendLastViewedForUserItems
Retrieve recent item recommendations seen by a profile.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_LAST_VIEWED_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUuid | path | string | required | Information will be shown for the provided profile UUID. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
crossWorkspaceMode | query | boolean | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
Responses
| Status | Description |
|---|---|
200 application/json | Last viewed recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/users/{clientUuid}/last — Last viewed recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendLastViewedForUserItems
Retrieve recent item recommendations seen by a profile.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_LAST_VIEWED_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUuid | path | string | required | Information will be shown for the provided profile UUID. |
Request body (required)
application/json · recommendations-rust-all-SlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
keepSlotsOrder | boolean | optional |
When true, the data array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in data are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
When false, the data array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.
The additional extras.slots object always shows slots and items as if this setting was true.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
personalizeSlotsOrder | boolean | optional | Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
sortMetric | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
boostingParameters | object | optional | Result boosting parameters |
boostingStrategies | array<recommendations-rust-all-BoostingStrategyV2> | optional | Boosting strategies |
crossWorkspaceMode | object | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
slots | array<recommendations-rust-all-SlotSchemaV2Rust> | required | Slot definitions. To apply default values and fetch all the results as a single slot, send slots as an array with one empty object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Last viewed recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/last \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
GET /recommendations/v2/recommend/items/users/{clientUuid}/aggregates/{aggregateUUID} — Recent interactions recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/GetRecommendRecentInteractions
Retrieve recent interactions recommendations for a profile.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_RECENT_INTERACTIONS_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUuid | path | string | required | Information will be shown for the provided profile UUID. |
aggregateUUID | path | string | required | Information will be shown for the provided aggregate UUID. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
crossWorkspaceMode | query | boolean | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
Responses
| Status | Description |
|---|---|
200 application/json | Recent interactions recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D?campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/users/{clientUuid}/aggregates/{aggregateUUID} — Recent interactions recommendations
/api-reference/ai-recommendations#tag/Recommendations/operation/PostRecommendRecentInteractions
Retrieve recent interactions recommendations for a profile.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_RECENT_INTERACTIONS_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUuid | path | string | required | Information will be shown for the provided profile UUID. |
aggregateUUID | path | string | required | Information will be shown for the provided aggregate UUID. |
Request body (required)
application/json · recommendations-rust-all-SlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
keepSlotsOrder | boolean | optional |
When true, the data array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in data are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
When false, the data array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.
The additional extras.slots object always shows slots and items as if this setting was true.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
personalizeSlotsOrder | boolean | optional | Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
sortMetric | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
boostingParameters | object | optional | Result boosting parameters |
boostingStrategies | array<recommendations-rust-all-BoostingStrategyV2> | optional | Boosting strategies |
crossWorkspaceMode | object | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
slots | array<recommendations-rust-all-SlotSchemaV2Rust> | required | Slot definitions. To apply default values and fetch all the results as a single slot, send slots as an array with one empty object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Recent interactions recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/users/%7BclientUuid%7D/aggregates/%7BaggregateUUID%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
GET /recommendations/v2/recommend/items/metric — Scoring by metric
/api-reference/ai-recommendations#tag/Recommendations/operation/GetItemsByMetric
Returns items with the highest score of a chosen metric. A list of available metrics can be checked by using this endpoint.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_METRICS_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sortMetric | query | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
clientUUID | query | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
itemId | query | string | optional | Item identifier, equal to itemId from the item feed. It can be used to define the item context of the query.
|
excludePurchasedItems | query | boolean | optional | When true, the recommendation results will include only items that the profile hasn't purchased before.IMPORTANT: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation. |
excludePurchasedItemsSinceDays | query | integer | optional | Limits the application of the excludePurchasedItems filter to a specified number of days.
|
filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
elastic:filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
itemCatalogId | query | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
crossWorkspaceMode | query | boolean | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
Responses
| Status | Description |
|---|---|
200 application/json | Items with the highest metric scores |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/metric?sortMetric=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&itemId=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/metric — Scoring by metric
/api-reference/ai-recommendations#tag/Recommendations/operation/PostItemsByMetric
Returns items with the highest score of a chosen metric. A list of available metrics can be checked by using this endpoint.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_METRICS_RECOMMENDATIONS_READ
Request body (required)
application/json · recommendations-rust-all-MetricsBodySchemaV2
Definition of the requested recommendation
Responses
| Status | Description |
|---|---|
200 application/json | Items with the highest metric scores |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/metric \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
GET /recommendations/v2/recommend/items/complementary — Complementary items for a cart
/api-reference/ai-recommendations#tag/Recommendations/operation/ComplementItems
Show recommendations based on the contents of a cart.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_COMPLEMENTARY_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUUID | query | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
excludePurchasedItems | query | boolean | optional | When true, the recommendation results will include only items that the profile hasn't purchased before.IMPORTANT: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation. |
excludePurchasedItemsSinceDays | query | integer | optional | Limits the application of the excludePurchasedItems filter to a specified number of days.
|
filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
elastic:filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
itemId | query | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
itemCatalogId | query | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
boostMetric | query | string | optional | ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results. The list of available metrics can be checked by using this endpoint. |
sortMetric | query | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
crossWorkspaceMode | query | boolean | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
Responses
| Status | Description |
|---|---|
200 application/json | Cart complementary recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/complementary?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/complementary — Complementary items for a cart
/api-reference/ai-recommendations#tag/Recommendations/operation/PostComplementItems
Show recommendations based on the contents of a cart.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_COMPLEMENTARY_RECOMMENDATIONS_READ
Request body (required)
application/json · recommendations-rust-all-SlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
keepSlotsOrder | boolean | optional |
When true, the data array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in data are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
When false, the data array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.
The additional extras.slots object always shows slots and items as if this setting was true.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
personalizeSlotsOrder | boolean | optional | Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
sortMetric | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
boostingParameters | object | optional | Result boosting parameters |
boostingStrategies | array<recommendations-rust-all-BoostingStrategyV2> | optional | Boosting strategies |
crossWorkspaceMode | object | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
slots | array<recommendations-rust-all-SlotSchemaV2Rust> | required | Slot definitions. To apply default values and fetch all the results as a single slot, send slots as an array with one empty object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Cart complementary recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/complementary \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
GET /recommendations/v2/recommend/items/{itemId}/complementary — Complementary items
/api-reference/ai-recommendations#tag/Recommendations/operation/GetComplementaryItems
Returns items complementary to the given items.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_COMPLEMENTARY_PRODUCTS_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
clientUUID | query | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
itemId | path | string | required | Item identifier, equal to itemId from the item feed.
|
excludePurchasedItems | query | boolean | optional | When true, the recommendation results will include only items that the profile hasn't purchased before.IMPORTANT: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation. |
excludePurchasedItemsSinceDays | query | integer | optional | Limits the application of the excludePurchasedItems filter to a specified number of days.
|
filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
elastic:filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
itemCatalogId | query | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
crossWorkspaceMode | query | boolean | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
Responses
| Status | Description |
|---|---|
200 application/json | Items complementary to the given item |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/{itemId}/complementary — Complementary items
/api-reference/ai-recommendations#tag/Recommendations/operation/PostComplementaryItems
Returns items complementary to the given items.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_COMPLEMENTARY_PRODUCTS_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
itemId | path | string | required | Item identifier, equal to itemId from the item feed.
|
Request body (required)
application/json · recommendations-rust-all-SlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
keepSlotsOrder | boolean | optional |
When true, the data array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in data are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
When false, the data array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.
The additional extras.slots object always shows slots and items as if this setting was true.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
personalizeSlotsOrder | boolean | optional | Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
sortMetric | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
boostingParameters | object | optional | Result boosting parameters |
boostingStrategies | array<recommendations-rust-all-BoostingStrategyV2> | optional | Boosting strategies |
crossWorkspaceMode | object | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
slots | array<recommendations-rust-all-SlotSchemaV2Rust> | required | Slot definitions. To apply default values and fetch all the results as a single slot, send slots as an array with one empty object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Items complementary to the given item |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/complementary \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
GET /recommendations/v2/recommend/items/{itemId}/similar — Similar items
/api-reference/ai-recommendations#tag/Recommendations/operation/GetSimilarItems
Returns items similar to a given item.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_SIMILAR_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
clientUUID | query | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
itemId | path | string | required | Item identifier, equal to itemId from the item feed.
|
excludePurchasedItems | query | boolean | optional | When true, the recommendation results will include only items that the profile hasn't purchased before.IMPORTANT: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation. |
excludePurchasedItemsSinceDays | query | integer | optional | Limits the application of the excludePurchasedItems filter to a specified number of days.
|
filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
elastic:filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
itemCatalogId | query | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
crossWorkspaceMode | query | boolean | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
Responses
| Status | Description |
|---|---|
200 application/json | Items similar to the given item |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/{itemId}/similar — Similar items
/api-reference/ai-recommendations#tag/Recommendations/operation/PostSimilarItems
Returns items similar to a given item.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_SIMILAR_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
itemId | path | string | required | Item identifier, equal to itemId from the item feed.
|
Request body (required)
application/json · recommendations-rust-all-SlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
keepSlotsOrder | boolean | optional |
When true, the data array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in data are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
When false, the data array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.
The additional extras.slots object always shows slots and items as if this setting was true.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
personalizeSlotsOrder | boolean | optional | Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
sortMetric | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
boostingParameters | object | optional | Result boosting parameters |
boostingStrategies | array<recommendations-rust-all-BoostingStrategyV2> | optional | Boosting strategies |
crossWorkspaceMode | object | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
slots | array<recommendations-rust-all-SlotSchemaV2Rust> | required | Slot definitions. To apply default values and fetch all the results as a single slot, send slots as an array with one empty object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Items similar to the given item |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
GET /recommendations/v2/recommend/items/{itemId}/similar/visual — Visually similar
/api-reference/ai-recommendations#tag/Recommendations/operation/GetSimilarVisualItems
Returns items visually similar to the given items.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_VISUAL_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
clientUUID | query | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
itemId | path | string | required | Item identifier, equal to itemId from the item feed.
|
excludePurchasedItems | query | boolean | optional | When true, the recommendation results will include only items that the profile hasn't purchased before.IMPORTANT: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation. |
excludePurchasedItemsSinceDays | query | integer | optional | Limits the application of the excludePurchasedItems filter to a specified number of days.
|
filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
elastic:filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
itemCatalogId | query | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
inventoryChannelId | query | string | optional | Inventory context identifier used to evaluate inventory-related filters and boosting strategies. If not provided, no inventory context will be applied. |
crossWorkspaceMode | query | boolean | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
Responses
| Status | Description |
|---|---|
200 application/json | Items visually similar to the given item |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual?minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&clientUUID=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemCatalogId=SOME_STRING_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile&inventoryChannelId=SOME_STRING_VALUE&crossWorkspaceMode=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/{itemId}/similar/visual — Visually similar
/api-reference/ai-recommendations#tag/Recommendations/operation/PostSimilarVisualItems
Returns items visually similar to the given items.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_VISUAL_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
itemId | path | string | required | Item identifier, equal to itemId from the item feed.
|
Request body (required)
application/json · recommendations-rust-all-SlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
keepSlotsOrder | boolean | optional |
When true, the data array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in data are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
When false, the data array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.
The additional extras.slots object always shows slots and items as if this setting was true.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
personalizeSlotsOrder | boolean | optional | Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
sortMetric | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
boostingParameters | object | optional | Result boosting parameters |
boostingStrategies | array<recommendations-rust-all-BoostingStrategyV2> | optional | Boosting strategies |
crossWorkspaceMode | object | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
slots | array<recommendations-rust-all-SlotSchemaV2Rust> | required | Slot definitions. To apply default values and fetch all the results as a single slot, send slots as an array with one empty object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Items visually similar to the given item |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/%7BitemId%7D/similar/visual \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
GET /recommendations/v2/recommend/items/next-interaction — Next interaction
/api-reference/ai-recommendations#tag/Recommendations/operation/NextInteractionRecommendation
The "next interaction" model recommends items that are most likely to produce a page.visit or product.buy event.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_NEXT_INTERACTION_RECOMMENDATIONS_READ
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientUUID | query | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
minNumItems | query | integer | optional | The minimal number of returned item recommendations. If the service is not able to return at least this many recommendations, it will return an error. |
maxNumItems | query | integer | optional | The maximal number of returned item recommendations. |
campaignId | query | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | query | string | optional | The campaign name which will be included in the recommendation.generated event. |
excludePurchasedItems | query | boolean | optional | When true, the recommendation results will include only items that the profile hasn't purchased before.IMPORTANT: Only the last 250 purchased items are taken into account. Items further back in the purchase history may be included in the recommendation. |
excludePurchasedItemsSinceDays | query | integer | optional | Limits the application of the excludePurchasedItems filter to a specified number of days.
|
filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
elastic:filters | query | string | optional | This string defines the criteria that an item must meet in order to be considered for recommendation. The Elastic filter may be dropped if not enough products meet the required criteria.For information on building filters, see "Items Query Language (IQL)" in the Developer Guide. |
itemId | query | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
itemCatalogId | query | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
boostMetric | query | string | optional | ID of the metric to boost the results by. Metric scores will be combined with recommendation scores, favoring the best-performing results. The list of available metrics can be checked by using this endpoint. |
sortMetric | query | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
distinctFilter | query | object | optional | |
includeContextItems | query | boolean | optional | The recommendation results will include context items from the request. |
params | query | array<string> | optional | List of extra params that will be added to the recommendation.generated event. They must be in the name:value format. The total size must not exceed 500 bytes when written as a JSON object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Next interaction recommendation |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/recommendations/v2/recommend/items/next-interaction?clientUUID=SOME_STRING_VALUE&minNumItems=SOME_INTEGER_VALUE&maxNumItems=SOME_INTEGER_VALUE&campaignId=SOME_STRING_VALUE&campaignName=SOME_STRING_VALUE&excludePurchasedItems=SOME_BOOLEAN_VALUE&excludePurchasedItemsSinceDays=SOME_INTEGER_VALUE&filters=SOME_STRING_VALUE&elastic%3Afilters=SOME_STRING_VALUE&itemId=SOME_ARRAY_VALUE&itemCatalogId=SOME_STRING_VALUE&boostMetric=SOME_STRING_VALUE&sortMetric=SOME_STRING_VALUE&distinctFilter=SOME_OBJECT_VALUE&includeContextItems=SOME_BOOLEAN_VALUE¶ms=source%3Amobile' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /recommendations/v2/recommend/items/next-interaction — Next interaction
/api-reference/ai-recommendations#tag/Recommendations/operation/PostNextInteractionRecommendation
The "next interaction" model recommends items that are most likely to produce a page.visit or product.buy event.
Note: The definition of an item encompasses products, but also articles, images, videos, and any other entities in the item feed.
API consumers: AI API key (legacy), Workspace (Business Profile), Web SDK Tracker
API key permission required: RECOMMENDATIONS_V2_NEXT_INTERACTION_RECOMMENDATIONS_READ
Request body (required)
application/json · recommendations-rust-all-SlotsBodySchemaV2
Definition of the requested recommendation
| Field | Type | Required | Description |
|---|---|---|---|
campaignId | string | optional | The campaignId which will be passed as utm_campaign in a link to the recommended item. |
campaignName | string | optional | The campaign name which will be included in the recommendation.generated event. |
catalogId | string | optional | ID (not name) of the item feed to use in the request. The requested recommendation type (model) must be ready for this item feed. |
clientUUID | string | optional | Profile UUID. This parameter is required for these recommendation types: Personalized Last seen Recent interactions Section Attribute This parameter can be passed in all recommendations. In recommendations which don't require the customer context, it can still be used to create filters. |
contextItemIds | array<string> | optional | Item identifiers, equal to itemId from the item feed. They can be used to define the item context of the query.
|
includeContextItems | boolean | optional | The recommendation results will include context items from the request. |
filterRules | object | optional | Filter configuration |
displayAttributes | string | optional | Attributes to be returned |
abTestContext | object | optional | A/B test context. |
params | object | optional | Extra parameters that will be added to the recommendation.generated event. The total size must not exceed 500 bytes.
|
inventoryContext | optional | Inventory context used to evaluate inventory-related filters and boosting strategies. Can be either a single inventory context or a multi-inventory context (set of channel IDs per inventory). | |
keepSlotsOrder | boolean | optional |
When true, the data array in the response is sorted according to slots. Within each slot, the items are sorted by their score (default) or metric (if selected). For example, if you have 3 slots of 2 items each, the first 2 items in data are from the first slot, the second 2 are from the second slot, and the last 2 are from the third slot.
When false, the data array in the response is sorted only according to score (default) or metric (if selected). Slots have no effect.
The additional extras.slots object always shows slots and items as if this setting was true.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
personalizeSlotsOrder | boolean | optional | Sort the slots by average personalized slot score. This parameter applies only to personalized and attribute recommendation campaigns.
If you want to set personalizeSlotsOrder to true, keepSlotsOrder must also be true.
|
sortMetric | string | optional | ID of the metric to sort the results by. The list of available metrics can be checked by using this endpoint. |
boostingParameters | object | optional | Result boosting parameters |
boostingStrategies | array<recommendations-rust-all-BoostingStrategyV2> | optional | Boosting strategies |
crossWorkspaceMode | object | optional | Specifies if recommendation should use cross-workspace mode and personalize recommendations with events from other members of workspace group if they are available. |
slots | array<recommendations-rust-all-SlotSchemaV2Rust> | required | Slot definitions. To apply default values and fetch all the results as a single slot, send slots as an array with one empty object.
|
Responses
| Status | Description |
|---|---|
200 application/json | Next interaction recommendations |
404 application/json | No recommendations could be generated for the specified profile and filters |
500 application/json | An error occurred |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/recommendations/v2/recommend/items/next-interaction \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"campaignId":"defaultCampaign","campaignName":"string","catalogId":"default","clientUUID":"string","contextItemIds":["string"],"includeContextItems":false,"filterRules":{"excludePurchasedItems":false,"excludePurchasedItemsSinceDays":0,"elasticExcludePurchasedItems":false,"elasticExcludePurchasedItemsSinceDays":0},"displayAttributes":"string","abTestContext":{"experimentId":0,"variantId":"string","requestedCampaignId":"string"},"params":{"source":"mobile"},"inventoryContext":{"channelIds":["string"]},"keepSlotsOrder":true,"personalizeSlotsOrder":false,"sortMetric":"string","boostingParameters":{"metric":"string","strength":0.1,"personalizedBoostingStrength":0},"boostingStrategies":[{"name":"string","condition":"string","strength":1}],"crossWorkspaceMode":{"enabled":true},"slots":[{"name":"string","minNumItems":1,"maxNumItems":5,"shuffleNumItems":1,"filters":"string","elasticFilters":"string","distinctFilter":{"elastic":true,"filters":[{"field":"string","maxNumItems":0,"levelRangeModifier":0}]}}]}'
Templates
GET /template-backend/template — List templates
/api-reference/campaigns#tag/Templates/operation/list-templates
Returns all templates from a Workspace, with an option to filter by type.
API consumer: Synerise User
User role permission required: templates: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
type | query | enum<"SMS", "MOBILE_PUSH", "WEB_PUSH", "DYNAMIC_CONTENT", …> | optional | The type of templates to return |
search | query | string | optional | Searched phrase |
limit | query | number | optional | |
offset | query | number | optional | |
approved | query | boolean | optional | When approval-service enabled it filters for approved templates |
Responses
| Status | Description |
|---|---|
200 application/json | An array of templates |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/template-backend/template?type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&limit=SOME_NUMBER_VALUE&offset=SOME_NUMBER_VALUE&approved=SOME_BOOLEAN_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /template-backend/template — Create template
/api-reference/campaigns#tag/Templates/operation/create-template
Create a new template.
API consumer: Synerise User
User role permission required: templates: create
Request body (required)
application/json · template-backend-TemplateCreateRequest
Template to create
| Field | Type | Required | Description |
|---|---|---|---|
name | string | optional | Name of the template |
type | enum<"SMS", "MOBILE_PUSH", "WEB_PUSH", "DYNAMIC_CONTENT", …> | optional | Template type |
subtype | enum<"BANNER", "TOP_BAR", "BOTTOM_BAR", "MODAL", …> | optional | Template subtype. Currently accepted subtypes are
BANNER (can be used with mobile push)
TOP_BAR, BOTTOM_BAR, MODAL (can be used with in app notifications)
null.
|
contentType | enum<"TEMPLATE", "BLOCK"> | optional | |
directory | string | required | UUID of the directory where the template will be saved |
content | string | required | Template content as a stringified, escaped object. This includes HTML, JS, CSS, and other data, depending on the template type. |
source | integer | required | Information about used editor. Currently accepted builder are
LACK_OF_INFORMATION = 0
BEE_FREE_EDITOR = 1
DYNAMIC_CONTENT_CODE_EDITOR = 2
MAIL_EDITOR = 3
SMS_EDITOR = 4
WEB_PUSH_EDITOR = 5
MOBILE_SIMPLE_PUSH_VISUAL_EDITOR = 6
MOBILE_SILENT_PUSH_CODE_EDITOR = 7
FACEBOOK_POST_EDITOR = 13
IMPORT_FROM_ZIP = 14
IMPORT_FROM_URL = 15
GRAPES_EDITOR = 16
VISUAL_BUILDER = 17
LANDING_PAGE_ADVANCED_DRAG_AND_DROP = 18
WEB_BEE_FREE_EDITOR = 19
MOBILE_SIMPLE_PUSH_CODE_EDITOR = 20
LANDING_PAGE_CODE_EDITOR = 21
LANDING_PAGE_BASIC_DRAG_AND_DROP = 22
|
includeSafeArea | boolean | optional | Define if in_app template should include safe area |
hidden | boolean | optional | Define if the template is hidden |
temporal | boolean | optional | Define if template can be deleted if was not used in any place |
Responses
| Status | Description |
|---|---|
200 application/json | Created template |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/template-backend/template \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":null,"type":"EMAIL","subtype":"BANNER","contentType":"TEMPLATE","directory":"e0326a2d-7697-4ae9-b490-31f97041adcb","content":"{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}","source":0,"includeSafeArea":false,"hidden":false,"temporal":false}'
GET /template-backend/template/{templateUuid} — Get template by UUID
/api-reference/campaigns#tag/Templates/operation/get-template
Return the details of a template identified by its UUID.
API consumer: Synerise User
User role permission required: templates: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
templateUuid | path | string | required | Template UUID |
Responses
| Status | Description |
|---|---|
200 application/json | Template details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PATCH /template-backend/template/{templateUuid} — Patch a template
/api-reference/campaigns#tag/Templates/operation/patch-template
Change template content.
API consumer: Synerise User
User role permission required: templates: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
templateUuid | path | string | required | Template UUID |
Request body (required)
application/json · template-backend-TemplateUpdateRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | optional | Name of the template |
content | string | optional | Template content as a stringified, escaped object. This includes HTML, JS, CSS, and other data, depending on the template type. |
includeSafeArea | boolean | optional | Define if in_app template should include safe area |
Responses
| Status | Description |
|---|---|
200 application/json | Template details |
Example request (cURL)
curl --request PATCH \
--url https://api.synerise.com/template-backend/template/e0326a2d-7697-4ae9-b490-31f97041adcb \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":null,"content":"{\"json\":\"\",\"html\":\"<p>some text</p>\",\"css\":\"p {\\n font-weight: bold\\n}\",\"js\":\"console.log(\\\"test\\\")\",\"raw\":\"<html><head><style type=\\\"text/css\\\">p {\\n font-weight: bold\\n}</style></head><body><p>some text</p></body></html>\",\"source\":2}","includeSafeArea":false}'
POST /template-backend/template/functional — Create functional template
/api-reference/campaigns#tag/Templates/operation/create-functional-template
Create a new functional template. Functional templates are used for cases not covered by the Create template endpoint, such as a password change page.
API consumer: Synerise User
User role permission required: templates: create
Request body (required)
application/json · template-backend-FunctionTemplateCreateRequest
Functional template to create
| Field | Type | Required | Description |
|---|---|---|---|
name | string | optional | Template name |
content | string | required | Template content |
functionType | string | required | Function type |
directory | string | required | UUID of the directory where the template will be saved |
Responses
| Status | Description |
|---|---|
200 application/json | Created template |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/template-backend/template/functional \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"name","content":"<html><h1>Content</h1></html>","functionType":"Password Change","directory":"e0326a2d-7697-4ae9-b490-31f97041adcb"}'
POST /template-backend/template/move — Move templates to another directory
/api-reference/campaigns#tag/Templates/operation/move-templates
Move templates to another directory.
API consumer: Synerise User
User role permission required: templates: update
Request body (required)
application/json · template-backend-MoveTemplatesRequest
| Field | Type | Required | Description |
|---|---|---|---|
templateHashIds | array<string> | required | List of templates to move, identified by hashIds (UUIDs) |
directoryHash | string | required | UUID of the directory where the template will be moved |
Responses
| Status | Description |
|---|---|
200 application/json | Number of moved templates |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/template-backend/template/move \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"templateHashIds":["2ede34f8-1c27-4131-bfb1-5c88856882e1"],"directoryHash":"2ede34f8-1c27-4131-bfb1-5c88856882e1"}'
POST /template-backend/template/remove — Remove templates
/api-reference/campaigns#tag/Templates/operation/remove-templates
Delete templates. This operation is irreversible.
API consumer: Synerise User
User role permission required: templates: delete
Request body (required)
application/json · array<template-backend-TemplateHashId>
List of template UUIDs to remove
Responses
| Status | Description |
|---|---|
200 application/json | Number of removed templates |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/template-backend/template/remove \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '["e0326a2d-7697-4ae9-b490-31f97041adcb"]'
GET /template-backend/template/getById/{id} — Get template by ID
/api-reference/campaigns#tag/Templates/operation/get-id-template
Retrieve a template identified by ID.
API consumer: Synerise User
User role permission required: templates: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | required | Template ID |
Responses
| Status | Description |
|---|---|
200 application/json | Template details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/template-backend/template/getById/12 \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /template-backend/upload/zip — Create template from ZIP
/api-reference/campaigns#tag/Templates/operation/create-zip-template
Create new template from ZIP file.
API consumer: Synerise User
User role permission required: templates: create
Request body (required)
multipart/form-data · object
ZIP file with template
| Field | Type | Required | Description |
|---|---|---|---|
filename | string | required | ZIP file |
Responses
| Status | Description |
|---|---|
200 application/json | Created template |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/template-backend/upload/zip \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: multipart/form-data' \
--form filename=string
POST /template-backend/upload/url — Create template from URL
/api-reference/campaigns#tag/Templates/operation/create-url-template
Create new template from URL.
API consumer: Synerise User
User role permission required: templates: create
Request body (required)
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
url | string | required | URL of the template |
Responses
| Status | Description |
|---|---|
200 application/json | Created template |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/template-backend/upload/url \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"url":"string"}'
Template directories
GET /template-backend/directory — Get directories
/api-reference/campaigns#tag/Template-directories/operation/get-directories
Retrieve a list of all directories in the Workspace.
API consumer: Synerise User
User role permission required: templates: read
Responses
| Status | Description |
|---|---|
200 application/json | Directory list |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/template-backend/directory \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /template-backend/directory — Create directory
/api-reference/campaigns#tag/Template-directories/operation/create-directory
Create a new directory for templates. A directory can store only one type of templates.
API consumer: Synerise User
User role permission required: templates: create
Request body (required)
application/json · template-backend-DirectoryCreateRequest
Directory to create
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | Name of the directory |
type | enum<"SMS", "MOBILE_PUSH", "WEB_PUSH", "DYNAMIC_CONTENT", …> | required | Template type |
readOnly | boolean | optional | Define if the directory is read-only |
contentType | enum<"TEMPLATE", "BLOCK"> | optional |
Responses
| Status | Description |
|---|---|
200 application/json | Created directory |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/template-backend/directory \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string","type":"EMAIL","readOnly":false,"contentType":"TEMPLATE"}'
GET /template-backend/directory/byType — Get directories by type
/api-reference/campaigns#tag/Template-directories/operation/get-type-directories
Retrieve a list of directories of a single type.
API consumer: Synerise User
User role permission required: templates: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
type | query | enum<"SMS", "MOBILE_PUSH", "WEB_PUSH", "DYNAMIC_CONTENT", …> | required | The type of directories to return (directory types match the template types stored in them). Directories with null type are always returned. |
Responses
| Status | Description |
|---|---|
200 application/json | Directory list |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/template-backend/directory/byType?type=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
PATCH /template-backend/directory/{directoryUUID} — Rename directory
/api-reference/campaigns#tag/Template-directories/operation/update_directory
Rename a directory.
API consumer: Synerise User
User role permission required: templates: update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
directoryUUID | path | string | required | Directory UUID |
Request body
application/json · object
| Field | Type | Required | Description |
|---|---|---|---|
name | string | optional | New name of the directory. If not sent, the name of the directory is set to null. |
Responses
| Status | Description |
|---|---|
200 application/json | Directory details |
Example request (cURL)
curl --request PATCH \
--url https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":null}'
DELETE /template-backend/directory/{directoryUUID} — Remove directory
/api-reference/campaigns#tag/Template-directories/operation/remove_directory
Remove a directory. Only empty directories can be removed.
API consumer: Synerise User
User role permission required: templates: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
directoryUUID | path | string | required | Directory UUID |
Responses
| Status | Description |
|---|---|
200 | Directory removed |
400 | Directory is not empty |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/template-backend/directory/e0326a2d-7697-4ae9-b490-31f97041adcb \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
Screen views (legacy)
GET /schema-service/screenViews — Get all screen views (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViews
Retrieve a paginated list of all screen view campaigns in the workspace.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | string | required | The maximum number of items to retrieve for pagination |
page | query | integer | required | The number of the page to retrieve |
status | query | enum<"DRAFT", "ACTIVE", "SCHEDULED", "PAUSED", …> | optional | Filter the results by screen view status |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/schema-service/screenViews?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/screenViews/byKeys — Get screen views by keys (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewsByKeys
Retrieve list of screen view campaigns by keys in the workspace.
API consumer: Synerise User
User role permission required: assets_docs: read
Request body
application/json · array<string>
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/byKeys \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '["string"]'
GET /schema-service/screenViews/single/{screenViewId}/{screenViewVersion} — Get screen view (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/getScreenViewByVersion
Retrieve the details of a single screen view campaign.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /schema-service/screenViews/versions/{screenViewId} — Get screen view versions (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/listOfScreenViewVersions
Retrieve all versions of a screen view campaign.
API consumers: Synerise User, Workspace (Business Profile)
API key permission required: SCHEMA_SERVICE_SCHEMA_READ
User role permission required: assets_docs: read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
limit | query | string | required | The maximum number of items to retrieve for pagination |
page | query | integer | required | The number of the page to retrieve |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url 'https://api.synerise.com/schema-service/screenViews/versions/%7BscreenViewId%7D?limit=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /schema-service/screenViews/generate — Generate screen view (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/generateScreenViewGet
When this method is called, the Synerise backend finds all screen view campaigns applicable to the profile and returns the screen view with the highest priority (1).
API consumers: Workspace (Business Profile), Synerise User, Profile (Client), Anonymous Profile
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Responses
| Status | Description |
|---|---|
200 application/json | Processed JSON content |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/screenViews/generate \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
GET /schema-service/v2/screenViews/generate — Generate screen view (deprecated)
When this method is called, the Synerise backend finds all screen view campaigns applicable to the profile and returns the screen view with the highest priority (1).
API consumers: Workspace (Business Profile), Synerise User, Profile (Client), Anonymous Profile
API key permission required: SCHEMA_SERVICE_SCHEMA_CREATE
User role permission required: assets_docs: create
Responses
| Status | Description |
|---|---|
200 application/json | Processed JSON content |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request GET \
--url https://api.synerise.com/schema-service/v2/screenViews/generate \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/screenViews/createNew — Initialize screen view (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/initializeScreenViewPost
Create a new screen view campaign. It is created as a blank, without any conditions.
API consumer: Synerise User
User role permission required: assets_docs: create
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/createNew \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
POST /schema-service/screenViews/content/{screenViewId}/{screenViewVersion}/copyFromExistingScreenView — Copy content (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/copyContent
Copy content to a screen view draft from another screen view.
API consumer: Synerise User
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Request body
application/json · schema-service-versionedScreenViewKey
| Field | Type | Required | Description |
|---|---|---|---|
screenViewId | string | optional | UUID of the screen view |
screenViewVersion | string | optional | Version of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D/copyFromExistingScreenView \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
POST /schema-service/screenViews/content/{screenViewId}/{screenViewVersion} — Add content (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createContent
Add content to a screen view draft.
API consumer: Synerise User
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Request body
application/json · schema-service-ScreenViewContent
| Field | Type | Required | Description |
|---|---|---|---|
json | object | required | JSON structure of the screen view. By default, a newly created screen view has the following json value:
"collection": "{% screenviewcollection %}"
The {% screenviewcollection %} insert is used to pick and display the documents from the documents in documents or groups.
If this insert is not used, you must manually insert each document with {% document slug%}.
|
documents | array<string> | required | An array of documents. If groups is used, this array must be empty.
|
data | array<any> | optional | An array of documents or Brickworks records |
groups | array<schema-service-DocumentGroupId> | required | An array of document groups, If documents is used, this array must be empty.
|
groupsOrder | boolean | optional | By default, group are ordered for display by their priority. When this field is set to true, they are displayed according to their order in the groups array instead.
|
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/content/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"json":{"property1":null,"property2":null},"documents":["string"],"data":[{"slug":"basket"}],"groups":["43c97b25-4a10-45d0-99b7-d472eea2bb24"],"groupsOrder":false}'
POST /schema-service/screenViews/audience/{screenViewId}/{screenViewVersion} — Add audience (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/createAudience
Define the audience for a screen view draft.
API consumer: Synerise User
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Request body
application/json · schema-service-Audience
| Field | Type | Required | Description |
|---|---|---|---|
targetType | enum<"SEGMENT", "QUERY", "ALL"> | required | The method of defining the audience:
SEGMENT sets the audience to segmentations whose UUIDs are provided in segments
QUERY sets the audience to an analytics query provided in query
ALL sets the audience to all profiles in the database
|
segments | array<string> | optional | An array of segmentation IDs. Used with targetType: SEGMENT
|
query | string | optional | Stringified analysis object for the segmentation analytics engine. Used with targetType: QUERY. Refer to the Analytics API Reference.
|
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/audience/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"targetType":"SEGMENT","segments":["string"],"query":"{\"analysis\":{\"title\":\"Unnamed segmentation\",\"description\":\"\",\"unique\":true,\"segments\":[{\"title\":\"Segmentation A\",\"description\":\"\",\"filter\":{\"matching\":true,\"expressions\":[{\"_id\":\"a9b76c8e-34bd-4ac3-be8f-f37041d126bd\",\"name\":\"\",\"type\":\"FUNNEL\",\"matching\":true,\"funnel\":{\"_id\":\"5c759d73-49c6-409f-96a3-b569dff8f8ff\",\"title\":\"Unnamed\",\"completedWithin\":null,\"dateFilter\":{\"type\":\"RELATIVE\",\"offset\":{\"type\":\"DAYS\",\"value\":0},\"duration\":{\"type\":\"DAYS\",\"value\":30}},\"steps\":[{\"_id\":\"78b97ae0-1bc5-45fb-82a4-4f1280cfbdff\",\"title\":\"\",\"action\":{\"id\":944,\"name\":\"page.visit\"},\"eventName\":\"page.visit\",\"expressions\":[]}],\"exact\":false}}]}}]}}"}'
POST /schema-service/screenViews/publish/{screenViewId}/{screenViewVersion} — Publish screen view (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/publishScreenView
Make the screen view accessible to customers.
API consumer: Synerise User
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Request body
application/json · schema-service-publishRequest
| Field | Type | Required | Description |
|---|---|---|---|
overwrite | boolean | required | Currently unused |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/publish/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"overwrite":true}'
POST /schema-service/screenViews/copyDraftFromExistingScreenView — Copy draft from existing screen view (deprecated)
Copy a duplicate of an active screen view. The duplicate is in draft status.
API consumer: Synerise User
User role permission required: assets_docs: create
Request body
application/json · schema-service-versionedScreenViewKey
| Field | Type | Required | Description |
|---|---|---|---|
screenViewId | string | optional | UUID of the screen view |
screenViewVersion | string | optional | Version of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/copyDraftFromExistingScreenView \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
POST /schema-service/screenViews/createDraftFromExistingScreenView — Create draft from existing screen view (deprecated)
Create a duplicate of an active screen view. The duplicate is in draft status.
API consumer: Synerise User
User role permission required: assets_docs: create
Request body
application/json · schema-service-versionedScreenViewKey
| Field | Type | Required | Description |
|---|---|---|---|
screenViewId | string | optional | UUID of the screen view |
screenViewVersion | string | optional | Version of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/createDraftFromExistingScreenView \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"screenViewId":"481855c5-f86e-453f-a0fa-d34b5a2be745","screenViewVersion":"string"}'
PUT /schema-service/screenViews/single/{screenViewId}/{screenViewVersion}/description — Update screen view description (deprecated)
Update the description of a screen view. You can update the descriptions of active screen views.
API consumer: Synerise User
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Request body
application/json · string
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/description \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '"string"'
PUT /schema-service/screenViews/single/{screenViewId}/{screenViewVersion}/priority — Update screen view priority (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/updatePriorityOfScreenView
Update the priority of a screen view. You can update the priorities of active screen views.
API consumer: Synerise User
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Request body (required)
application/json · integer
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request PUT \
--url https://api.synerise.com/schema-service/screenViews/single/%7BscreenViewId%7D/%7BscreenViewVersion%7D/priority \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data 0
POST /schema-service/screenViews/discardChanges/{screenViewId}/{screenViewVersion} — Discard changes (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/discardChanges
Discard the changes made in a version of a screen view.
API consumer: Synerise User
User role permission required: assets_docs: create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request POST \
--url https://api.synerise.com/schema-service/screenViews/discardChanges/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
DELETE /schema-service/screenViews/delete/{screenViewId} — Delete screen view (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/deleteScreenView
Delete a screen view and all its versions. This operation is irreversible.
API consumer: Synerise User
User role permission required: assets_docs: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/schema-service/screenViews/delete/%7BscreenViewId%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
DELETE /schema-service/screenViews/single/delete/{screenViewId}/{screenViewVersion} — Delete screen view version (deprecated)
/api-reference/loyalty-and-engagement#tag/Screen-views-(legacy)/operation/deleteSingleScreenView
Delete a version of a screen view.
API consumer: Synerise User
User role permission required: assets_docs: delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
screenViewId | path | string | required | UUID of the screen view |
screenViewVersion | path | string | required | Version of the screen view |
Responses
| Status | Description |
|---|---|
200 application/json | Success |
400 application/json | See error message for details |
401 application/json | Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc. |
403 application/json | Forbidden; insufficient permissions |
404 application/json | Resource not found |
500 application/json | See error message for details |
Example request (cURL)
curl --request DELETE \
--url https://api.synerise.com/schema-service/screenViews/single/delete/%7BscreenViewId%7D/%7BscreenViewVersion%7D \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'