> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ntropy.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ntropy.com/_mcp/server.

# Retrieve the results of a batch

GET https://api.ntropy.com/v3/batches/{id}/results

Returns batch metadata along with a list containing the body of the responses of each request in the batch. The 
responses are returned in the same order they were submitted. The schema of each response body is given by the 
respective `operation` of the batch.

Results are available after the batch has finished processing.

Reference: https://docs.ntropy.com/documentation/api/batches/get-batch-results-v-3-batches-id-results-get

## Authentication

- `X-Api-Key` header (required) — API Key authentication via header

## Request

### Path parameters

- `id` (string, required)

## Response

### 200

Returned batch of transaction enrichment results.

- `id` (string, required) — A unique identifier for the batch.
- `total` (integer, required) — The total number of transactions in the batch result.
- `status` (enum, required) — The current status of the batch job.
  - Allowed values: `processing`, `completed`, `error`
- `results` (list of EnrichedTransaction, required) — A list containing the body of the responses of each request in the batch. The responses are returned in the same order they were submitted. The format of each response is given by the respective batch `operation`.

## Errors

### 404 Not Found Error

Batch with the provided id not found.

- `any`

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### EnrichedTransaction

- `created_at` (datetime, required) — The timestamp of when the account holder was created.
- `id` (string, required) — A unique identifier for the transaction. If two transactions are submitted with the same `id` the most recent one will replace the previous one.
- `entities` (Entities, optional, nullable) — Entities found by identity identification
- `categories` (Categories, optional, nullable)
- `location` (Location, optional, nullable)
- `error` (TransactionError, optional, nullable)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### Entities

Entities found by identity identification

- `counterparty` (Counterparty, optional, nullable)
- `intermediaries` (list of Intermediary, optional)

### Categories

- `general` (string, required, nullable) — The category of the transaction. View the valid set of categories for your key [here](../../../categories).
- `accounting` (enum, optional, nullable) — The corresponding accounting category. Only available for `business` transactions.
  - Allowed values: `operational expenses`, `cost of goods sold`, `revenue`, `financing`, `taxes`, `investing`, `not enough information`

### Location

- `raw_address` (string, optional, nullable) — An unstructured string containing the address
- `structured` (LocationStructured, optional, nullable) — When raw is set, a structured representation of it.

### TransactionError

- `code` (enum, required)
  - Allowed values: `account_holder_not_found`, `internal_error`
- `message` (string, required)

### ValidationErrorLocItems

### Counterparty

- `type` (enum, required)
  - Allowed values: `person`, `organization`
