Route
Paramètres
Body
Valeur
Type
Obligatoire
Valeur par défaut
Description
civility
integer
Non
Civilité (contacts_civilities.id )
firstname
string
Non
Prénom
lastname
string
Oui (Si company est vide)
Nom
company
string
Oui (Si lastname est vide)
Nom de la société
department
string
Non
Service de la société
function
string
Non
Fonction du contact
addressNumber
string
Non
Numéro
addressStreet
string
Non
Voie
addressAdditional1
string
Non
Point de remise
addressPostcode
string
Non
Code postal
addressAdditional2
string
Non
Complément d'acheminement
addressTown
string
Non
Ville
addressCountry
string
Non
Pays
email
string
Non
Email
phone
string
Non
Téléphone
communicationMeans
string
Non
Moyen de communication M2M (uri ou email)
notes
string
Non
Notes
externalId
array
Non
Identifiants externe
customFields
array
Non
Champs personalisés
Exemple
{
"civility" : 1 ,
"firstname" : "Clark" ,
"lastname" : "Kent" ,
"company" : "Daily Planet" ,
"function" : "Reporter" ,
"addressNumber" : "30" ,
"addressStreet" : "Rue des avions" ,
"addressPostcode" : "75001" ,
"addressTown" : "Paris" ,
"addressCountry" : "France" ,
"email" : "clark.kent@daily-planet.com" ,
"phone" : "+33120212223" ,
"communicationMeans" : "http://1.1.1.1/maarch_courrier/" ,
"notes" : "Awesome" ,
"externalId" : { "companyId" : "123456789" },
"customFields" : { "2" : "ma valeur custom" }
}
Si un contact existe déjà avec le même email, id correspondra au contact existant, et votre contact ne sera pas créé.
Retour
Code Http
Type
Description
Exemple
200
array
Le contact a bien été créé
['id' => 21]
400
array
Un paramètre obligatoire est manquant
['errors' => 'Bad Request']
403
array
Droits insuffisants pour cette action
['errors' => 'Service forbidden']
500
array
Une erreur s'est produite
['errors' => '[ContactController create] Contact creation has failed']
Route
Le paramètre id de la route représente l'identifiant (int) du contact à modifier.
Paramètres
Body
Valeur
Type
Obligatoire
valeur par défaut
Description
civility
integer
Non
Civilité (contacts_civilities.id )
firstname
string
Non
Prénom
lastname
string
Oui (Si company est vide)
Nom
company
string
Oui (Si lastname est vide)
Nom de la société
department
string
Non
Service de la société
function
string
Non
Fonction du contact
addressNumber
string
Non
Numéro
addressStreet
string
Non
Voie
addressAdditional1
string
Non
Point de remise
addressPostcode
string
Non
Code postal
addressAdditional2
string
Non
Complément d'acheminement
addressTown
string
Non
Ville
addressCountry
string
Non
Pays
email
string
Non
Email
phone
string
Non
Téléphone
communicationMeans
string
Non
Moyen de communication M2M (uri ou email)
notes
string
Non
Notes
externalId
array
Non
Identifiants externes
customFields
array
Non
Champs personalisés
Exemple
{
"civility" : 4 ,
"firstname" : "Kal" ,
"lastname" : "EL" ,
"company" : "The Torch" ,
"function" : "Reporter" ,
"addressNumber" : "50" ,
"addressStreet" : "Rue des avions" ,
"addressPostcode" : "75001" ,
"addressTown" : "Paris" ,
"addressCountry" : "France" ,
"email" : "clark.kent@daily-planet.com" ,
"phone" : "+33120212223" ,
"communicationMeans" : "http://1.1.1.1/maarch_courrier/" ,
"notes" : "Awesome" ,
"externalId" : { "companyId" : "123456789" },
"customFields" : { "2" : "ma valeur custom" }
}
Retour
Code Http
Type
Description
Exemple
204
array
Le contact a bien été modifié
400
array
Un paramètre obligatoire est manquant
['errors' => 'Bad Request']
403
array
Droits insuffisants pour cette action
['errors' => 'Service forbidden']
500
array
Une erreur s'est produite
['errors' => '...']
Route
GET /rest/contactsParameters
Retour
Code Http
Type
Description
200
array
Informations liées aux paramètres des contacts
Données
Valeur
Type
Description
id
int
Identifiant technique
enable
bool
Indique si la fonctionnalité est activée
first_threshold
int
Premier palier (%)
second_threshold
int
Second palier (%)
La couleur rouge correspond de 0 à {first_threshold} %
La couleur orange correspond de {first_threshold} à {second_threshold} %
La couleur verte correspond de {second_threshold} à 100 %
Valeur
Type
Description
id
int
Identifiant technique
identifier
string
Identifiant du champ dans le formulaire de contact
mandatory
array
Indique si le champ est obligatoire pour la création d'un contact
filling
int
Indique si le champ est comptabilisé dans la complétude
searchable
int
Indique si l'autocompletion recherche sur ce champ
displayable
int
Indique si ce champ est affiché dans l'autocomplétion
label
int
Libellé du champ (dans le cas d'un champ personnalisable)
Exemple
{
"contactsFilling" : {
"id" : 1 ,
"enable" : true ,
"first_threshold" : 33 ,
"second_threshold" : 66
},
"contactsParameters" : [
{
"id" : 7 ,
"identifier" : "civility" ,
"mandatory" : false ,
"filling" : false ,
"searchable" : false ,
"displayable" : true ,
"label" : null
},
{
"id" : 8 ,
"identifier" : "firstname" ,
"mandatory" : false ,
"filling" : true ,
"searchable" : true ,
"displayable" : true ,
"label" : null
},
{
"id" : 9 ,
"identifier" : "lastname" ,
"mandatory" : true ,
"filling" : true ,
"searchable" : true ,
"displayable" : true ,
"label" : null
}
]
}
Route
PUT /rest/contactsParameters
Paramètres
Body
Le corps de la requête correspond à ce que retourne la route GET /rest/contactsParameters .
Retour
Code Http
Type
Description
Exemple
200
array
Les paramètres ont bien été modifiés
['success' => 'success']
400
array
Un paramètre obligatoire est manquant
['errors' => 'Bad Request']
403
array
Droits insuffisants pour cette action
['errors' => 'Service forbidden']
500
array
Une erreur s'est produite
['errors' => '...']