NAV Navbar
shell javascript

Introduction

Bienvenue sur l'API d'Exabaz ! Vous pouvez utiliser notre API pour gérer vos contacts sans passer par notre application web.

Authentication

Exemple d'authentification sur l'API:

curl "https://api.exabaz.com/v1/"
  -H "Authorization: exabaz_api_key"
import axios from 'axios'

axios({
  url: 'https://api.exabaz.com/v1/'
  method: 'get',
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  console.log(response.data)
})

Soyez sûr de remplacer exabaz_api_key par une clé d'API valide.

Exabaz utilise des clés d'API pour accéder au service d'API. Vous pouvez créer une clé d'API sur l'application Exabaz.

Vous devez inclure votre clé d'API dans le header de chacune des requêtes que vous faites à l'API. Voir l'exemple ci-dessous :

Authorization: exabaz_api_key

Méthodes

Compte

  curl "https://api.exabaz.com/v1/account" -H "Authorization: exabaz_api_key"
import axios from 'axios'

axios({
  url: 'https://api.exabaz.com/v1/account'
  method: 'get',
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data
})

La commande suivante retourne un JSON structuré comme celui ci, représentant votre compte utilisateur :

{
  "success": true,
  "data": {
    "email": "julie@exabaz.com",
    "email_verified": true,
    "current_balance": 913,
    "limit_date": "2019-04-26T12:45:10.353Z"
  }
}

Cette requête retourne le compte de l'utilisateur

Requête HTTP

GET https://api.exabaz.com/v1/account

Contacts

Cette requête permet de récupérer vos contacts enregistrés sous forme de page. Le nombre de contact est limité à 100 par page.

curl "https://api.exabaz.com/v1/contacts"
  -H "Authorization: exabaz_api_key"
import axios from 'axios'

axios({
  url: 'https://api.exabaz.com/v1/contacts'
  method: 'get',
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data
})

Retourne un document structuré comme celui-ci:

{
  "contacts_count": 142,
  "total_page": 2,
  "current_page": 1,
  "success": true,
  "data": [
    {
      "_id": "5c811a4e32f42b2de60a399d",
      "firstname": "julie",
      "lastname": "payet",
      "email": "julie@exabaz.com",
      "email_qualification": "valid",
      "job_title": "Directeur Financier",
      "company": "Exabaz",
      "industry": "Internet",
      "city": "France",
      "update_available": false,
      "source": "https://www.linkedin.com/in/juliepayet974",
      "added_at": "2019-02-26T06:01:42.021Z"
    },
    {
      "_id": "5c811a4e32f42b2de60a399f",
      "firstname": "john",
      "lastname": "doe",
      "email": null,
      "email_qualification": "unverified",
      "job_title": "CTO",
      "company": "Exabaz",
      "industry": "Internet",
      "city": "France",
      "update_available": true,
      "source": "https://www.linkedin.com/in/johndoe",
      "added_at": "2019-02-26T06:01:42.027Z"
    }
    // ...
  ]
}

Requête HTTP

GET https://api.exabaz.com/v1/contacts

GET https://api.exabaz.com/v1/contacts?page=2

Pamarètres Query

Paramètre Défaut Description
page 1 le numéro de page permet de récupérer d'autres pages de contacts

Contact spécifique

Récupérer un contact spécifique

curl "https://api.exabaz.com/v1/contacts/contact_id"
  -H "Authorization: exabaz_api_key"
import axios from 'axios'

axios({
  url: 'https://api.exabaz.com/v1/contacts/contact_id'
  method: 'get',
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data
})

Retourne un document structuré comme celui-ci:

{
  "success": true,
  "data": {
    "_id": "5c811a4c32f42b2de60a3872",
    "firstname": "julie",
    "lastname": "payet",
    "email": "julie@exabaz.com",
    "email_qualification": "valid",
    "job_title": "Directeur Financier",
    "company": "Exabaz",
    "industry": "Internet",
    "city": "France",
    "source": "https://www.linkedin.com/in/juliepayet974",
    "update_available": false,
    "added_at": "2019-03-07T13:19:08.716Z"
  }
}

