Обновление данных о пользователе
Получение или обновление информации о пользователей
Метод позволяет:
получить нового пользователя, и использовать его uid в дальнейших запросах, если вы не оперируете собственным идентификатором пользователя (
user.custom
).получить идентификатор новой сессии для пользователя, если вы не оперируете собственным идентификатором сессии (
session.custom
).обновить данные о пользователе.
post
Get or store user info, start session
Body
secstringRequired
Section id
Responses
200
Successful response
application/json
422
Error validation
application/json
post
POST /user HTTP/1.1
Host: srv.gravityads.ai
Content-Type: application/json
Accept: */*
Content-Length: 154
{
"sec": "646689c3404f91f26103faa6",
"user": {},
"session": {},
"ctx": {
"type": "HOMEPAGE",
"data": [],
"url": "http://site.ru",
"referrer": "http://ya.ru"
},
"device": {}
}
{
"user": {
"uid": "665830f533f9a0959705ec54",
"isNewUser": true
},
"session": {
"ses": "b368b83f-0cc6-4bc3-aa98-31c1047099fa",
"ses_ttl": 7200
},
"SLID": "94D84651-2840-42CC-B8B7-339445DFDD2E",
"deviceInfo": {
"type": "desktop",
"os": "Windows"
},
"trafficSource": "Search",
"referrer": "",
"audiences": [],
"geo": {
"country": "Russia",
"country_id": 2017370,
"country_iso": "RU",
"region": "",
"region_id": null,
"region_iso": "",
"city": "",
"city_id": null
},
"serverTime": 1717431735,
"audience_rules": null,
"utm": {
"utm_source": "",
"utm_medium": "",
"utm_campaign": "",
"utm_term": "",
"utm_content": ""
},
"browser": "Chrome",
"hits": {
"ses": [],
"day": [],
"hist": [],
"churn": []
}
}
Last updated