## URL de l'API
URL utilisée pour envoyer les requêtes HTTP :
```url
https://portal.bulkgate.com/api/1.0/address-book/get
```

> [!NOTE]
> Si la requête n'atteint pas sa destination, renvoyez-la au [serveur de secours](https://www.bulkgate.com/fr/documentation/administration-api-et-tokens/serveur-de-secours/) `backup1.bulkgate.com`.


## Méthodes HTTP prises en charge

- `POST` - `application/json`

```http
POST /api/1.0/address-book/get HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
```

## Tableau des paramètres

| NOM DU PARAMÈTRE  | VALEUR                                        | OBLIGATOIRE | VALEUR PAR DÉFAUT |
|:------------------|:----------------------------------------------|:------------|:------------------|
| application_id    | [Application ID](https://www.bulkgate.com/fr/documentation/administration-api-et-tokens/administration-api/) | **Oui**     | -                 | 
| application_token | [Jeton d'application](https://www.bulkgate.com/fr/documentation/administration-api-et-tokens/tokens-d-api/)	     | **Oui**     | -                 |
| phone_number      | Numéro de téléphone à rechercher.             | **Oui**     | -                 |
| category          | Le carnet d'adresses à utiliser. Par défaut, le carnet principal du compte. | Non         | `main`                      |


## Exemple de requête

```http-json
POST /api/1.0/address-book/get HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json

{
	"application_id": 451,
	"application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj",
	"phone_number": "123456789"
}
```

## Réponse

**En cas de succès :**
```json
{
    "data": {
        "phone_mobile": "123456789",
        "phone": "",
        "phone_number_iso": null,
        "email": "",
        "url": "",
        "first_name": "Morgan",
        "last_name": "Yu",
        "title_before": "",
        "title_after": "",
        "gender": "",
        "type": "",
        "street1": "",
        "street2": "",
        "city": "",
        "zip": "",
        "state": "",
        "country": "",
        "company_name": "",
        "company_number": "",
        "company_vat": "",
        "custom_field_0": "",
        "custom_field_1": "",
        "custom_field_2": "",
        "custom_field_3": "",
        "custom_field_4": "",
        "custom_field_5": "",
        "custom_field_6": "",
        "custom_field_7": "",
        "custom_field_8": "",
        "custom_field_9": ""
    }
}
```


**En cas d'erreur :**
```json
{
    "type": "number_not_found",
    "code": 400,
    "error": "Number not found",
    "detail": null
}
```

```json
{
    "type": "invalid_phone_number",
    "code": 400,
    "error": "Invalid phone number",
    "detail": null
}
```

Où :

- **type** et **error** (description de l'erreur) figurent dans le [tableau des types d'erreurs](https://www.bulkgate.com/fr/documentation/administration-api-et-tokens/types-d-erreurs-api/)
- **code** représente le code d'erreur HTTP
- **detail** contient des informations complémentaires sur l'erreur
