Skip to main content

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.

ParameterTypeExampleRequiredDescription
idstring"777777"

meta_dataJSON object"meta_data" : {...}ДаMetadata like IP and browser info
utm_dataJSON object"utm_data" : {...}ДаPredefined utm data (can be empty)

Hidden fields

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
db_idstring"1"YesDatabase ID
matchingstring"phone"NoProfiles matching mode: email/phone/custom
By default – email
field_namestring"custom_ID"NoSets a custom field for profile matching.
resource_idstring"3"NoDefines subscription resource ID

Profile fields

ParameterTypeExampleRequiredDescription
lead_dataJSON 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

ParameterTypeDescription
errorintError code
error_textstringError text