Quick profile import
Description
Imports a profile to a database in a quick way. The request has a linear structure and fits simple integrations.
To have access to extended import options please use /api/v1.1/profiles/import.
The request imports or updates the profile;if you pass the resource ID and contact details, it adds subscriptions.
Request URL
Method: POST. Data can be passed both in URL parameters and in the body of the request.
https://example.com/api/integrations/any/profile_import
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
db_id | int | 1 | Yes | Database ID |
matching | string | "email" | No | Profiles matching mode:
|
resource_id | int | 1 | No | Subscribe to a resource using request contact data |
string | "example@example.com" | No | Email address | |
phone | string | "+75551111444" | No | Phone number |
_regip | string | "172.16.0.1" | No | Registration IPv4 or IPv6. For IPv4 geodata will be retrieved |
_regurl | string | "https://example.com/?" | No | Registration URL or HTTP head "referer" value. |
* | Yes | Specify at least one database field. To retrieve field information use /api/v1.1/databases/fields_get | ||
trigger_id | int | 13 | No | The ID of the trigger campaign. If the trigger_id is set, the profile will be imported and the trigger campaign will be start at the same time; if not — the profile will be imported in the usual way. |
workflow_id | int | 1 | No | Scenario ID. If workflow_id is set, there will be a simultaneous import of the profile and adding the profile to the scenario; if not — the profile will be imported in the usual way. |
Response parameters
Quick import returns HTTP code and response description.
HTTP code | Description |
---|---|
200 | Import successful |
400 | Bad request, please verify request parameters |
402 | Tariff account limit reached |
403 | Invalid API key |
404 | No database or subscription resource found |
402 | Account exceeds tariff limits |
409 | More than one profiles matches, inaccurate matching |
435 | Unable to keep field unique - this can be email while matching by other parameters |
500 | Internal server error |
Request example
curl "https://example.com/api/integrations/any/profile_import" \
-d token="abcdefghijklmnqrstuvwxyz" \
-d db_id=1 \
-d resource_id=1 \
-d email="example@example.com" \
-d _fname="John" \
-d _lname="Doe"
Response example
Successfully added 5beeea0ad861602a078a6f34