> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enrow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Telefoonresultaten ophalen

> Haal resultaten, status en statistieken op voor een batch met telefoonnummerzoekopdrachten via id

<Badge color="blue">GET</Badge>

```
https://api.enrow.io/phone/bulk?id={batch_id}
```

Haal de resultaten op van een eerder ingediende bulkzoekopdracht naar telefoonnummers. Authenticeer elk verzoek met je [API-sleutel](/nl/authentication) in de `x-api-key`-header.

<Info>
  Met een webhook hoef je dit GET-endpoint niet aan te roepen. Zie [Hoe webhooks werken](/nl/how-webhooks-work).
</Info>

## Queryparameters

<ParamField query="id" type="string" required>
  De `id` die door het POST-verzoek wordt geretourneerd
</ParamField>

## Response

### 200 — Zoekopdracht voltooid

<ResponseField name="general" type="object">
  Batchmetadata

  <Expandable title="general-eigenschappen">
    <ResponseField name="id" type="string">
      Batch-identifier
    </ResponseField>

    <ResponseField name="status" type="string">
      `completed` | `ongoing` | `failed`
    </ResponseField>

    <ResponseField name="custom" type="object">
      Aangepaste gegevens die in het oorspronkelijke verzoek zijn meegegeven
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="stats" type="object">
  Batchstatistieken

  <Expandable title="stats-eigenschappen">
    <ResponseField name="credits_cost" type="number">
      Totaal aantal verbruikte credits. Zie [Credits & facturering](/nl/credits-billing) voor de kosten per endpoint.
    </ResponseField>

    <ResponseField name="credits_to_refund" type="number">
      Credits die worden terugbetaald voor zoekopdrachten zonder resultaat. Zie [Credits & facturering](/nl/credits-billing).
    </ResponseField>

    <ResponseField name="requested" type="number">
      Totaal aantal aangevraagde zoekopdrachten
    </ResponseField>

    <ResponseField name="found" type="number">
      Aantal gevonden telefoonnummers
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="results" type="array">
  Array met zoekresultaten

  <Expandable title="Resultaateigenschappen">
    <ResponseField name="index" type="number">
      Positie in de oorspronkelijke zoekarray
    </ResponseField>

    <ResponseField name="qualification" type="string">
      `found` of `not_found`
    </ResponseField>

    <ResponseField name="number" type="string">
      Het telefoonnummer (bij `found`)
    </ResponseField>

    <ResponseField name="country" type="string">
      ISO 3166-1 Alpha-2-landcode (bijv. `"US"`, `"FR"`)
    </ResponseField>

    <ResponseField name="params" type="object">
      De oorspronkelijke zoekparameters
    </ResponseField>
  </Expandable>
</ResponseField>

### 200 — Zoekopdracht loopt nog

<ResponseField name="general" type="object">
  `id` en `status: "ongoing"`
</ResponseField>

<ResponseField name="stats" type="object">
  Aantallen voor `requested` en `finished`
</ResponseField>

### Foutmeldingen

| Code    | Bericht                                  |
| ------- | ---------------------------------------- |
| **400** | `Missing id in the query params`         |
| **400** | `Could not retrieve bulk search results` |
| **500** | serverfout                               |

Zie [Foutafhandeling](/nl/error-handling) voor de volledige lijst met statuscodes en responseformaten.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.enrow.io/phone/bulk?id=e3b61122-d6a6-4ea7-b331-9b734682a76a' \
    --header 'x-api-key: YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const batchId = 'e3b61122-d6a6-4ea7-b331-9b734682a76a';
  const response = await fetch(`https://api.enrow.io/phone/bulk?id=${batchId}`, {
    headers: {
      'x-api-key': process.env.ENROW_API_KEY
    }
  });

  const data = await response.json();
  if (data.general.status === 'completed') {
    console.log(`Found: ${data.stats.found}/${data.stats.requested}`);
    console.log(data.results);
  }
  ```

  ```python Python theme={null}
  import requests
  import os

  batch_id = "e3b61122-d6a6-4ea7-b331-9b734682a76a"
  url = f"https://api.enrow.io/phone/bulk?id={batch_id}"
  headers = {
      "x-api-key": os.getenv("ENROW_API_KEY")
  }

  response = requests.get(url, headers=headers)
  data = response.json()
  if data["general"]["status"] == "completed":
      print(f"Found: {data['stats']['found']}/{data['stats']['requested']}")
  ```
</RequestExample>

<ResponseExample>
  ```json Succesvolle response theme={null}
  {
    "general": {
      "id": "e3b61122-d6a6-4ea7-b331-9b734682a76a",
      "status": "completed"
    },
    "results": [
      {
        "country": "US",
        "index": 0,
        "number": "+15705551234",
        "params": {
          "linkedin_url": "https://www.linkedin.com/in/michael-scott"
        },
        "qualification": "found"
      },
      {
        "country": "US",
        "index": 1,
        "number": "+15705555678",
        "params": {
          "linkedin_url": "https://www.linkedin.com/in/dwight-schrute"
        },
        "qualification": "found"
      }
    ],
    "stats": {
      "credits_cost": 80,
      "credits_to_refund": 0,
      "found": 2,
      "requested": 2
    }
  }
  ```

  ```json Foutresponse theme={null}
  {
    "message": "..."
  }
  ```
</ResponseExample>

## Volgende stappen

<CardGroup cols={2}>
  <Card title="Telefoonnummers in bulk zoeken" icon="layer-group" href="/nl/api-reference/phone/find-bulk">
    Dien een nieuwe batch met telefoonnummerzoekopdrachten in.
  </Card>

  <Card title="Eén resultaat ophalen" icon="inbox" href="/nl/api-reference/phone/get-single-result">
    Haal het resultaat van één telefoonzoekopdracht op via id.
  </Card>

  <Card title="Webhooks" icon="bell" href="/nl/how-webhooks-work">
    Word automatisch op de hoogte gebracht wanneer een batch is voltooid.
  </Card>

  <Card title="Credits & facturering" icon="coins" href="/nl/credits-billing">
    Bekijk hoe credits worden verbruikt en terugbetaald.
  </Card>
</CardGroup>