Requête HTTP

GET https://api.exabaz.com/v1/contacts/contact_id

Listes

curl "https://api.exabaz.com/v1/lists"
  -H "Authorization: exabaz_api_key"
import axios from 'axios'

axios({
  url: 'https://api.exabaz.com/v1/lists'
  method: 'get',
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data
})

Retourne un document structuré comme celui-ci:

{
  "success": true,
  "lists_count": 9,
  "data": [
    {
      "_id": "5c811a4a32f42b2de60a3863",
      "name": "CTO à Paris",
      "created_at": "2019-03-07T13:19:06.643Z"
    },
    {
      "_id": "5c81322aa587a863881525c7",
      "name": "CEO et associés",
      "created_at": "2019-03-07T15:00:58.667Z"
    }
    // ...
  ]
}

Requête HTTP

Permet de lister vos listes enregistrées

GET https://api.exabaz.com/v1/lists

Contacts dans une liste

Permet de lister les contacts dans une liste sous forme de page (limité à 100 contacts par page)

  curl "https://api.exabaz.com/v1/lists/list_id/contacts" -H "Authorization: exabaz_api_key"
import axios from 'axios'

axios({
  url: 'https://api.exabaz.com/v1/lists/list_id/contacts'
  method: 'get',
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data
})

Retourne un document structuré comme celui-ci:

{
  "contacts_count": 2,
  "total_page": 1,
  "current_page": 1,
  "success": true,
  "data": [
    {
      "_id": "5c811a4e32f42b2de60a399d",
      "firstname": "julie",
      "lastname": "payet",
      "email": "julie@exabaz.com",
      "email_qualification": "valid",
      "job_title": "Directeur Financier",
      "company": "Exabaz",
      "industry": "Internet",
      "city": "France",
      "source": "https://www.linkedin.com/in/juliepayet974",
      "update_available": false,
      "added_at": "2019-02-26T06:01:42.021Z"
    },
    {
      "_id": "5c811a4e32f42b2de60a399f",
      "firstname": "john",
      "lastname": "doe",
      "email": null,
      "email_qualification": "unverified",
      "job_title": "CTO",
      "company": "Exabaz",
      "industry": "Internet",
      "city": "France",
      "source": "https://www.linkedin.com/in/johndoe",
      "update_available": true,
      "added_at": "2019-02-26T06:01:42.027Z"
    }
    // ...
  ]
}

Requête HTTP

GET https://api.exabaz.com/v1/lists/list_id/contacts

GET https://api.exabaz.com/v1/lists/list_id/contacts?page=3

Pamarètres Query

Paramètre Défaut Description
page 1 le numéro de page permet de récupérer d'autres pages de contact

Recherche de contacts

Rechercher des contacts grâce à des critères de sélection

curl "https://api.exabaz.com/v1/contacts/search"
  -H "Authorization: exabaz_api_key" -X POST
import axios from "axios";

axios({
  url: "https://api.exabaz.com/v1/contacts/search",
  method: "post",
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data;
});

Retourne un document structuré comme celui-ci:

{
  "success": true,
  "search-request": {
    "_id": "5cb5dfe9767f3a280c2316b1",
    "status": "pending",
    "price": 1,
    "results_count": 1,
    "search": {
      "first_name": "Julie",
      "last_name": "Payet",
      "job_title": "Director"
    },
    "type": "search-contacts",
    "created_at": "2019-04-16T14:00:09.952Z"
  }
}

Requête HTTP

GET https://api.exabaz.com/v1/contacts/search

Recherches réçentes

Récupérer les 10 dernières recherches effectuées

curl "https://api.exabaz.com/v1/search-requests"
  -H "Authorization: exabaz_api_key"
import axios from "axios";

axios({
  url: "https://api.exabaz.com/v1/search-requests",
  method: "get",
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data;
});

Retourne un document structuré comme celui-ci:

