Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Note
titleDEPRECATED METHOD

The response of GetFields method is different from many other MailUpSend methods because it includes "errorCode" only when call is not successful. If this inconsistency is critical for your client application you can use GetFields_st method instead. GetFields_st is the recommended choice if you are starting a new integration with MailUp.

 

Method parameters

GetFields allows to retrieve the user personal data fields which have been configured in the MailUp system. This feature is useful when using applications that, in order to integrate, necessarily need to map their data structure based on MailUp personal data fields. Mapping is a one-time, preliminary operation for configuring data import to MailUp.

  • string GetFields(stringaccessKey)

      ...

      • In caso di interrogazione positiva L'XML restituito presenta la seguente struttura:

      ...

        • Un nodo radice <GetFields>.
        • Un nodo <Fields>, contenuto nel nodo radice.
        • Una serie di nodi <Field> uno per ogni Campo dati Utente configurato, contenuti nel nodo <Fields>. I nodi <Field> presenteranno gli attributi Name e Id. Il primo conterrà il nome del Campo dati Utente, il secondo l'indice.

      ...

        • Un nodo radice <GetFields>.
        • Un nodo <Error>, contenuto nel nodo radice, che riporta il messaggio di errore.

      ...

        • accessKey: access key obtained using the LoginFromId method

      The method returns a string in XML format containing the names and IDs of the personal data fields.

       

       

      Sample GetFields response

      Code Block
      languagehtml/xml
      linenumberstrue
      <GetFields>
      
             <Fields>
      
                    <Field Name="nome" Id ="X"/>
      
                           ....
      
             </Fields>
      
      </ GetFields >


      The XML string will have the following features:

      • A root node <GetFields>.
      • A node <Fields>, contained in the root node.
      • A series of nodes <Field> for each configured personal data field, contained in the node <Fields>. Nodes <Field> have the attributes Name and Id. The first contains the name of the personal data field, the second contains the identifier.

      In case no personal data field has been configured, the node <Fields> will be empty (without nodes <Field>) in the XML string


      In case of errors during the request, the XML string will have the following structure:

      Code Block
      languagehtml/xml
      linenumberstrue
      <GetFields>
      
      <Error>"Messaggio di errore"</Error>
      
      </GetFields>


      The XML string will have the following features:

      • A root node <GetFields>.
      • A node <Error>, contained in the root node, returning the error message.

       

      Info
      MailUp personal data fields are always defined in string format. As a consequence, GetFields method does not return the type of personal data fields

      More sample GetFields response for the above described scenarios:

       

      • Values returned: MailUp personal data fields and the corresponding IDs are listed. IDs are requested when importing to MailUp
      Code Block
      languagehtml/xml
      linenumberstrue
      <GetFields>
      
             <Fields>
      
                    <Field Name="email" Id ="111"/>
      
                    <Field Name="cognome" Id ="2"/>
      
                    <Field Name="nome" Id ="3"/>
      
                    <Field Name="Data di nascita" Id ="4"/>
      
                    <Field Name="Nazionalita" Id ="5"/>
      
                    <Field Name="Sesso" Id ="6"/>
      
                    <Field Name="Telefono" Id ="7"/>
      
             </Fields>
      
      </GetFields>
      • Personal data fields have not been configured
      Code Block
      languagehtml/xml
      linenumberstrue
      <GetFields>
      
             <Fields>
      
             </Fields>
      
      </GetFields>
      • Error message
      Code Block
      languagehtml/xml
      linenumberstrue
      <GetFields>
      
             <Error>
      
                    "Messaggio di errore"
      
             </Error>
      
      </GetFields>