Lpgenerator™
Description
Imports or updates customer profile.
At first create an input form for customer profiles data fields in the landing page editor. It can contain any database field inputs.
Request URL
Method: POST
https://example.com/api/v1.1/integrations/lpgenerator/profile_import
Request parameters
Lpgenerator default fields. You cannot redefine field values.
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
id | string | "777777" | ||
meta_data | JSON object | "meta_data" : {...} | Да | Metadata like IP and browser info |
utm_data | JSON object | "utm_data" : {...} | Да | Predefined utm data (can be empty) |
Hidden fields
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
db_id | string | "1" | Yes | Database ID |
matching | string | "phone" | No | Profiles matching mode: email/phone/custom By default – email |
field_name | string | "custom_ID" | No | Sets a custom field for profile matching. |
resource_id | string | "3" | No | Defines subscription resource ID |
Profile fields
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
lead_data | JSON object | "lead_data" : {...} | Altcraft database fields |
db_id
, token
, resource_id
, matching
, field_name
must be predefined in LPGenerator web hook settings
Use Altcraft API URL as LPGenerator web hook URL: <your.domain>/api/integrations/lpgenerator/profile_import
API tokens are created by Altcraft platform master users.
Request examples
Email matching profile import:
{
"id": 77777777,
"lead_data": {
"email": "qwerty@dron.ff",
},
"meta_data": {
"HTTP_USER_AGENT": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"LANGUAGE": "en-US",
"form_name": "form 1",
"from": "Page 107570 (Variant 1)",
"page_id": 1642169,
"user_ip": "96.123.123.123",
"variant_id": 1935651
},
"utm_data": {}
"db_id": "2",
"resource_id": "2",
"matching": "email",
"token": "abcdefghijklmnqrstuvwxyz"
}
Profile fields update with a resource subscription (custom field profile matching by custom_ID
field):
{
"id": 27773744,
"lead_data": {
"email": "ytrewq@dron.ff",
"custom_ID": "Bagdasaryan"
},
"meta_data": {
"HTTP_USER_AGENT": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"LANGUAGE": "en-US",
"form_name": "form 1",
"from": "Page 207571",
"page_id": 1642169,
"user_ip": "96.123.123.123",
"variant_id": 1935651
},
"utm_data": {}
"db_id": "2",
"resource_id": "2",
"matching": "custom",
"field_name": "custom_ID",
"token": "abcdefghijklmnqrstuvwxyz"
}
Response example
{
"error": 0,
"error_text": "Successful operation"
}
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |