Skip to main content

Fields management

Fields management for the subscriber table.

It is possible to customize the fields of your database in order to integrate your own data.

We provide you with 2 types of fields:

  • System fields: these are the fields created by default in the database. They can neither be modified nor deleted.
  • Custom fields: a quota of 50 custom fields is allocated to you. You can use these fields to further qualify the database or use them as topage fields.
Info

To increase the number of custom fields, simply contact Customer Service or click on "Increase quota" on the site.

You can find more information in our help center by clicking here.


See your quota

The api allows you to retrieve the number of custom fields created by making a GET call to the following endpoint: /api/{idsite}/fields/quota

Example :

https://api.mindbaz.com/api/3/fields/quota
{
"success": true,
"data": {
"quota": 190,
"nbSpecificFields": 184,
"nbRemainingFields": 6
},
"error": null,
"typeName": "FieldsQuota"
}

Retrieving the list of fields for the subscriber table

It is possible to retrieve via the GET call /api/{idsite}/fields/list?type={type} the list of fields of the table containing the subscribers. You will get in return of this api the definition of all the fields (name, type, description) of the table.

The parameters to specify in the url are the following:

Parameter nameValue
typeOptional, type of fields to retrieve
idsiteMandatory, MindBaz site identifier

Where type corresponds to:

NameValueDescription
Unspecified0Field type is not specified
Text1The field is of type text
Integer2Field type is integer
Date3The field is of type date
List4The field is of type list
Boolean5The field is of type Boolean

Response sample:

{
"success": true,
"data": [
{
"id": 1,
"name": "sample string 2",
"length": 1,
"list": [
{
"key": 64,
"value": "sample string 2"
},
{
"key": 64,
"value": "sample string 2"
}
],
"fieldType": 0,
"description": "sample string 3",
"isSystem": true,
"isVisible": true,
"isEditable": true,
"isHiddenByCustomer": true
},
{
"id": 1,
"name": "sample string 2",
"length": 1,
"list": [
{
"key": 64,
"value": "sample string 2"
},
{
"key": 64,
"value": "sample string 2"
}
],
"fieldType": 0,
"description": "sample string 3",
"isSystem": true,
"isVisible": true,
"isEditable": true,
"isHiddenByCustomer": true
}
],
"error": "sample string 2",
"typeName": "sample string 3"
}

The fields of the returned Field object:

  • id : id of the field (used in personalization tags e.g. [[FIELD.1]])
  • name : name of the field
  • length : number of characters for a "text" type
  • list : array of elements {key(int),value(string)} for a "list" type
  • fieldType: value (int) of the "type" input parameter.
  • isSystem : if the field is a "system" field, i.e. created by Mindbaz and identical for all clients (id<100)
  • isVisible : if false, the field is not visible in the interface and is not used (used when you want to delete a field) -field reserved for Mindbaz
  • isEditable : if false, the field cannot be mapped in a file import
  • isHiddenByCustomer : if false, the field will be hidden in the interface but still usable. Useful to lighten the interface of fields you don't use anymore or that don't need to be displayed.

Retrieving fields from the subscriber table

