CONTACT DATA VALIDATION

CONTACT DATA VALIDATION

Several API functions than modify CONTACT data may generate errors if the information provided is not valid.

API: Functions involved:

If any error occurs when invoking any of these API functions, their XML response may contain a section with structured information describing the errors.

The validation information has 3 sections

  • errors: Contains a list of fields that have some error an must be revised. For each field, the information provided is:

    • id: identifier of the problematic field. Is one of the CONTACT OBJECT field properties. For example CONTACT.NAME.GIVEN

    • name: description of the field translated to the active session language

    • error: Error code

    • description: description of the error translated to the active session language (introduced in API Version 2.7.14)

  • conflicts: This section indicates that the data provided for a CONTACT is confusing and may identify other CONTACTS. It is not possible to assign data to a CONTACT that belongs to other CONTACT (e.g. the email address or username). For each conflict the information provided is:

    • case_ref: Reference to the CASE that corresponds to the CONTACT

    • gender: gender of the other CONTACT that has the conflicting information

      • “M”: Male

      • “F”: Female

    • birthdate: birthdate of the other CONTACT that has the conflicting information

    • age: age of the other CONTACT that has the conflicting information

    • fields: a list of the conflicting fields

  • merge: When a new CONTACT is created, this section indicates that the data provided seems to correspond to an existing CONTACT and offers the possibility of merging data instead of creating a new CONTACT. For each possible existing CONTACT the information provided is:

    • current: (true/false) It true, the merge information corresponds to the same CONTACT that has been validated. Otherwise the merge information corresponds to another CONTACT with contact data that matches the CONTACT being validated

    • name: name of the existing CONTACT

    • gender: gender of the existing CONTACT

    • birthdate: birthdate of the existing CONTACT

    • age: age of the existing CONTACT

    • action: token that can be used to invoke https://linkcare.atlassian.net/wiki/spaces/WS/pages/524326 to merge the data with the existing CONTACT

    • fields: list of fields that seem to indicate that it is the same CONTACT

<validation> <errors> <field> <id>STUDY_REF</id> <name>Birthdate</name> <error>CONTACT_FIELD.CANT_BE_NULL</error> <description>can't be null</description> </field> </errors> <conflicts> <conflict> <name>Mary Doe</name> <gender>F</gender> <birthdate>1968-03-12</birthdate> <age>52</age> <fields> <field> <id>CHANNEL.EMAIL</id> <name>e-mail</name> <value>marydoe@linkcare.es</value> </field> </fields> </conflict> </conflicts> <merge> <person> <current>false</current> <name>JIM ROLDAN</name> <gender>M</gender> <birthdate>1959-04-09</birthdate> <age>61</age> <action>CONTACT_MERGE&amp;TYPE=USER&amp;FROM=17474,14913&amp;TO=11377"&gt;</action> <fields> <field> <id>CHANNEL.EMAIL</id> <name>e-mail</name> <value>jimroldan@me.com</value> </field> </fields> </person> </merge> </validation>

Related content