Routines / Scoring
Permet de consulter et gérer les données de scoring et de taggage des sociétés sur les routines.
Récupérer les données de scoring
GET/v1/supply/identificationRetourne les données de scoring et d'identification des sociétés sur une routine.
Headers
| Nom | Type | Requis | Description |
|---|---|---|---|
| x-access-token | String | oui | Clé API |
Paramètres query
| Nom | Type | Requis | Description |
|---|---|---|---|
| idSupply | int|int[] | conditionnel | Identifiant(s) de la routine |
| idCompany | int|int[] | conditionnel | Identifiant(s) de société |
| siren | String|String[] | conditionnel | Numéro(s) SIREN |
| minScoringMatch | int | non | Score minimum |
| idIdentificationType | int|int[] | non | Filtrer par type d'identification |
| pollingScoring | int | conditionnel | Scorings modifiés dans les X dernières minutes (min. 15) |
| pollingTag | int | conditionnel | Tags de routine modifiés dans les X dernières minutes (min. 15) |
TIP
Au moins un paramètre parmi idSupply, idCompany, siren, pollingScoring ou pollingTag est obligatoire.
Réponses
200 — OK
{
"success": true,
"parameters": {
"idAccount": "string|null",
"idSupply": "int[]|null",
"minScoringMatch": "int|null",
"idCompany": "int[]|null",
"idIdentificationType": "int[]|null",
"siren": "string[]|null",
"pollingScoring": "int|null",
"pollingTag": "int|null"
},
"supplyIdentificationList": [
{
"idSupply": "int",
"idCompany": "int",
"idIdentificationType": "int|null",
"date": "datetime",
"isManual": "bool",
"isFormerCustomer": "bool|null",
"identificationType": {
"idIdentificationType": "int",
"title": "string"
},
"scoring": "object|null",
"prepared": "bool|null",
"preparedDate": "datetime|null",
"prepareConsumed": "bool|null",
"prepareConsumedDate": "datetime|null",
"preparedCompleted": "bool|null",
"preparedCompletedDate": "datetime|null"
}
]
}Notes :
- La liste est renvoyée sous la clé
supplyIdentificationList, à la racine de la réponse (pas d'objetresult, pas de champcode/messageen succès). identificationTypeest l'objet du type d'identification (nullsi non taggé) ;scoringest l'objet de scoring de la société sur la routine (nulls'il n'existe pas).
400 — Bad Request
{
"success": false,
"parameters": {},
"message": "idSupply, idCompany, siren, pollingScoring ou pollingTag nécessaire"
}403 — Forbidden
{
"success": false,
"code": 403,
"message": "L'abonnement n'a pas accès à ces données",
"parameters": {}
}Créer ou modifier un tag de société sur une routine
POST/v1/supply/identificationCrée ou modifie le tag d'une société sur une routine. Les paramètres vides ne sont pas écrasés lors d'une modification.
Headers
| Nom | Type | Requis | Description |
|---|---|---|---|
| x-access-token | String | oui | Clé API |
Body (JSON)
| Nom | Type | Requis | Description |
|---|---|---|---|
| idSupply | int | oui | Identifiant de la routine |
| idCompany | int | conditionnel | Identifiant de la société. idCompany ou siren, pas les deux |
| siren | String | conditionnel | Numéro SIREN. idCompany ou siren, pas les deux |
| idIdentificationType | int|null | conditionnel | Type d'identification (valeurs autorisées : 1 hors-cible, 2 suspect, 3 prospect, 4 client). idIdentificationType ou isFormerCustomer requis |
| isFormerCustomer | boolean|null | conditionnel | Ancien client. idIdentificationType ou isFormerCustomer requis |
Réponses
200 — OK
{
"success": true,
"parameters": {
"idAccount": "string|null",
"idSupply": "int|null",
"idCompany": "int|null",
"siren": "string|null",
"idIdentificationType": "int|null",
"isFormerCustomer": "bool|null"
},
"message": "ok",
"supplyIdentification": [
{
"idSupply": "int",
"idCompany": "int",
"idIdentificationType": "int|null",
"date": "datetime",
"isManual": "bool",
"isFormerCustomer": "bool|null",
"identificationType": { "idIdentificationType": "int", "title": "string" },
"scoring": "object|null"
}
]
}Note : supplyIdentification est renvoyé à la racine sous forme de tableau (le résultat rechargé de l'identification), pas un objet result.
400 — Bad Request
{
"success": false,
"parameters": {},
"message": "idSupply nécessaire"
}Autres messages possibles : "idCompany ou siren nécessaire, pas les deux", "idIdentificationType ou isFormerCustomer nécessaire", "idIdentificationType valeur autorisées: 1,2,3,4".
404 — Not Found
{
"success": false,
"parameters": {},
"message": "Routine inexistante"
}Également "Société inexistante" si la société n'est pas trouvée.
Récupérer les types d'identification
GET/v1/supply/identificationTypeRetourne la liste des types d'identification disponibles.
Headers
| Nom | Type | Requis | Description |
|---|---|---|---|
| x-access-token | String | oui | Clé API |
Réponses
200 — OK
{
"success": true,
"code": "200",
"parameters": {
"idIdentificationType": "int[]|null"
},
"identificationTypeList": [
{
"idIdentificationType": "int",
"title": "string"
}
]
}Note : identificationTypeList est renvoyé à la racine (pas d'objet result).