> This page is for Unified.

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

# /expenses/bulk/{batch_id}

GET https://api.merge.dev/api/accounting/v1/expenses/bulk/{batch_id}

Returns the status and results of an `Expense` bulk create batch.

Reference: https://docs.merge.dev/merge-unified/accounting/common-models/expenses/batch-objects-list

## Authentication

- `Authorization` header (bearer token, required) — Token-based authentication with required prefix "Bearer"

## Servers

- `https://api.merge.dev/api` (Production, default)
- `https://api-eu.merge.dev/api` (ProductionEU)
- `https://api-ap.merge.dev/api` (ProductionAPSE1)

## Request

### Path parameters

- `batch_id` (string, required)

### Headers

- `X-Account-Token` (string, required) — Token identifying the end user.

## Response

### 200

- `batch_id` (string, required) — The ID of the batch.
- `status` (enum, required) — Possible overall statuses: * `ENQUEUED` - The request has been received and a task has been enqueued for processing * `IN_PROGRESS` - The enqueued task is being processed * `PARTIAL_SUCCESS` - The task has been processed, but not all objects were written successfully * `SUCCESS` - The task has been processed, and all objects were written successfully * `FAILED` - The task has been processed, but ran into an error while processing * `RATE_LIMITED` - The request was received but ran into rate limits while processing. The rate limited objects are being retried.
  - Allowed values: `ENQUEUED`, `IN_PROGRESS`, `PARTIAL_SUCCESS`, `SUCCESS`, `FAILED`, `RATE_LIMITED`
- `total_count` (integer, required) — The total number of objects in the batch.
- `objects` (list of BatchObject, required)

## Types

### BatchObject

Individual batch object with status

- `item_id` (string, required)
- `status` (enum, required) — Possible per-object statuses: * `PENDING` - This object has not been processed yet * `SUCCESS` - This object was successfully POSTed * `FAILURE` - This object was not successfully POSTed
  - Allowed values: `PENDING`, `SUCCESS`, `FAILURE`
- `response` (BatchObjectItemResponse, optional) — Response for individual items within a batch

### BatchObjectItemResponse

Response for individual items within a batch

- `merge_common_model_id` (string, optional)
- `error_message` (string, optional)

## Examples

**Response**

```json
{
  "batch_id": "d0a3ca3e-2d7a-44cd-a94b-bda805f23b5",
  "status": "ENQUEUED",
  "total_count": 1,
  "objects": [
    {
      "item_id": "string",
      "status": "SUCCESS",
      "response": {
        "merge_common_model_id": "string",
        "error_message": "string"
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.merge.dev/api/accounting/v1/expenses/bulk/batch_id"

headers = {
    "X-Account-Token": "X-Account-Token",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript
const url = 'https://api.merge.dev/api/accounting/v1/expenses/bulk/batch_id';
const options = {
  method: 'GET',
  headers: {'X-Account-Token': 'X-Account-Token', Authorization: 'Bearer <token>'}
};

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

```go
package main

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

func main() {

	url := "https://api.merge.dev/api/accounting/v1/expenses/bulk/batch_id"

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

	req.Header.Add("X-Account-Token", "X-Account-Token")
	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.merge.dev/api/accounting/v1/expenses/bulk/batch_id")

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

request = Net::HTTP::Get.new(url)
request["X-Account-Token"] = 'X-Account-Token'
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.get("https://api.merge.dev/api/accounting/v1/expenses/bulk/batch_id")
  .header("X-Account-Token", "X-Account-Token")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.merge.dev/api/accounting/v1/expenses/bulk/batch_id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Account-Token' => 'X-Account-Token',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.merge.dev/api/accounting/v1/expenses/bulk/batch_id");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Account-Token", "X-Account-Token");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Account-Token": "X-Account-Token",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.merge.dev/api/accounting/v1/expenses/bulk/batch_id")! 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()
```