Set attributes on a profile (version 2)

Set attributes on a profile

Updates profile attribute values using their discriminators as keys. Permits changes to default and custom attributes.

When any e-commerce integration is connected to the specified section then also e-commerce attributes can be modified.

In its requests and responses, APSIS One API accepts and returns version IDs and dates as strings. On the other hand, attribute value data types follow attribute types as described in this Help Center article.

Content must follow JSON Merge Patch specs. The maximum data payload size for requests to this endpoint is 100KB.

Profiles and attributes

Profiles are created on account level whereas attributes and tags are defined on sections. They are then set on profiles on section level as well.

Even though default attributes like First Name or Email have the same names across sections, setting their value on a profile in one section will not affect their values in other sections. Custom attributes and tags created in one section can only set on profiles on that section level.

Version 2

This version selects attributes by discriminators and introduces support for changing values for attributes that are also profile keys

Unlike version 1, this version will NOT create a new profile when a profile specified by the keyspace and the profile key does not exist in the section provided

Updating profile keys

Your profile may have a profile key in one of the following keyspaces. Keyspaces have corresponding attribute types. The values of the profile keys and the attributes should ideally match.

  • Email: keyspace com.apsis1.keyspaces.email and attribute com.apsis1.attributes.email
  • SMS: keyspace com.apsis1.keyspaces.mobile and attribute com.apsis1.attributes.mobile
  • CRM-ID: keyspace com.apsis1.keyspaces.crm-id and attribute com.apsis1.attributes.crmid

There are two scenarios when you're trying to modify an attribute that is also a profile key:

The new value is NOT a current profile key on any other profile

In this case the profile key is simply updated to the new value on the profile.

The new value IS the current profile key of another profile

When we detect another profile with a profile key that is the same as the new profile key value then we expect profile_key_update_method parameter to be provided so that this endpoint can decide what to do with that existing profile:

  • If profile_key_update_method is set to delete, a new profile is created with the new profile key from the request. All the attributes and active consents are moved to the new profile. If the old profile key is not used in any other section, it is deleted.

  • If profile_key_update_method is set to merge, a new profile is created with the new profile key from the request. The new profile is then merged with the old profile. All active consents are migrated to the new profile key.

Consent addresses

The APSIS One platform enables your profiles to provide consent to receive communication from you. Consent is created using a selected communication channel: email, SMS or both. Each of these channels has a corresponding profile attribute: email and mobile, respectively. So when a profile consents to receive information from you over the email channel, the platform will use their primary email address attribute when sending emails.

As long as your account uses Consent 1.0, a consent is bound to the address. This changes in Consent 2.0, where consent is created on the profile level. More on that in this article.

If you need to change an email address or phone number for your profile, we recommend using this endpoint rather than its previous version. This new version automatically moves consent from the original address to the new one while your account uses Consent 1.0 and will work correctly when your account gets migrated to Consent 2.0.

The best time to adopt this endpoint is when switching to Consent 2.0 endpoints in APSIS One API following this guide.

Deleting attributes

This endpoint supports removing attribute values from a profile. To do this, provide null as attribute value in the request body.

Deleting values for the attributes that are also profile keys is not allowed.

Error scenarios

The following error scenarios are specific to this feature:

  • 404 Not Found

    Keyspaces, section or profile was not found

  • 409 Conflict

    An attempt to update an attribute that is a profile key was made but profile_key_update_method parameter was not specified

  • 410 Gone

    Updating attributes is not allowed on a locked profile

Language
Authentication
Bearer
JWT
URL