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.
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 name | Value |
---|---|
type | Optional, type of fields to retrieve |
idsite | Mandatory, MindBaz site identifier |
Where type corresponds to:
Name | Value | Description |
---|---|---|
Unspecified | 0 | Field type is not specified |
Text | 1 | The field is of type text |
Integer | 2 | Field type is integer |
Date | 3 | The field is of type date |
List | 4 | The field is of type list |
Boolean | 5 | The 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 Name | Value | Type |
---|---|---|
idFields | Required, Identifiers of the fields to retrieve | Collection of integer |
idsite | Required, MindBaz site identifier | Integer |
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 Name | Value | Type |
---|---|---|
idsite | Mandatory, MindBaz site identifier | Integer |
Query body in JSON format:
Name | Description | Type | Additional information |
---|---|---|---|
name | Name of the field | String | Mandatory |
Description | Field Description | String | None |
fieldType | Field Type (0:"Unspecified", 1:"Text", 2:"Integer", 3:"Date", 4:"List", 5:"Boolean") | EFieldType | Mandatory |
isEditable | Value indicating if the field is editable | Boolean | True by default |
isHiddenByCustomer | Value indicating if the field has been hidden by the customer in the "field management" page of Mindbaz | Boolean | False by default |
length | Length of the field (number of characters for a text field, between 1 and 6000) | Integer | Mandatory if fieldType is Text |
list | Allowed values if the field is a list of choices | Collection of FieldListTypeValue | Mandatory 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
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 Name | Value | Type |
---|---|---|
idsite | Mandatory, MindBaz site identifier | Integer |
Query body in JSON format:
Name | Description | Type | Additional information |
---|---|---|---|
id | Field Identifier, must be >= 100 | Integer | None |
name | Name of the field | String | Mandatory, 255 characters max |
Description | Field Description | String | None |
fieldType | Field Type (0:"Unspecified", 1:"Text", 2:"Integer", 3:"Date", 4:"List", 5:"Boolean") | Mandatory | |
isHiddenByCustomer | Value indicating if the field has been hidden by the customer in the "field management" page of Mindbaz | Boolean | None |
length | Length of the field (number of characters for a text field, between 1 and 6000) | Integer | Mandatory if fieldType=Text |
list | Allowed values if the field is a list of choices | Collection of FieldListTypeValue | Mandatory if fieldType=List |
List of system fields (not modifiable)
id_fld | name | nb carac | list of values | type | description |
---|---|---|---|---|---|
0 | IdUser | Integer | unique subscriber identifier | ||
1 | Email address | 255 | Text | subscriber's email: NO DUPLICATES POSSIBLE! | |
2 | Date of first registration | Date | date of the 1st subscription to the newsletter: not re-subscribable | ||
3 | Last registration date | Date | date of the last subscription to the newsletter | ||
4 | Unregistered date | Date | date of unsubscription to the newsletter | ||
5 | First origin | 50 | Text | name of the 1st provenance (associated with the 1st registration): not re-registerable to never lose the 1st provenance | |
6 | Last source | 50 | Text | name of the last source (associated with the last registration) | |
7 | Subscriber's status | 0: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 unsubscription | List | Prohibition to send on different status of subscriber | |
8 | Optin Partner | 0:no;1:yes | List | Partner opt-in registration | |
9 | Unsubscribe Optin | Date | date of unsubscription optin partner | ||
10 | Inscription Optin | Date | registration date optin partner | ||
11 | Children | Integer | number of children | ||
12 | Date of Birth Last Child | Date | |||
13 | Civility | 0:Mr;1:Ms;2:Miss | List | The text of the values can be modified on request | |
14 | Lastname | 128 | Text | ||
15 | Firstname | 128 | Text | ||
16 | Address | 128 | Text | ||
17 | City | 128 | Text | ||
18 | Zip Code | 20 | Text | ||
19 | Country | 50 | Text | ||
20 | Date of birth | Date | |||
21 | Collection mode 1st prov | 0:Purchase; 1:Exchange; 2:Natural; 3:Other | List | The 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). | |
22 | Collection type 1st prov | 0:Site; 1:Game; 2:Coregistration; 3:Viral; 4:Form External; 5:Other | List | The 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). | |
23 | Address RNVP 1 | 38 | Text | 1st field of an address RNVP (Restructuring, Standardization, Postal Validation): Line Additional identification, identity or place (Apartment, Floor ...) | |
24 | Adress RNVP 2 | 38 | Text | Line Additional identification of the geographical point (Residence, Building...) | |
25 | Adresse RNVP 3 | 38 | Text | Line Number and name of the way (distribution section) (ex 10 rue de la Martingale) | |
26 | Adresse RNVP 4 | 38 | Text | Line BP, TSA, Location.. | |
27 | CP RNVP | 5 | Text | Line Zip code | |
28 | City RNVP | 38 | Text | Line City | |
29 | Date Validation RNVP | Date | Date on which the RNVP fields (23 to 28) were filled in | ||
30 | Date Updated Address | Date | Update 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 | ||
31 | Nhd_Reactivity | Integer | Reactivity in the month | ||
32 | Tracking Addresse IP | 15 | Text | Last IP address tracked when opened | |
33 | Browser Tracking | 50 | Text | Name of the web browser detected during an opening | |
34 | Tracking Sys Operating Fixed | 50 | Text | Last operating system detected when opening on fixed pc | |
35 | Tracking Sys Exploitation Mobile | 50 | Text | Last operating system detected when opening on mobile | |
36 | Tracking Mobile Model | 50 | Text | Last mobile model tracked when opened | |
37 | Webmail | 50 | Text | Domain name (ex: free.fr, yahoo.com, hotmail.com) extracted from the email (maj overnight) | |
38 | Tel Fixe | 25 | Text | ||
39 | Tel Mobile | 25 | Text | Mobile Phone | |
40 | Facebook ID | 30 | Text | ID facebook | |
41 | Referential INSEE | 1: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 neighborhood | List | INSEE code | |
42 | Referential CSP | 0:CSP --; 1:CSP -; 2:CSP average; 3: CSP +; 4:CSP ++ | List | CSP Code | |
43 | client id | 50 | Text | ||
44 | Last open date | Date | Last open date (useful to make scenarios on inactives) | ||
46 | Last Click Date | Date | Last Click, excluding mirror link and unsubscribe |