- `id` (string, optional, nullable) — The unique UUID identifier of the entity
- `name` (string, optional, nullable) — The name of the entity
- `website` (string, optional, nullable) — The website URL of the entity
- `phone_number` (string, optional, nullable) — The phone number of the entity. This is a premium feature, please contact support to enable it.
- `tax_number` (string, optional, nullable) — The tax number of the entity. This is a premium feature, please contact support to enable it.
- `naics2017` (string, optional, nullable) — The 2017 NAICS code of the entity. This is a premium feature, please contact support to enable it.
- `logo` (string, optional, nullable) — Logo's URL
- `mccs` (list of integer, optional) — A list of [Merchant Category Codes](https://en.wikipedia.org/wiki/Merchant_category_code)
- `parent` (EntityParent, optional, nullable) — The parent entity

### Intermediary

- `id` (string, optional, nullable) — The unique UUID identifier of the entity
- `name` (string, optional, nullable) — The name of the entity
- `website` (string, optional, nullable) — The website URL of the entity
- `phone_number` (string, optional, nullable) — The phone number of the entity. This is a premium feature, please contact support to enable it.
- `tax_number` (string, optional, nullable) — The tax number of the entity. This is a premium feature, please contact support to enable it.
- `naics2017` (string, optional, nullable) — The 2017 NAICS code of the entity. This is a premium feature, please contact support to enable it.
- `logo` (string, optional, nullable) — Logo's URL
- `mccs` (list of integer, optional) — A list of [Merchant Category Codes](https://en.wikipedia.org/wiki/Merchant_category_code)
- `parent` (EntityParent, optional, nullable) — The parent entity

### LocationStructured

- `street` (string, optional, nullable) — The street name of the location
- `city` (string, optional, nullable) — The city where the location is situated
- `state` (string, optional, nullable) — The state or region of the location
- `postcode` (string, optional, nullable) — The postal code or ZIP code of the location
- `country_code` (string, optional, nullable) — The country code of the location in ISO 3166-2 format
- `country` (string, optional, nullable) — The full name of the country
- `house_number` (string, optional, nullable) — The house number if, applicable
- `latitude` (double, optional, nullable) — The latitude coordinate of the location
- `longitude` (double, optional, nullable) — The longitude coordinate of the location
- `google_maps_url` (string, optional, nullable) — A URL link to view the location on Google Maps
- `apple_maps_url` (string, optional, nullable) — A URL link to view the location on Apple Maps
- `store_number` (string, optional, nullable) — A unique identifier for a specific store or branch, if applicable

### EntityParent

- `id` (string, optional, nullable) — The unique UUID identifier of the entity
- `name` (string, optional, nullable) — The name of the entity
- `website` (string, optional, nullable) — The website URL of the entity
- `phone_number` (string, optional, nullable) — The phone number of the entity. This is a premium feature, please contact support to enable it.
- `tax_number` (string, optional, nullable) — The tax number of the entity. This is a premium feature, please contact support to enable it.
- `naics2017` (string, optional, nullable) — The 2017 NAICS code of the entity. This is a premium feature, please contact support to enable it.

## Examples

### Example_0

**Request**

```json
{}
```

**Response**

```json
{
  "id": "203613d2-83c8-4130-8809-d14206eeec20",
  "total": 1,
  "status": "completed",
  "results": [
    {
      "created_at": "2024-01-15T09:30:00Z",
      "id": "xbx8YP14g565Xk",
      "entities": {
        "counterparty": {
          "type": "organization",
          "id": "d4bc3c80-ec1a-3da2-836e-2a4ca4758be5",
          "name": "Starbucks",
          "website": "starbucks.com",
          "phone_number": "+1 4153753176",
          "tax_number": "80-0429876",
          "naics2017": "541519",
          "logo": "https://logos.ntropy.com/starbucks.com",
          "mccs": [
            5814
          ]
        },
        "intermediaries": [
          {
            "id": "916bc837-55ef-3106-88f6-5a8269ca9f2a",
            "name": "Square, Inc.",
            "website": "squareup.com",
            "phone_number": "+1 8557006000",
            "tax_number": "12-3456789",
            "naics2017": "522320",
            "logo": "https://logos.ntropy.com/squareup.com",
            "mccs": [
              6012
            ],
            "parent": {
              "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
              "name": "Block, Inc.",
              "website": "block.xyz",
              "phone_number": "+1 8885551234",
              "tax_number": "98-7654321",
              "naics2017": "521110"
            }
          }
        ]
      },
      "categories": {
        "general": "coffee shop"
      },
      "location": {
        "raw_address": "10 Union Square E, New York, New York 10003, United States",
        "structured": {
          "street": "Union Square East",
          "city": "New York",
          "state": "New York",
          "postcode": "10003",
          "country_code": "US",
          "country": "United States",
          "house_number": "10",
          "latitude": 40.734834,
          "longitude": -73.989782,
          "google_maps_url": "https://www.google.com/maps/search/?api=1&query=40.734834,-73.989782",
          "apple_maps_url": "https://maps.apple.com/?q=40.734834,-73.989782"
        }
      },
      "error": {
        "code": "account_holder_not_found",
        "message": "The account holder associated with this transaction could not be found."
      }
    }
  ]
}
```

**SDK Code**

```python Example_0
import requests

url = "https://api.ntropy.com/v3/batches/id/results"

payload = {}
headers = {
    "X-Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript Example_0
const url = 'https://api.ntropy.com/v3/batches/id/results';
const options = {
  method: 'GET',
  headers: {'X-Api-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example_0
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ntropy.com/v3/batches/id/results"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("X-Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example_0
require 'uri'
require 'net/http'

url = URI("https://api.ntropy.com/v3/batches/id/results")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java Example_0
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.ntropy.com/v3/batches/id/results")
  .header("X-Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php Example_0
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.ntropy.com/v3/batches/id/results', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Example_0
using RestSharp;

var client = new RestClient("https://api.ntropy.com/v3/batches/id/results");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Example_0
import Foundation

let headers = [
  "X-Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.ntropy.com/v3/batches/id/results")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### cURL

**SDK Code**

```python Python SDK
from ntropy_sdk import SDK

sdk = SDK("cd1H...Wmhl")
batch = sdk.batches.get("203613d2-83c8-4130-8809-d14206eeec20")
results = sdk.batches.wait_for_results("203613d2-83c8-4130-8809-d14206eeec20")
```

```javascript cURL
const url = 'https://api.ntropy.com/v3/batches/:id/results';
const options = {method: 'GET', headers: {'X-Api-Key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go cURL
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.ntropy.com/v3/batches/:id/results"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Api-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby cURL
require 'uri'
require 'net/http'

url = URI("https://api.ntropy.com/v3/batches/:id/results")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java cURL
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.ntropy.com/v3/batches/:id/results")
  .header("X-Api-Key", "<apiKey>")
  .asString();
```

```php cURL
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.ntropy.com/v3/batches/:id/results', [
  'headers' => [
    'X-Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp cURL
using RestSharp;

var client = new RestClient("https://api.ntropy.com/v3/batches/:id/results");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift cURL
import Foundation

let headers = ["X-Api-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.ntropy.com/v3/batches/:id/results")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```