+49 69 83008980 service@xqueue.com
Benötigen Sie Hilfe?

Im Maileon Help-Center finden Sie umfassende Dokumentationen zu unserem System.

Beliebte Suchanfragen: Importe | Rest-API | Integrationen | SMS

Update Contact By External ID

Sie sind hier:

Updates an existing contact identified by their External ID.

PUT https://api.maileon.com/1.0/contacts/externalid/:external_id

Header

Name Description
Content-Type Specifies the payload’s format.
Possible values:
– application/vnd.maileon.api+xml
– application/vnd.maileon.api+json

Payload

Parameter Description
email The email address of the contact.
This endpoint doesn’t identify existing contacts by their email address. Therefore unwanted behaviour may occur when setting an email address using this ressource. You may want to use Update Contact by Email.
external_id The (new) External ID of the contact.
permission The contact’s permission.
Possible values:
1: No permission
2: Single Opt-In
3: Confirmed Opt-In
4: Double-Opt-In
5: Double-Opt-In with single user tracking
6: Other
standard_fields Key-value paired list of standard fields. A complete list can be found under Standard Contact Fields.
custom_fields Key-value paired list of custom fields. The fields must already exist, the names are case sensitive and the values have to correspond to the field’s data type.
preferences List of preferences to be set for the contact.

Example

PUT https://api.maileon.com/1.0/contacts/externalid/foo-1234
Authorization: Basic XXXXXXXXXXXXXXX
Content-Type: application/vnd.maileon.api+xml; charset=utf-8

<contact>
  <standard_fields>
    <field>
      <name>LASTNAME</name>
      <value>Mustermann</value>
    </field>
    <field>
      <name>FIRSTNAME</name>
      <value>Max</value>
    </field>
  </standard_fields>
  <custom_fields>
    <field>
      <name>COLOR</name>
      <value>BLUE</value>
    </field>
  </custom_fields>
</contact>

201 Created
PUT https://api.maileon.com/1.0/contacts/externalid/foo-1234
Authorization: Basic XXXXXXXXXXXXXXX
Content-Type: application/vnd.maileon.api+json; charset=utf-8

{
  "standard_fields": {
    "LASTNAME": "Mustermann",
    "FIRSTNAME": "Max"
  },
  "custom_fields": {
    "COLOR": "BLUE"
  }
}

201 Created

Preferences

Preferences are not yet supported in the JSON payload. In XML it is structured as follows:

<contact>
  ...
  <preferences>
    <preference>
      <name>MY_PREFERENCE_A</name>
      <category>MY_CATEGORY</category>
      <value>true</value>
      <source nil="true"/>
    </preference>
    <preference>
      <name>MY_PREFERENCE_B</name>
      <category>MY_CATEGORY</category>
      <value>true</value>
      <source nil="true"/>
    </preference>
  </preferences>
</contact>

Responses

Status code Description
201 The contact has been updated successfully
404 No contact with the given External ID was found.
409 If the contact’s new External ID is not unique.

 

Inhaltsverzeichnis