Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v72
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
    • Import profile
    • Update profile
    • Import multiple profiles
    • Update multiple profiles
    • Add multiple profiles
    • Add profile to database
    • Quick profile import
    • Import profile to RabbitMQ
    • Get profile data
    • Uploading profiles to a file
    • Suspend all database profiles
    • Unsuspend all profiles in a database
    • Delete profile
    • Subscription fields functional update
    • Database fields functional update
    • Merging multiple profiles
    • Unsubscribe profile from resource
    • Profile splitting
    • Subscriptions
    • Action history
    • Profile relations
      • Attach relation
      • Detach relation
      • Modify relation properties
      • Overwrite relation properties
      • Get profile relations info
      • Get profile relations info
    • Get data for multiple profiles
  • Databases
  • Resources
  • Segments
  • Static segments
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Automation scenarios
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDevv71
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
This is documentation for Altcraft Platform v72. This documentation is no longer maintained.
The information for up-to-date platform version at this page is available (v74).
  • Profiles
  • Profile relations
  • Modify relation properties
Documentation for version v72

Modify relation properties

Description​

Modifies (increases or decreases) relation properties' values by those you send in weights parameter of the request. You can use both positive and negative values.

note

If no relation is found between the two profiles, a new relation will be created.

tip

If you need to replace properties' values instead of increasing/decreasing, use Overwrite relation properties endpoint.

URL​

Method: POST.

https://example.com/api/v1.1/relations/strengthen

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
rel_idint3YesRelation ID
profile_aobject
{"profile_id": "c1wefohoi1312"}
YesDatabase A profile - relation recipient (object).
profile_bobject
{"profile_id": "c1wefohoi13123"}
YesDatabase B profile - relation initiator (subject).
weightsobject
{"user_like": 2, "donate": 343, "is_online": true}
YesRelation properties.

If you need to weaken the property, pass a negative value: -2 or -343
Profile matching mode
matchingstring"email"
"email_profile"
"phone"
"profile_id"
"custom"
No, if matched by email from profile or subscriptionsProfile matching mode
By default - email
emailstring"john@example.com""matching":"email" - both profile data and subscriptions
"matching":"email_profile" - profile data only
Email address
phonestring"+79000000000""matching":"phone"Phone number
profile_idstring"abcdefghijklmnqrstuvwxyz""matching":"profile_id"Profile ID
field_namestring"CRM_ID""matching":"custom"Custom profile data field name
field_valueint/string"123420""matching":"custom"

Custom profile data field value.

tip

Searching by combination of tags is available for tag type profile fields. Values are recorded as a string: "tag-1, tag-2".

resource_idint24NoResource ID for email and phone matching

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"rel_id": 3,
"profile_a": {
"profile_id": "5d63dbdb439e7306b596c5d0"
},
"profile_b": {
"profile_id": "5d441038439e7363f3c26539"
},
"weights": {
"user_like": 2,
"donate": 343,
"is_online": true
}
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<rel_id>3</rel_id>
<profile_a>
<profile_id>5d63dbdb439e7306b596c5d0</profile_id>
</profile_a>
<profile_b>
<profile_id>5d441038439e7363f3c26539</profile_id>
</profile_b>
<weights>
<user_like>2</user_like>
<donate>343</donate>
<is_online>true</is_online>
</weights>
</xml>

Response example​

  • JSON
  • XML
{
"error": 0,
"error_text": "",
"profile_a": "5c910f6bc484d023b1309bee",
"profile_b": "5c910938c484d023b1309bac",
"relation_id": 1
}
<xml>
<error>0</error>
<error_text></error_text>
<profile_a>5c910f6bc484d023b1309bee</profile_a>
<profile_b>5c910938c484d023b1309bac</profile_b>
<relation_id>1</relation_id>
</xml>

Response parameters​

ParameterTypeDescription
errorintError code
error_textstringError description
profile_astringDatabase A profile
profile_bstringDatabase B profile
relation_idintRelation ID
Last updated on Mar 16, 2024
Previous
Detach relation
Next
Overwrite relation properties
  • Description
  • URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.