https://mlapi.tracker.my.com/v1/recommendation/method_name
Personalize API enables you to get personalized recommendations for app users.
Use GET request in the following format:
https://mlapi.tracker.my.com/v1/recommendation/method_name
You can send a request using Swagger UI
Use the item
method to get
recommendations for an offer, including a single item.
End-point: https://mlapi.tracker.my.com/v1/recommendation/item
Parameters:
Name | Description | Type | Example |
---|---|---|---|
sdk_key* | App key, embedded in SDK, is issued after adding the application | String | 00001234567890123456 |
custom_user_id* | User identifier sent via SDK. It defines individual user. | String | 1234 |
flat | A flag changing the answer format. Possible values: 0 — the data field is a dictionary 1 — the data field is an array Default value: 0 |
Boolean | 0 |
reset | A sign of resetting recommendations on subsequent requests. Possible values: 0 — do not reset 1 — reset Default value: 1 |
Boolean | 1 |
placement_ids | Offer placement identifiers. If the parameter is not specified, the recommendation will be generated for all offer placement | String array | A, B, C |
* — required parameter.
Example query:
curl --location --request GET 'https://mlapi.tracker.my.com/api/v1/recommendation/item?sdk_key=00001234567890123456&custom_user_id=1234&placement_ids=A&placement_ids=B&placement_ids=C'
Response format:
{
"data": {
"A":{
"test_id": 0,
"group_id": 0,
"placement_id": "string",
"offer": {
"offer_id": "string",
"subitems": [
{
"sku": "string",
"payload": "string",
"price": 0,
"value": 0,
"discount_price": 0,
"discount_value": 0
}
]
},
},
"B":{}
"C":{}
}
}
The response includes the following data:
test_id
: A/B test identifiergroup_id
: group identifier to which the user belongs:
group for recommendations or control groupplacement_id
: offer placement identifieroffer_id
: offer identifierprice
: default price of the offer (not required to use)value
: default value of the offer (not required to use)discount_price
: recommended offer pricediscount_value
: recommended offer valueExample query with flat=1
:
curl --location --request GET 'https://mlapi.tracker.my.com/api/v1/recommendation/set?sdk_key=00001234567890123456&custom_user_id=1234&placement_ids=A&placement_ids=B&placement_ids=C&flat=1'
Response format with flat=1
:
{
"data": [
{
"test_id": 0,
"group_id": 0,
"placement_id": "string",
"offer": {
"offer_id": "string",
"subitems": [
{
"sku": "string",
"payload": "string",
"price": 0,
"value": 0,
"discount_price": 0,
"discount_value": 0
}
]
},
},
{}
{}
]
}
The response includes the following data:
test_id
: A/B test identifiergroup_id
: group identifier to which the user belongs:
group for recommendations or control groupplacement_id
: offer placement identifieroffer_id
: identifier of the offer, including several itemssku
: name of the bundle in the store
(it may not be unique for the store item)payload
: a unique item name within the applicationprice
: default price of the offer (not required to use)value
: default value of the offer (not required to use)discount_price
: recommended offer pricediscount_value
: recommended offer value
Use the set
method to get
recommendations for an offer, including a set of items.
End-point: https://mlapi.tracker.my.com/v1/recommendation/set
Parameters:
Name | Description | Type | Example |
---|---|---|---|
sdk_key* | App key, embedded in SDK, is issued after adding the application | String | 00001234567890123456 |
custom_user_id* | User identifier sent via SDK. It defines individual user. | String | 1234 |
flat | A flag changing the answer format. Possible values: 0 — the data field is a dictionary 1 — the data field is an array Default value: 0 |
Boolean | 0 |
reset | A sign of resetting recommendations on subsequent requests. Possible values: 0 — do not reset 1 — reset Default value: 1 |
Boolean | 1 |
placement_ids | Offer placement identifiers. If the parameter is not specified, the recommendation will be generated for all offer placement | String array | A, B, C |
* — required parameter.
Example query:
curl --location --request GET 'https://mlapi.tracker.my.com/api/v1/recommendation/set?sdk_key=00001234567890123456&custom_user_id=1234&placement_ids=A&placement_ids=B&placement_ids=C'
Response format:
{
"data": {
"A":{
"test_id": 0,
"group_id": 0,
"placement_id": "string",
"offer": {
"offer_id": "string",
"subitems": [
{
"sku": "string",
"payload": "string",
"price": 0,
"value": 0,
"discount_price": 0,
"discount_value": 0
}
]
},
},
"B":{}
"C":{}
}
}
Example query with flat=1
:
curl --location --request GET 'https://mlapi.tracker.my.com/api/v1/recommendation/set?sdk_key=00001234567890123456&custom_user_id=1234&placement_ids=A&placement_ids=B&placement_ids=C&flat=1'
Response format with flat=1
:
{
"data": [
{
"test_id": 0,
"group_id": 0,
"placement_id": "string",
"offer": {
"offer_id": "string",
"subitems": [
{
"sku": "string",
"payload": "string",
"price": 0,
"value": 0,
"discount_price": 0,
"discount_value": 0
}
]
},
},
{}
{}
]
}
Both responses include the following data:
test_id
: A/B test identifiergroup_id
: group identifier to which the user belongs:
group for recommendations or control groupplacement_id
: offer placement identifieroffer_id
: identifier of the offer, including several itemssku
: name of the bundle in the store
(it may not be unique for the store item)payload
: a unique item name within the applicationprice
: default price of the offer (not required to use)value
: default value of the offer (not required to use)discount_price
: recommended offer pricediscount_value
: recommended offer valueCode | Description |
---|---|
200 | The request was successfully processed |
400 | Request error, parameters not validated |