> ## 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.

# Hent telefonresultater

> Hent resultater, status og statistik for et bulk-batch af telefonnummersøgninger via id

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

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

Hent resultater fra en tidligere indsendt bulk-telefonsøgning. Autentificer hver forespørgsel med din [API-nøgle](/da/authentication) i `x-api-key`-headeren.

<Info>
  Brug af en webhook giver dig mulighed for at springe kaldet til dette GET-endpoint over. Se [Sådan fungerer webhooks](/da/how-webhooks-work).
</Info>

## Query-parametre

<ParamField query="id" type="string" required>
  Det `id`, der blev returneret fra POST-forespørgslen
</ParamField>

## Respons

### 200 — Søgning afsluttet

<ResponseField name="general" type="object">
  Batch-metadata

  <Expandable title="general egenskaber">
    <ResponseField name="id" type="string">
      Batch-identifikator
    </ResponseField>

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

    <ResponseField name="custom" type="object">
      Brugerdefinerede data sendt med i den oprindelige forespørgsel
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="stats" type="object">
  Batch-statistik

  <Expandable title="stats egenskaber">
    <ResponseField name="credits_cost" type="number">
      Samlet antal forbrugte credits. Se [Credits og fakturering](/da/credits-billing) for omkostninger pr. endpoint.
    </ResponseField>

    <ResponseField name="credits_to_refund" type="number">
      Credits refunderet for søgninger uden resultat. Se [Credits og fakturering](/da/credits-billing).
    </ResponseField>

    <ResponseField name="requested" type="number">
      Samlet antal anmodede søgninger
    </ResponseField>

    <ResponseField name="found" type="number">
      Antal fundne telefonnumre
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="results" type="array">
  Array af søgeresultater

  <Expandable title="Result egenskaber">
    <ResponseField name="index" type="number">
      Position i det oprindelige søge-array
    </ResponseField>

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

    <ResponseField name="number" type="string">
      Telefonnummeret (når `found`)
    </ResponseField>

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

    <ResponseField name="params" type="object">
      De oprindelige søgeparametre
    </ResponseField>
  </Expandable>
</ResponseField>

### 200 — Søgning i gang

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

<ResponseField name="stats" type="object">
  `requested`- og `finished`-tællinger
</ResponseField>

### Fejlrespons

| Code    | Message                                  |
| ------- | ---------------------------------------- |
| **400** | `Missing id in the query params`         |
| **400** | `Could not retrieve bulk search results` |
| **500** | server error                             |

Se [Fejlhåndtering](/da/error-handling) for den fulde liste over statuskoder og responsformater.

<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 Vellykket respons 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 Fejlrespons theme={null}
  {
    "message": "..."
  }
  ```
</ResponseExample>

## Næste skridt

<CardGroup cols={2}>
  <Card title="Find telefonnumre i bulk" icon="layer-group" href="/da/api-reference/phone/find-bulk">
    Indsend et nyt batch af telefonnummersøgninger.
  </Card>

  <Card title="Hent ét resultat" icon="inbox" href="/da/api-reference/phone/get-single-result">
    Hent resultatet af en enkelt telefonsøgning via id.
  </Card>

  <Card title="Webhooks" icon="bell" href="/da/how-webhooks-work">
    Bliv automatisk underrettet, når et batch er færdigt.
  </Card>

  <Card title="Credits og fakturering" icon="coins" href="/da/credits-billing">
    Se, hvordan credits forbruges og refunderes.
  </Card>
</CardGroup>