The call GET api/{idsite}/Fields?idFields[0]={idFields[0]}&idFields[1]={idFields[1]} allows the retrieval of subscriber field definitions by specifying as input the list of desired field ids. It is possible to specify several identifiers in the parameters in the form ?idFields[0]={idFields[0]}&idFields[1]={idFields[1]:

Parameter NameValueType
idFieldsRequired, Identifiers of the fields to retrieveCollection of integer
idsiteRequired, MindBaz site identifierInteger

Example:

{
"success": true,
"data": [
{
"id": 1,
"name": "sample string 2",
"length": 1,
"list": [
{
"key": 64,
"value": "sample string 2"
},
{
"key": 64,
"value": "sample string 2"
}
],
"fieldType": 0,
"description": "sample string 3",
"isSystem": true,
"isVisible": true,
"isEditable": true,
"isHiddenByCustomer": true
},
{
"id": 1,
"name": "sample string 2",
"length": 1,
"list": [
{
"key": 64,
"value": "sample string 2"
},
{
"key": 64,
"value": "sample string 2"
}
],
"fieldType": 0,
"description": "sample string 3",
"isSystem": true,
"isVisible": true,
"isEditable": true,
"isHiddenByCustomer": true
}
],
"error": "sample string 2",
"typeName": "sample string 3"
}

Create a field in the subscribers table

It is possible to create new fields in the subscribers table to store your new values. However, once created, the fields cannot be deleted and the total number of fields is limited.

Query POST api/{idsite}/Fields

Parameter NameValueType
idsiteMandatory, MindBaz site identifierInteger

Query body in JSON format:

NameDescriptionTypeAdditional information
nameName of the fieldStringMandatory
DescriptionField DescriptionStringNone
fieldTypeField Type (0:"Unspecified", 1:"Text", 2:"Integer", 3:"Date", 4:"List", 5:"Boolean")EFieldTypeMandatory
isEditableValue indicating if the field is editableBooleanTrue by default
isHiddenByCustomerValue indicating if the field has been hidden by the customer in the "field management" page of MindbazBooleanFalse by default
lengthLength of the field (number of characters for a text field, between 1 and 6000)IntegerMandatory if fieldType is Text
listAllowed values if the field is a list of choicesCollection of FieldListTypeValueMandatory if fieldType is List

Example value for the list field {0:no,1:yes} :

[
{
"key": 0,
"value": "No"
},
{
"key": 1,
"value": "Yes"
}
]

Example of a POST request:

{
"id": 1,
"name": "sample string 2",
"length": 1,
"list": [
{
"key": 64,
"value": "sample string 2"
},
{
"key": 64,
"value": "sample string 2"
}
],
"fieldType": 0,
"description": "sample string 3",
"isSystem": true,
"isVisible": true,
"isEditable": true,
"isHiddenByCustomer": true
}

Response sample:

{
"success": true,
"data": {
"id": 1,
"name": "sample string 2",
"length": 1,
"list": [
{
"key": 64,
"value": "sample string 2"
},
{
"key": 64,
"value": "sample string 2"
}
],
"fieldType": 0,
"description": "sample string 3",
"isSystem": true,
"isVisible": true,
"isEditable": true,
"isHiddenByCustomer": true
},
"error": "sample string 2",
"typeName": "sample string 3"
}

Modification of a field in the subscribers' table

Caution!

In case of modification of the field type, all values for this field will be purged.

You must pass the entire Field object.

Request PUT api/{idsite}/Fields

Parameter NameValueType
idsiteMandatory, MindBaz site identifierInteger

Query body in JSON format:

NameDescriptionTypeAdditional information
idField Identifier, must be >= 100IntegerNone
nameName of the fieldStringMandatory, 255 characters max
DescriptionField DescriptionStringNone
fieldTypeField Type (0:"Unspecified", 1:"Text", 2:"Integer", 3:"Date", 4:"List", 5:"Boolean")Mandatory
isHiddenByCustomerValue indicating if the field has been hidden by the customer in the "field management" page of MindbazBooleanNone
lengthLength of the field (number of characters for a text field, between 1 and 6000)IntegerMandatory if fieldType=Text
listAllowed values if the field is a list of choicesCollection of FieldListTypeValueMandatory if fieldType=List

List of system fields (not modifiable)

id_fldnamenb caraclist of valuestypedescription
0IdUserIntegerunique subscriber identifier
1Email address255Textsubscriber's email: NO DUPLICATES POSSIBLE!
2Date of first registrationDatedate of the 1st subscription to the newsletter: not re-subscribable
3Last registration dateDatedate of the last subscription to the newsletter
4Unregistered dateDatedate of unsubscription to the newsletter
5First origin50Textname of the 1st provenance (associated with the 1st registration): not re-registerable to never lose the 1st provenance
6Last source50Textname of the last source (associated with the last registration)
7Subscriber's status0:Subscribed; 1:Unsubscribed; 2:Manual unsubscription; 3:Sanitization / Invalid domain;4:Sanitization / Invalid syntax; 5:Sanitization / Pushing list;6:Sanitization / Duplicate; 7:Sanitization NPAI; 8:Waiting for subscription confirmation; 9:Spam; 10:Waiting for validation; 11:ISP test; 12:Group unsubscriptionListProhibition to send on different status of subscriber
8Optin Partner0:no;1:yesListPartner opt-in registration
9Unsubscribe OptinDatedate of unsubscription optin partner
10Inscription OptinDateregistration date optin partner
11ChildrenIntegernumber of children
12Date of Birth Last ChildDate
13Civility0:Mr;1:Ms;2:MissListThe text of the values can be modified on request
14Lastname128Text
15Firstname128Text
16Address128Text
17City128Text
18Zip Code20Text
19Country50Text
20Date of birthDate
21Collection mode 1st prov0:Purchase; 1:Exchange; 2:Natural; 3:OtherListThe collection mode of the 1st prov is standardized to make statistics between several databases. It is therefore easy to know if the address was purchased (0), exchanged (1) or naturally recruited (2).
22Collection type 1st prov0:Site; 1:Game; 2:Coregistration; 3:Viral; 4:Form External; 5:OtherListThe collection type of the 1st prov is normalized to make statistics between several databases. It is therefore easy to know if the address comes from a site (0), a game (1), coregistration (2), a viral mail (3) or an external form (4).
23Address RNVP 138Text1st field of an address RNVP (Restructuring, Standardization, Postal Validation): Line Additional identification, identity or place (Apartment, Floor ...)
24Adress RNVP 238TextLine Additional identification of the geographical point (Residence, Building...)
25Adresse RNVP 338TextLine Number and name of the way (distribution section) (ex 10 rue de la Martingale)
26Adresse RNVP 438TextLine BP, TSA, Location..
27CP RNVP5TextLine Zip code
28City RNVP38TextLine City
29Date Validation RNVPDateDate on which the RNVP fields (23 to 28) were filled in
30Date Updated AddressDateUpdate date of the classic address (fields 16, 17 and 18). If the Shift date > RNVP validation date, it means that the RNVP address is outdated
31Nhd_ReactivityIntegerReactivity in the month
32Tracking Addresse IP15TextLast IP address tracked when opened
33Browser Tracking50TextName of the web browser detected during an opening
34Tracking Sys Operating Fixed50TextLast operating system detected when opening on fixed pc
35Tracking Sys Exploitation Mobile50TextLast operating system detected when opening on mobile
36Tracking Mobile Model50TextLast mobile model tracked when opened
37Webmail50TextDomain name (ex: free.fr, yahoo.com, hotmail.com) extracted from the email (maj overnight)
38Tel Fixe25Text
39Tel Mobile25TextMobile Phone
40Facebook ID30TextID facebook
41Referential INSEE1:Heterogeneous central neighborhood; 2:Dynamic downtown; 3:Affluent homeowner neighborhood; 4:Very popular family neighborhood; 5:Very average family suburb; 6:Very affluent residential suburb; 7:Affluent suburban neighborhood; 8:Chic suburban neighborhood; 9:Dynamic suburban neighborhood; 10:Aging residential suburban neighborhood; 11:Very affluent suburban neighborhood; 12:Working-class residential suburban neighborhood; 13: Average suburban neighborhood; 14:Senior residential suburban neighborhood; 15:Active residential suburban neighborhood; 16:Average rural neighborhood; 17:Working and family rural neighborhood; 18:Retired rural neighborhood; 19:Retired tourist village; 20:Average family village; 21:Average working village; 22:Aging agricultural village; 23:Upscale Parisian neighborhood; 24:Dynamic and active Parisian neighborhood; 25:Popular Parisian neighborhoodListINSEE code
42Referential CSP0:CSP --; 1:CSP -; 2:CSP average; 3: CSP +; 4:CSP ++ListCSP Code
43client id50Text
44Last open dateDateLast open date (useful to make scenarios on inactives)
46Last Click DateDateLast Click, excluding mirror link and unsubscribe