Fields

The field resource is the structure that allows you to manage the contact attributes (last name, first name, mobile telephone number...).

This resource is used in the two following contexts:

  • It is possible to assign an alias to each contact attribute. These aliases are included when importing a contact file. This allows you to import contact files coming from a CRM export for which the column header would be different from those provided by default by this API.

  • This resource also contains statistics concerning the contact attributes:

    • The length that this contact attribute can have. This is useful when creating an SMS campaign with customized fields (as the length of the message is important)

    • The number of contacts for which this attribute is defined. Indeed, it is not necessary to use a customized field in a campaign if the latter is defined for only 10% of the contacts.

List of properties of the field resource

Property

Description

name

Name of the contact attribute

max

Maximum length that this contact attribute can have

count

Number of contacts for which this attribute is defined

alias

Alias of the contact attribute

 

Example of the resource in JSON format

{
   "name": "field01",
   "max": "11",
   "count": "1234556",
   "alias": "numéro de plaque",
}
 

Retrieving the alias of each contact attribute

List of available filters

Filter

Description

name

Filter according to one or more contact attribute names

alias

Filter according to one or more contact attribute aliases

 

Small note on default aliases

When a new user connects to the contact management API, the aliases of the columns

that are applied are as follows:

name

alias

civility

Civility

firstName

First name

lastName

Last name

email

Email

phone

Fixed Telephone

mobile

Mobile

fax

Fax

address1

Address 1

address2

Address 2

zipcode

Postal code

city

City

state

State

country

Country

birthDate

Date of birth

reference

Reference

company

Company

field01

Field 1

...

....

field15

Field 15

 

All of these aliases can be customized by contact Digitaleo support.

Return order

The fields are returned in the following order:

civility, firstName, lastName, email, phone, mobile, fax, address1, address2, zipcode, city, state, country, birthDate, company, reference, field01... field15.

Example

Retrieving all the attribute aliases:

curl

-X GET

-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...ccOqbVow8xOQyQ"

https://contacts.messengeo.net/rest/fields

 

Retrieving the statistics on a contact attribute (action=statistics)

The statistics action allows you to retrieve for each contact attribute

  • The maximum length that this contact attribute can have

  • The number of contacts for which this attribute is defined.

List of available filters

Filter

 

 

 

 

 

Example 1

Retrieving the maximum length that the "field01" attribute can have for the contact list 123

<table class="api-table>

 

Description

name

Filter according to one or more contact attribute names

listId

Filter according to contact list id

curl

-X GET

-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...ccOqbVow8xOQyQ"

-d listId=123

-d name=field01

-d properties=name,max

https://contacts.messengeo.net/rest/fields?action=statistics

 

Example 2

Retrieving the number of contacts for which each contract attribute of the list 123 is defined

curl

-X GET

-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbG...ccOqbVow8xOQyQ"

-d listId=123

-d properties=name,count

https://contacts.messengeo.net/rest/fields?action=statistics