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

# Wyniki telefonów zbiorczo

> Pobierz wyniki, status i statystyki dla zbiorczej partii wyszukiwania numerów telefonów według id

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

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

Pobierz wyniki wcześniej przesłanego zbiorczego wyszukiwania numerów telefonów. Uwierzytelniaj każde żądanie za pomocą swojego [klucza API](/pl/authentication) w nagłówku `x-api-key`.

<Info>
  Użycie webhooka pozwala pominąć wywoływanie tego punktu końcowego GET. Zobacz [Jak działają webhooki](/pl/how-webhooks-work).
</Info>

## Parametry zapytania

<ParamField query="id" type="string" required>
  Wartość `id` zwrócona z żądania POST
</ParamField>

## Odpowiedź

### 200 — Wyszukiwanie zakończone

<ResponseField name="general" type="object">
  Metadane partii

  <Expandable title="właściwości general">
    <ResponseField name="id" type="string">
      Identyfikator partii
    </ResponseField>

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

    <ResponseField name="custom" type="object">
      Dane niestandardowe przekazane w pierwotnym żądaniu
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="stats" type="object">
  Statystyki partii

  <Expandable title="właściwości stats">
    <ResponseField name="credits_cost" type="number">
      Łączna liczba zużytych kredytów. Zobacz [Kredyty i rozliczenia](/pl/credits-billing), aby poznać koszty dla poszczególnych punktów końcowych.
    </ResponseField>

    <ResponseField name="credits_to_refund" type="number">
      Kredyty zwrócone za wyszukiwania, które nie zwróciły żadnego wyniku. Zobacz [Kredyty i rozliczenia](/pl/credits-billing).
    </ResponseField>

    <ResponseField name="requested" type="number">
      Łączna liczba zażądanych wyszukiwań
    </ResponseField>

    <ResponseField name="found" type="number">
      Liczba znalezionych numerów telefonów
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="results" type="array">
  Tablica wyników wyszukiwania

  <Expandable title="właściwości wyniku">
    <ResponseField name="index" type="number">
      Pozycja w pierwotnej tablicy wyszukiwania
    </ResponseField>

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

    <ResponseField name="number" type="string">
      Numer telefonu (gdy `found`)
    </ResponseField>

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

    <ResponseField name="params" type="object">
      Pierwotne parametry wyszukiwania
    </ResponseField>
  </Expandable>
</ResponseField>

### 200 — Wyszukiwanie w toku

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

<ResponseField name="stats" type="object">
  Liczniki `requested` i `finished`
</ResponseField>

### Odpowiedzi błędów

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

Zobacz [Obsługa błędów](/pl/error-handling), aby uzyskać pełną listę kodów statusu i formatów odpowiedzi.

<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 Odpowiedź pomyślna 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 Odpowiedź błędu theme={null}
  {
    "message": "..."
  }
  ```
</ResponseExample>

## Następne kroki

<CardGroup cols={2}>
  <Card title="Znajdź telefony zbiorczo" icon="layer-group" href="/pl/api-reference/phone/find-bulk">
    Prześlij nową partię wyszukiwań numerów telefonów.
  </Card>

  <Card title="Pobierz pojedynczy wynik" icon="inbox" href="/pl/api-reference/phone/get-single-result">
    Pobierz wynik pojedynczego wyszukiwania telefonu według id.
  </Card>

  <Card title="Webhooki" icon="bell" href="/pl/how-webhooks-work">
    Otrzymuj automatyczne powiadomienia o zakończeniu partii.
  </Card>

  <Card title="Kredyty i rozliczenia" icon="coins" href="/pl/credits-billing">
    Zobacz, jak kredyty są zużywane i zwracane.
  </Card>
</CardGroup>
