Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The subscriptions array stores data about the profile's subscriptions to resources. One object is one subscription.

Parameter

Type

Example

Description

resource_idint1Resource ID
statusstring"subscribed"

Subscription status

It is recommended to pass the parameter in the request only in cases where it is necessary to update the subscription status.

Email channel
channelstring"email"Channel type
emailstring"john@example.com"Email
SMS channel
channelstring"sms"Channel type
phonestring"+79000000000"Phone number
Push channel
channelstring"push"Channel type
providerstring"Firefox"Provider type
subscription_idstring"abcdefghijklmnqrstuvwxyz"Subscription ID

JSON request example

Code Block
{
     "token": "91f1dfa81c264a938b475677c60ce967",
     "db_id": 1,
     "matching": "email",
     "email": "example@example.com",
     "detect_geo": true,
     "data": {
 
        "_fname": "Olly",
        "_lname": "Lambert",
 
        "email": "example@example.com",
        "phones": ["+790000000000"],
 
        "subscriptions": [
            {
                "channel": "email",
                "email": "example@example.com",
                "resource_id": 1
            },
            {
                "channel": "phone",
                "phone": "+790000000000",
                "resource_id": 1
            }
        ],
 
        "_bdate": "1990-02-22T21:00:00Z",
        "_sex": 0,
 
        "_regdate": "2019-03-14T22:00:00Z",
        "_regip": "94.231.119.122",
        "_ip": "94.231.119.122",
 
        "_tz": "Europe/Moscow",
        "_postal_code": "390000",
 
        "_os": "Windows 10",
        "_browser": "Firefox",
 
        "_vendor": "form_#31",
  
        "custom_field": "custom_value"
    }
}

...

Code Block
{
    "error": 0,
    "error_text": "Successful operation",
    "profile_id": "abcdefghijklmnqrstuvwxyz"
}

...