## API-URL
URL, an die HTTP-Anfragen gesendet werden:
```url
https://portal.bulkgate.com/api/1.0/address-book/get
```

> [!NOTE]
> Erreicht die Anfrage ihr Ziel nicht, wiederholen Sie sie auf dem [Backup-Server](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/backup-server/) `backup1.bulkgate.com`.


## Unterstützte HTTP-Methoden

- `POST` - `application/json`

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

## Parametertabelle

| PARAMETERNAME | WERT | PFLICHT | STANDARDWERT |
|:------------------|:----------------------------------------------|:----------|:--------------|
| application_id | [Anwendungs-ID](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-verwaltung/) | **Ja** | - |
| application_token | [Anwendungstoken](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-tokens/) | **Ja** | - |
| phone_number | Telefonnummer, nach der gesucht wird. | **Ja** | - |
| category | Das Adressbuch, mit dem gearbeitet wird. Standardmäßig das Hauptadressbuch des Kontos. | Nein | `main` |


## Beispielanfrage

```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"
}
```

## Antwort

**Bei Erfolg:**
```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": ""
    }
}
```


**Bei einem Fehler:**
```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
}
```

Dabei gilt:

- **type** und **error** (Beschreibung des Fehlers) finden Sie in der [Tabelle der Fehlertypen](https://www.bulkgate.com/de/dokumentation/api-verwaltung-und-tokens/api-fehlertypen/)
- **code** ist der HTTP-Fehlercode
- **detail** enthält zusätzliche Informationen zum Fehler
