Skip to main content

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

{
"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
}
]
}
}

Description

ParameterTypeExampleDescription
_bdatestring1990-02-22T21:00:00ZBirth date in RFC 3339 format
_browserstringFirefoxWeb browser
_citystringRyazanCity
_countrystringRUCountry in TLD format
_fnamestringOllyFirst name
_ipstring94.231.119.122IP address *
_lnamestringLambertLast name
_postal_codeint390000Postal code (ZIP)
_regionstringRyazan OblastRegion
_statusint0Global subscription status
_tzstringEurope/MoscowTime zone
emailstringexample@altcraft.comEmail address
phonesJSON array["+790000000000"]Phone numbers
subscriptionsJSON array["",""]Profile subscriptions
_regcountrystringUSRegistration country in TLD
_regcitystringNew YorkRegistration city
_regipstring94.231.119.122Registration IP address
_regurlstringwww.example.orgRegistrationURL
_regdatestring2018-02-22T21:00:00ZRegistration date in RFC 3339 format
_sexint0Gender
_vendorstringform#33Website form or other lead source
custom_field*custom_valueCustom 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":{
"action": "incr",
"value": 1000
}
info

* If you send "_ip" parameter containing IPv4 value, Altcraft will automatically detect subscriber's location and record values for the following system fields:

{
"_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"
}