> This page is for BaaS.

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

# List Boleto Charge batches

GET https://tenant.api.corpx.com/v1/accounts/{accountId}/boleto/charge/batches

Lists this account's batches from the local mirror, newest first.
Summary statistics reflect the current issuance and payment state.


Reference: https://en.docs.api.corpx.com/baas/referencia/boleto-charge/list-boleto-charge-batches

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `accountId` (string, required) — Account identifier.

### Query parameters

- `page` (integer, optional, default: 1) — Page number, starting at 1.
- `pageSize` (integer, optional, default: 50) — Number of batches per page.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.

## Response

### 200

Page of batch summaries

- `items` (list of BoletoChargeBatch, required) — Batches in this page.
- `page` (integer, required) — Current page.
- `pageSize` (integer, required) — Requested page size.
- `totalItems` (integer, required) — Total matching batches.
- `totalPages` (integer, required) — Number of pages.
- `hasNext` (boolean, required) — Whether another page exists.

## Errors

### 403 Forbidden Error

Requester does not have permission to perform the operation.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

## Types

### BoletoChargeBatch

Boleto Charge batch summary and current statistics.

- `batchId` (string, required) — Batch identifier.
- `name` (string, required) — Optional operator-facing name; empty when omitted.
- `status` (enum, required) — Batch lifecycle. Only `DRAFT` is editable. `COMPLETED`, `PARTIAL_FAILED`, and `FAILED` are terminal for issuance attempts; individual boleto registration and payment continue afterwards.
  - Allowed values: `DRAFT`, `QUEUED`, `PROCESSING`, `COMPLETED`, `PARTIAL_FAILED`, `FAILED`
- `totalItems` (integer, required) — Number of staged items.
- `quotaReserved` (integer, required) — Slots permanently reserved when dispatch was admitted.
- `statistics` (BoletoChargeBatchStatistics, required) — Current generation progress and payment conversion.
- `createdAt` (datetime, required) — Draft creation instant, in UTC.
- `updatedAt` (datetime, required) — Last persisted batch/statistics update, in UTC.
- `dispatchedAt` (datetime, optional, nullable) — Instant quota was reserved and the batch was queued.
- `completedAt` (datetime, optional, nullable) — Instant every issuance attempt reached an outcome.

### ErrorResponsePartner

Raw error from the settlement bank, when the failure came from it. Diagnostic only.

- `code` (string, optional)
- `message` (string, optional)
- `field` (string, optional) — Field the partner pointed at, when any.

### BoletoChargeBatchStatistics

Current generation progress and payment conversion.

- `generation` (BoletoChargeBatchGenerationStats, required) — Issuance-attempt progress for the batch.
- `payment` (BoletoChargeBatchPaymentStats, required) — Payment conversion across generated boletos. Failed issuance items are excluded from every denominator.

### BoletoChargeBatchGenerationStats

Issuance-attempt progress for the batch.

- `total` (integer, required) — Total items in the batch.
- `pending` (integer, required) — Items not yet started.
- `processing` (integer, required) — Items whose issuance attempt is running.
- `issued` (integer, required) — Items for which the settlement bank generated a boleto.
- `failed` (integer, required) — Items whose issuance attempt ended without a generated boleto.
- `progressPercentage` (double, required) — `(issued + failed) / total × 100`; zero when total is zero.

### BoletoChargeBatchPaymentStats

Payment conversion across generated boletos. Failed issuance items are excluded from every denominator.

- `issued` (integer, required) — Generated boletos, the conversion denominator.
- `paid` (integer, required) — Issued boletos already settled.
- `unpaid` (integer, required) — Issued boletos not yet settled.
- `overdue` (integer, required) — Issued and unpaid boletos currently overdue.
- `paidAmount` (double, required) — Sum actually paid in BRL.
- `conversionRate` (double, required) — `paid / issued × 100`; zero when issued is zero.

## Examples

**Response**

```json
{
  "items": [
    {
      "batchId": "bcb_01J8Y7C8D9E0F1G2H3J4",
      "name": "Cobranças de setembro",
      "status": "PARTIAL_FAILED",
      "totalItems": 3,
      "quotaReserved": 3,
      "statistics": {
        "generation": {
          "total": 3,
          "pending": 0,
          "processing": 0,
          "issued": 2,
          "failed": 1,
          "progressPercentage": 100
        },
        "payment": {
          "issued": 2,
          "paid": 1,
          "unpaid": 1,
          "overdue": 0,
          "paidAmount": 150.75,
          "conversionRate": 50
        }
      },
      "createdAt": "2026-09-24T14:08:12Z",
      "updatedAt": "2026-09-24T14:12:40Z",
      "dispatchedAt": "2026-09-24T14:10:00Z",
      "completedAt": "2026-09-24T14:12:40Z"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalItems": 1,
  "totalPages": 1,
  "hasNext": false
}
```

**SDK Code**

```python Boleto Charge_listBoletoChargeBatches_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches"

headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript Boleto Charge_listBoletoChargeBatches_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches';
const options = {
  method: 'GET',
  headers: {'X-Tenant-Id': 'X-Tenant-Id', Authorization: 'Bearer <token>'}
};

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

```go Boleto Charge_listBoletoChargeBatches_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches"

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

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	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 Boleto Charge_listBoletoChargeBatches_example
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches")

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

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

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

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

HttpResponse<String> response = Unirest.get("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp Boleto Charge_listBoletoChargeBatches_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Boleto Charge_listBoletoChargeBatches_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches")! 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()
```