{
  "success": true,
  "data": [
    {
      "status": "pending",
      "price": 44,
      "results_count": 44,
      "search": {
        "industry": ["Affaires étrangères"]
      },
      "type": "search-contacts",
      "created_at": "2019-04-10T16:10:17.533Z"
    },
    {
      "status": "pending",
      "price": 0,
      "results_count": 0,
      "search": {
        "company_name": "wanadoo"
      },
      "type": "search-contacts",
      "created_at": "2019-04-03T00:39:08.482Z"
    }
    // ...
  ]
}

Requête HTTP

GET https://api.exabaz.com/v1/search-requests

Enregistrer les résultats

Récupére les résultats d'une recherche

curl "http://api.exabaz.com/v1/search-requests/request_id/confirm"
  -H "Authorization: exabaz_api_key"
import axios from "axios";

axios({
  url: "http://api.exabaz.com/v1/search-requests/request_id/confirm",
  method: "post",
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data;
});

Retourne un document structuré comme celui-ci:

{
  "success": true,
  "data": {
    "current_balance": 42,
    "results_list_id": "5cb842a6755c3808fb806804",
    "results": "https://api.exabaz.com/v1/lists/5cb842a6755c3808fb806804/contacts"
  }
}

Requête HTTP

GET http://api.exabaz.com/v1/search-requests/request_id/confirm

Mise à jour de contact

La mise à jour de contact vous permet de récupérer les dernières informations indexées sur votre contact. Le champ update_available dans un contact indique si des mises à jour sont disponibles pour le contact

curl "https://api.exabaz.com/v1/contacts/contact_id/update"
  -H "Authorization: exabaz_api_key"
  -X POST
import axios from 'axios'

axios({
  url: 'https://api.exabaz.com/v1/contacts/contact_id/update'
  method: 'post',
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data
})

Retourne un document structuré comme celui-ci:

{
  "success": true,
  "current_balance": 908,
  "data": {
    "_id": "5c811a4c32f42b2de60a3872",
    "firstname": "julie",
    "lastname": "payet",
    "email": "julie@exabaz.com",
    "email_qualification": "valid",
    "job_title": "Directeur Financier",
    "company": "Exabaz",
    "industry": "Internet",
    "city": "France",
    "soource": "https://www.linkedin.com/in/juliepayet974",
    "update_available": false,
    "added_at": "2019-03-07T13:19:08.716Z"
  }
}

Requête HTTP

POST https://api.exabaz.com/v1/contacts/contact_id/update

Recherche d'email

La recherche d'email est sans garantie de résultat.

curl "https://api.exabaz.com/v1/contacts/contact_id/search-email"
  -H "Authorization: exabaz_api_key"
  -X POST
import axios from 'axios'

axios({
  url: 'https://api.exabaz.com/v1/contacts/contact_id/search-email'
  method: 'post',
  headers: {
    Authorization: "exabaz_api_key"
  }
}).then(response => {
  const result = response.data
})

Retourne un document structuré comme celui-ci:

{
  "success": true,
  "current_balance": 887,
  "data": {
    "_id": "5c811a4c32f42b2de60a3872",
    "firstname": "julie",
    "lastname": "payet",
    "email_qualification": "searching",
    "job_title": "Directeur Financier",
    "company": "Exabaz",
    "industry": "Internet",
    "city": "France",
    "source": "https://www.linkedin.com/in/juliepayet974",
    "update_available": false,
    "added_at": "2019-03-07T13:19:08.716Z"
  }
}

le champ email_qualification passe à searching et indique que la recherche d'email est en cours. Pour vérifier si la recherche d'email est terminée, il faut faire une nouvelle requete pour récupérer à nouveau le contact pour récupérer à nouveau le contact (la vérification de l'email peut prendre jusqu'a 5 minutes)

Requête HTTP

POST https://api.exabaz.com/v1/contacts/contact_id/search-email

Errors

L'API d'Exabaz utilise les codes d'erreurs suivants:

Code d'erreur Signification
400 Bad Request -- Votre requête est invalide
401 Unauthorized -- Votre clé d'API n'est pas valide
403 Forbidden -- Vous n'avez pas les droits d'accès
404 Not Found -- La ressource demandé n'existe pas
405 Method Not Allowed -- La méthode est invalide
500 Internal Server Error -- Nous avons un problème avec nos serveurs. Veuillez réessayer plus tard.