SDK API
  1. Request
SDK API
  • Request
    • Get or store user
      POST
    • Store visit event
      POST
    • Store event
      POST
    • Get campaign
      POST
    • Get strategy
      POST
    • Engagement
      GET
  1. Request

Get strategy

Developing
POST
/strategy
Позволяет получить рекомендации по заданной стратегии (например, “Похожие товары”, “Часто покупают вместе”).
Поддерживает настройку фильтров, условий, полей и ограничения по количеству.
Используется для построения виджетов и сценариев персонализации.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "sec": "stringstringstringstring",
    "user": {
        "uid": "stringstringstringstring",
        "ses": "string",
        "attributes": {
            "property1": "string",
            "property2": "string"
        }
    },
    "ctx": {
        "type": "HOMEPAGE",
        "data": [
            "string"
        ],
        "lng": "string",
        "location": "string",
        "pageNumber": 0,
        "referrer": "string",
        "utm": {
            "utm_source": "string",
            "utm_medium": "string",
            "utm_campaign": "string",
            "utm_term": "string",
            "utm_content": "string"
        },
        "attributes": {
            "property1": "string",
            "property2": "string"
        }
    },
    "device": {
        "userTime": "2019-08-24T14:15:22Z",
        "ua": "string",
        "ip": "192.168.0.1",
        "id": "string",
        "tracking": "notDetermined",
        "permission": "provisional"
    },
    "options": {
        "isReturnCounter": false,
        "isReturnUserInfo": false,
        "isUniqueProduct": true
    },
    "data": [
        {
            "strategy_id": "stringstringstringstring",
            "option": {
                "maxProducts": 1,
                "skusOnly": false,
                "fields": [
                    "string"
                ]
            },
            "rules": [
                {
                    "id": 0,
                    "type": "include",
                    "slots": [
                        1
                    ],
                    "conditions": [
                        {
                            "field": "string",
                            "arguments": [
                                {
                                    "action": "equal",
                                    "value": [
                                        "string"
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/strategy' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sec": "stringstringstringstring",
    "user": {
        "uid": "stringstringstringstring",
        "ses": "string",
        "attributes": {
            "property1": "string",
            "property2": "string"
        }
    },
    "ctx": {
        "type": "HOMEPAGE",
        "data": [
            "string"
        ],
        "lng": "string",
        "location": "string",
        "pageNumber": 0,
        "referrer": "string",
        "utm": {
            "utm_source": "string",
            "utm_medium": "string",
            "utm_campaign": "string",
            "utm_term": "string",
            "utm_content": "string"
        },
        "attributes": {
            "property1": "string",
            "property2": "string"
        }
    },
    "device": {
        "userTime": "2019-08-24T14:15:22Z",
        "ua": "string",
        "ip": "192.168.0.1",
        "id": "string",
        "tracking": "notDetermined",
        "permission": "provisional"
    },
    "options": {
        "isReturnCounter": false,
        "isReturnUserInfo": false,
        "isUniqueProduct": true
    },
    "data": [
        {
            "strategy_id": "stringstringstringstring",
            "option": {
                "maxProducts": 1,
                "skusOnly": false,
                "fields": [
                    "string"
                ]
            },
            "rules": [
                {
                    "id": 0,
                    "type": "include",
                    "slots": [
                        1
                    ],
                    "conditions": [
                        {
                            "field": "string",
                            "arguments": [
                                {
                                    "action": "equal",
                                    "value": [
                                        "string"
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}'

Responses

🟢200Success
application/json
Body

Example
{
    "user": {
        "uid": "stringstringstringstring",
        "ses": "7356efc2-6ffd-4553-bade-b9ab5d9ce141",
        "segments": [
            "stringstringstringstring"
        ],
        "conditions": {
            "property1": {},
            "property2": {}
        },
        "details": {
            "slid": "string",
            "deviceInfo": {
                "brand": "string",
                "type": "desktop",
                "browser": "Chrome"
            },
            "trafficSource": "Paid Search",
            "geo": {
                "country": "string",
                "countryIso": "string",
                "region": "string",
                "regionIso": "string",
                "city": "string",
                "cityId": "string"
            },
            "isNew": true,
            "affinity": {
                "property1": {
                    "property1": 0,
                    "property2": 0
                },
                "property2": {
                    "property1": 0,
                    "property2": 0
                }
            }
        }
    },
    "data": [
        {
            "strategyId": "stringstringstringstring",
            "name": "string",
            "pageNumber": 0,
            "countPages": 0,
            "fallback": true,
            "slots": [
                {
                    "item": {},
                    "fallback": true,
                    "strId": 0,
                    "slotId": "string",
                    "campaignData": {
                        "placementId": "string",
                        "campaignId": "string",
                        "experienceId": "string",
                        "variationId": "string",
                        "adSetId": "string",
                        "creativeId": "string",
                        "deliveryMethod": "string",
                        "contentType": "string",
                        "decisionId": "string",
                        "ord": {
                            "erid": "string",
                            "title": "string"
                        }
                    },
                    "events": [
                        {
                            "type": "string",
                            "urls": [
                                "string"
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}
🟢204No Content
🟠403Forbidden
🟠422Parameter Error
🔴500Server Error
Modified at 2025-04-25 12:22:03
Previous
Get campaign
Next
Engagement
Built with