Skip to content

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/identification

Retourne les données de scoring et d'identification des sociétés sur une routine.

Headers

NomTypeRequisDescription
x-access-tokenStringouiClé API

Paramètres query

NomTypeRequisDescription
idSupplyint|int[]conditionnelIdentifiant(s) de la routine
idCompanyint|int[]conditionnelIdentifiant(s) de société
sirenString|String[]conditionnelNuméro(s) SIREN
minScoringMatchintnonScore minimum
idIdentificationTypeint|int[]nonFiltrer par type d'identification
pollingScoringintconditionnelScorings modifiés dans les X dernières minutes (min. 15)
pollingTagintconditionnelTags 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
json
{
    "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'objet result, pas de champ code/message en succès).
  • identificationType est l'objet du type d'identification (null si non taggé) ; scoring est l'objet de scoring de la société sur la routine (null s'il n'existe pas).
400 — Bad Request
json
{
    "success": false,
    "parameters": {},
    "message": "idSupply, idCompany, siren, pollingScoring ou pollingTag nécessaire"
}
403 — Forbidden
json
{
    "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/identification

Cré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

NomTypeRequisDescription
x-access-tokenStringouiClé API

Body (JSON)

NomTypeRequisDescription
idSupplyintouiIdentifiant de la routine
idCompanyintconditionnelIdentifiant de la société. idCompany ou siren, pas les deux
sirenStringconditionnelNuméro SIREN. idCompany ou siren, pas les deux
idIdentificationTypeint|nullconditionnelType d'identification (valeurs autorisées : 1 hors-cible, 2 suspect, 3 prospect, 4 client). idIdentificationType ou isFormerCustomer requis
isFormerCustomerboolean|nullconditionnelAncien client. idIdentificationType ou isFormerCustomer requis

Réponses

200 — OK
json
{
    "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
json
{
    "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
json
{
    "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/identificationType

Retourne la liste des types d'identification disponibles.

Headers

NomTypeRequisDescription
x-access-tokenStringouiClé API

Réponses

200 — OK
json
{
    "success": true,
    "code": "200",
    "parameters": {
        "idIdentificationType": "int[]|null"
    },
    "identificationTypeList": [
        {
            "idIdentificationType": "int",
            "title": "string"
        }
    ]
}

Note : identificationTypeList est renvoyé à la racine (pas d'objet result).

Coefficy — API externe