Profile data object
Profile data object is used in most profile import requests. It contains profile database field values and subscriptions to different resources.
You can retrieve database fields information by making request to api/v1.1/databases/fields_get/
.
You can also see information about databases and profile fields in User documentation.
JSON
- JSON
- XML
{
"data": {
"_regcountry": "US",
"_regcity": "New York",
"_regip": "94.231.119.122",
"_regurl": "www.example.com",
"_regdate": "2019-03-14T22:00:00Z",
"_bdate": "1990-02-22T21:00:00Z",
"_browser": "Thunderbird",
"_city": "Ryazan",
"_country": "RU",
"_fname": "Olly",
"_ip": "94.231.119.122",
"_lname": "Lambert",
"_postal_code": "390000",
"_region": "Ryazan Oblast",
"_vendor": "form_#31",
"_sex": 0,
"_status": 0,
"_tz": "Europe/Moscow",
"email": "example@altcraft.com",
"phones": [
"+79000000000"
],
"custom_field": "custom_value",
"subscriptions": [
{
"channel": "email",
"email": "boris.yudaev@altcraft.com",
"priority": 0,
"resource_id": 1,
"status": 0
}
]
}
}
<xml>
<data>
<regcountry>US</regcountry>
<regcity>New York</regcity>
<regip>94.231.119.122</regip>
<regurl>www.example.com</regurl>
<regdate>2019-03-14T22:00:00Z</regdate>
<bdate>1990-02-22T21:00:00Z</bdate>
<browser>Thunderbird</browser>
<city>Ryazan</city>
<country>RU</country>
<fname>Olly</fname>
<ip>94.231.119.122</ip>
<lname>Lambert</lname>
<postal_code>390000</postal_code>
<region>Ryazan Oblast</region>
<vendor>form_#31</vendor>
<sex>0</sex>
<status>0</status>
<tz>Europe/Moscow</tz>
<email>example@altcraft.com</email>
<phones array='true'>+79000000000</phones>
<custom_field>custom_value</custom_field>
<subscriptions array='true'>
<channel>email</channel>
<email>boris.yudaev@altcraft.com</email>
<priority>0</priority>
<resource_id>1</resource_id>
<status>0</status>
</subscriptions>
</data>
</xml>
Description
Parameter | Type | Example | Description |
---|---|---|---|
_bdate | string | 1990-02-22T21:00:00Z | Birth date in RFC 3339 format |
_browser | string | Firefox | Web browser |
_city | string | Ryazan | City |
_country | string | RU | Country in TLD format |
_fname | string | Olly | First name |
_ip | string | 94.231.119.122 | IP address * |
_lname | string | Lambert | Last name |
_postal_code | int | 390000 | Postal code (ZIP) |
_region | string | Ryazan Oblast | Region |
_status | int | 0 | Global subscription status |
_tz | string | Europe/Moscow | Time zone |
string | example@altcraft.com | Email address | |
phones | JSON array | ["+790000000000"] | Phone numbers |
subscriptions | JSON array | ["",""] | Profile subscriptions |
_regcountry | string | US | Registration country in TLD |
_regcity | string | New York | Registration city |
_regip | string | 94.231.119.122 | Registration IP address |
_regurl | string | www.example.org | RegistrationURL |
_regdate | string | 2018-02-22T21:00:00Z | Registration date in RFC 3339 format |
_sex | int | 0 | Gender |
_vendor | string | form#33 | Website form or other lead source |
custom_field | * | custom_value | Custom database fields. Field functional update is possible. To do this, you must specify the action and value. An example of a request to increase the value of a field: "custom_field":{ |
info
* If you send "_ip"
parameter containing IPv4 value, Altcraft will automatically detect subscriber's location and record values for the following system fields:
- JSON
- XML
{
"_ip": "94.231.119.122", // (records IP as well)
"_lat": 54.6197, // (lattitude)
"_lon": 39.74, // (longitude)
"_postal_code": "390000",
"_region": "Ryazanskaya Oblast'",
"_country": "RU",
"_city": "Ryazan",
"_tz": "Europe/Moscow"
}
<xml>
<ip>94.231.119.122</ip>// уже добавляется само по себе
<lat>54.6197</lat>// географическая широта
<lon>39.74</lon>// географическая долгота
<postal_code>390000</postal_code>
<region>Ryazanskaya Oblast</region>
<country>RU</country>
<city>Ryazan</city>
<tz>Europe/Moscow</tz>
</xml>