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

# Add items to a draft Boleto Charge batch

PUT https://tenant.api.corpx.com/v1/accounts/{accountId}/boleto/charge/batches/{batchId}/items
Content-Type: application/json

Atomically appends 1–50 JSON items to a `DRAFT` batch. Every item uses
the same request shape as single issuance and therefore requires its
own `identifier`. A batch can contain at most 5,000 items.

Validation or an identifier conflict rejects the entire chunk: no item
from that request is stored. Adding items consumes no issuance quota.


Reference: https://en.docs.api.corpx.com/baas/referencia/boleto-charge/add-boleto-charge-batch-items

## 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.
- `batchId` (string, required) — Boleto Charge batch identifier returned by the create endpoint.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, optional) — Optional client-generated idempotency token (recommended for safe retries).

### Body (application/json)

This endpoint expects an object.

- `items` (list of BoletoChargeCreateRequest, required) — Atomic chunk of boleto issuance requests.

## Response

### 200

Entire chunk appended

- `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.
- `items` (list of BoletoChargeBatchItem, required) — Current page of staged items and issuance results.
- `page` (integer, required) — Current item page.
- `pageSize` (integer, required) — Requested item page size.
- `totalPages` (integer, required) — Number of item pages.
- `hasNext` (boolean, required) — Whether another item page exists.
- `dispatchedAt` (datetime, optional, nullable) — Instant quota was reserved and the batch was queued.
- `completedAt` (datetime, optional, nullable) — Instant every issuance attempt reached an outcome.

## Errors

### 400 Bad Request Error

`boleto_charge_batch_chunk_invalid` when the request does not have 1–50 items; `boleto_charge_batch_too_large` when it would take the batch above 5,000.

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

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

### 404 Not Found Error

`boleto_charge_batch_not_found`.

- `any`

### 409 Conflict Error

`boleto_charge_batch_not_editable` when the batch is no longer a draft; `boleto_charge_batch_item_conflict` when an identifier conflicts with this batch/account.

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

### 422 Unprocessable Entity Error

An item failed boleto-field validation (`invalid_batch_item`).

- `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

### BoletoChargeCreateRequest

One boleto issuance request. `identifier` is required and is the sole idempotency key for this account; `Idempotency-Key` is not a fallback.

- `identifier` (string, required) — Caller-owned idempotency key, unique per account.
- `dueDate` (date, required) — Due date, YYYY-MM-DD.
- `amount` (BoletoChargeCreateRequestAmount, required) — Face amount of the boleto.
- `payer` (BoletoChargeCreateRequestPayer, required) — Who must pay the boleto.
- `issueDate` (date, optional) — Issue date, YYYY-MM-DD. dueDate cannot be before it.
- `interest` (BoletoChargeFee, optional) — Interest or fine. startDate, when set, must be after dueDate.
- `fine` (BoletoChargeFee, optional) — Interest or fine. startDate, when set, must be after dueDate.
- `discount` (BoletoChargeCreateRequestDiscount, optional) — Early-payment discount. Each groups[].limitDate must be before dueDate.
- `abatement` (BoletoChargeCreateRequestAbatement, optional) — Fixed abatement. Together with discounts it must not reach amount.nominal.
- `allowPartialPayment` (boolean, optional) — Accept a payment below the amount.
- `allowDivergentPayment` (boolean, optional) — Accept an amount other than the face value, within min and max.
- `divergentPaymentMode` (enum, optional) — How a divergent payment is bounded.
  - Allowed values: `anyValue`, `minMax`, `minOnly`
- `minPaymentAmount` (double, optional) — Minimum accepted payment when divergent payment is on. Not greater than maxPaymentAmount.
- `maxPaymentAmount` (double, optional) — Maximum accepted payment when divergent payment is on.
- `expirationPolicy` (BoletoChargeCreateRequestExpirationPolicy, optional) — How long the boleto can be paid. There is no write-off of an open boleto; paymentLimitDate is how you bound validity.

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

### BoletoChargeBatchItem

One staged issuance request and its eventual result.

- `itemId` (string, required) — Batch-local item identifier used by the delete route.
- `position` (integer, required) — Stable order of this item inside the batch.
- `identifier` (string, required) — Required account-wide idempotency identifier from the request.
- `status` (enum, required) — Current item issuance state.
  - Allowed values: `PENDING`, `PROCESSING`, `ISSUED`, `FAILED`
- `request` (BoletoChargeCreateRequest, required) — One boleto issuance request. `identifier` is required and is the sole idempotency key for this account; `Idempotency-Key` is not a fallback.
- `createdAt` (datetime, required) — Item staging instant, in UTC.
- `updatedAt` (datetime, required) — Last item/result update, in UTC.
- `error` (BoletoChargeBatchItemError, optional) — Failure recorded for an item that did not produce a boleto.
- `charge` (BoletoChargeBatchItemCharge, optional) — Local mirror snapshot for a successfully issued batch item.

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

### BoletoChargeCreateRequestAmount

Face amount of the boleto.

- `nominal` (double, required) — Face amount in BRL, greater than zero. Two decimal places, never cents-as-integer.
- `currency` (enum, optional, default: BRL) — Currency. Always BRL.
  - Allowed values: `BRL`

### BoletoChargeCreateRequestPayer

Who must pay the boleto.

- `name` (string, required) — Payer name.
- `personType` (enum, required) — person for CPF, company for CNPJ.
  - Allowed values: `person`, `company`
- `taxNumber` (string, required) — CPF when personType is person, CNPJ when company. Digits only.
- `email` (string, optional) — Payer email.
- `addressStreet` (string, optional) — Street.
- `addressNumber` (string, optional) — Street number.
- `addressComplement` (string, optional) — Complement.
- `addressDistrict` (string, optional) — District.
- `addressCity` (string, optional) — City.
- `addressState` (string, optional) — State, two letters.
- `addressZipCode` (string, optional) — ZIP code, 8 digits.

### BoletoChargeFee

Interest or fine. startDate, when set, must be after dueDate.

- `calculationModel` (enum, optional) — Which institution computes the amounts before and after dueDate. Optional.
  - Allowed values: `receiver-calculates-all`, `recipient-calculates-overdue`, `recipient-calculates-all`
- `typeId` (integer, optional) — Optional. Filled from typeKey when omitted; when sent, it must match typeKey.
- `typeKey` (string, optional) — Fee type. Interest: `exempt`, `fixed-value-calendar-day`, `fixed-value-business-day`, `percentage-calendar-day`, `percentage-business-day`, `percentage-month-calendar-day`, `percentage-month-business-day`, `percentage-year-calendar-day`, `percentage-year-business-day`. Fine: `exempt`, `fixed-value`, `percentage`. Any other value returns 400 `invalid_payload`.
- `value` (double, optional) — Amount in BRL, or a percent when typeKey says percentage. Required and greater than zero unless typeKey is exempt.
- `startDate` (date, optional) — First day the fee applies, YYYY-MM-DD, after dueDate.

### BoletoChargeCreateRequestDiscount

Early-payment discount. Each groups[].limitDate must be before dueDate.

- `calculationModel` (enum, optional) — Which institution computes the discount. Optional.
  - Allowed values: `receiver-calculates-all`, `recipient-calculates-overdue`, `recipient-calculates-all`
- `groups` (list of BoletoChargeCreateRequestDiscountGroupsItems, optional) — Discount steps.

### BoletoChargeCreateRequestAbatement

Fixed abatement. Together with discounts it must not reach amount.nominal.

- `amount` (double, optional) — Abatement in BRL, not negative.

### BoletoChargeCreateRequestExpirationPolicy

How long the boleto can be paid. There is no write-off of an open boleto; paymentLimitDate is how you bound validity.

- `allowPaymentAfterDueDate` (boolean, optional) — Whether payment is accepted after dueDate.
- `paymentLimitDate` (date, optional) — Last day payment is accepted, YYYY-MM-DD, not before dueDate.
- `blockPaymentAfterLimit` (boolean, optional) — Reject payment after paymentLimitDate.
- `decursoGraceDays` (integer, optional) — Grace days after the payment limit.

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

### BoletoChargeBatchItemError

Failure recorded for an item that did not produce a boleto.

- `errorCode` (string, required) — Stable machine-readable failure code.
- `message` (string, required) — Human-readable diagnostic; do not branch on it.

### BoletoChargeBatchItemCharge

Local mirror snapshot for a successfully issued batch item.

- `chargeId` (string, required) — Settlement-bank boleto identifier.
- `identifier` (string, required) — Caller-owned identifier.
- `status` (string, required) — Current mirrored boleto status.
- `registrationCondition` (string, required) — Current mirrored central-registration condition.
- `barcode` (string, required) — Barcode, when available.
- `digitableLine` (string, required) — Digitable line, when available.
- `ourNumber` (string, required) — Our number at the settlement bank.
- `amount` (BoletoChargeBatchItemChargeAmount, required) — Mirrored issuance and payment amounts in BRL.
- `updatedAt` (datetime, optional) — Last successful mirror synchronization.

### BoletoChargeCreateRequestDiscountGroupsItems

- `sequence` (integer, optional) — Step order, starting at 1.
- `typeId` (integer, optional) — Optional. Filled from typeKey when omitted; when sent, it must match typeKey.
- `typeKey` (string, optional) — Discount type: `exempt`, `fixed-value-until-date`, `percentage-until-date`, `fixed-value-anticipation-calendar-day`, `fixed-value-anticipation-business-day`, `percentage-anticipation-calendar-day`, `percentage-anticipation-business-day`. `-until-date` types require limitDate; anticipation types must not send it.
- `value` (double, optional) — Discount amount in BRL, or a percent when typeKey says percentage.
- `limitDate` (date, optional) — Last day this step applies, YYYY-MM-DD, before dueDate. Only for `-until-date` types.

### BoletoChargeBatchItemChargeAmount

Mirrored issuance and payment amounts in BRL.

- `nominal` (double, optional) — Face amount.
- `updatedAmount` (double, optional) — Current amount after charges/reductions.
- `paid` (double, optional) — Amount already paid.
- `currency` (string, optional) — Currency, normally BRL.

## Examples

**Request**

```json
{
  "items": [
    {
      "identifier": "pedido-1001",
      "dueDate": "2026-10-23",
      "amount": {
        "nominal": 150.75,
        "currency": "BRL"
      },
      "payer": {
        "name": "Maria da Silva",
        "personType": "person",
        "taxNumber": "52998224725"
      }
    },
    {
      "identifier": "pedido-1002",
      "dueDate": "2026-10-24",
      "amount": {
        "nominal": 89.9,
        "currency": "BRL"
      },
      "payer": {
        "name": "Empresa Exemplo Ltda",
        "personType": "company",
        "taxNumber": "12345678000190"
      }
    }
  ]
}
```

**Response**

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

**SDK Code**

```python Boleto Charge_addBoletoChargeBatchItems_example
import requests

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

payload = { "items": [
        {
            "identifier": "pedido-1001",
            "dueDate": "2026-10-23",
            "amount": {
                "nominal": 150.75,
                "currency": "BRL"
            },
            "payer": {
                "name": "Maria da Silva",
                "personType": "person",
                "taxNumber": "52998224725"
            }
        },
        {
            "identifier": "pedido-1002",
            "dueDate": "2026-10-24",
            "amount": {
                "nominal": 89.9,
                "currency": "BRL"
            },
            "payer": {
                "name": "Empresa Exemplo Ltda",
                "personType": "company",
                "taxNumber": "12345678000190"
            }
        }
    ] }
headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Boleto Charge_addBoletoChargeBatchItems_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches/batchId/items';
const options = {
  method: 'PUT',
  headers: {
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"items":[{"identifier":"pedido-1001","dueDate":"2026-10-23","amount":{"nominal":150.75,"currency":"BRL"},"payer":{"name":"Maria da Silva","personType":"person","taxNumber":"52998224725"}},{"identifier":"pedido-1002","dueDate":"2026-10-24","amount":{"nominal":89.9,"currency":"BRL"},"payer":{"name":"Empresa Exemplo Ltda","personType":"company","taxNumber":"12345678000190"}}]}'
};

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

```go Boleto Charge_addBoletoChargeBatchItems_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"items\": [\n    {\n      \"identifier\": \"pedido-1001\",\n      \"dueDate\": \"2026-10-23\",\n      \"amount\": {\n        \"nominal\": 150.75,\n        \"currency\": \"BRL\"\n      },\n      \"payer\": {\n        \"name\": \"Maria da Silva\",\n        \"personType\": \"person\",\n        \"taxNumber\": \"52998224725\"\n      }\n    },\n    {\n      \"identifier\": \"pedido-1002\",\n      \"dueDate\": \"2026-10-24\",\n      \"amount\": {\n        \"nominal\": 89.9,\n        \"currency\": \"BRL\"\n      },\n      \"payer\": {\n        \"name\": \"Empresa Exemplo Ltda\",\n        \"personType\": \"company\",\n        \"taxNumber\": \"12345678000190\"\n      }\n    }\n  ]\n}")

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

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

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

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

request = Net::HTTP::Put.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"items\": [\n    {\n      \"identifier\": \"pedido-1001\",\n      \"dueDate\": \"2026-10-23\",\n      \"amount\": {\n        \"nominal\": 150.75,\n        \"currency\": \"BRL\"\n      },\n      \"payer\": {\n        \"name\": \"Maria da Silva\",\n        \"personType\": \"person\",\n        \"taxNumber\": \"52998224725\"\n      }\n    },\n    {\n      \"identifier\": \"pedido-1002\",\n      \"dueDate\": \"2026-10-24\",\n      \"amount\": {\n        \"nominal\": 89.9,\n        \"currency\": \"BRL\"\n      },\n      \"payer\": {\n        \"name\": \"Empresa Exemplo Ltda\",\n        \"personType\": \"company\",\n        \"taxNumber\": \"12345678000190\"\n      }\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.put("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches/batchId/items")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"items\": [\n    {\n      \"identifier\": \"pedido-1001\",\n      \"dueDate\": \"2026-10-23\",\n      \"amount\": {\n        \"nominal\": 150.75,\n        \"currency\": \"BRL\"\n      },\n      \"payer\": {\n        \"name\": \"Maria da Silva\",\n        \"personType\": \"person\",\n        \"taxNumber\": \"52998224725\"\n      }\n    },\n    {\n      \"identifier\": \"pedido-1002\",\n      \"dueDate\": \"2026-10-24\",\n      \"amount\": {\n        \"nominal\": 89.9,\n        \"currency\": \"BRL\"\n      },\n      \"payer\": {\n        \"name\": \"Empresa Exemplo Ltda\",\n        \"personType\": \"company\",\n        \"taxNumber\": \"12345678000190\"\n      }\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches/batchId/items', [
  'body' => '{
  "items": [
    {
      "identifier": "pedido-1001",
      "dueDate": "2026-10-23",
      "amount": {
        "nominal": 150.75,
        "currency": "BRL"
      },
      "payer": {
        "name": "Maria da Silva",
        "personType": "person",
        "taxNumber": "52998224725"
      }
    },
    {
      "identifier": "pedido-1002",
      "dueDate": "2026-10-24",
      "amount": {
        "nominal": 89.9,
        "currency": "BRL"
      },
      "payer": {
        "name": "Empresa Exemplo Ltda",
        "personType": "company",
        "taxNumber": "12345678000190"
      }
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp Boleto Charge_addBoletoChargeBatchItems_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches/batchId/items");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"items\": [\n    {\n      \"identifier\": \"pedido-1001\",\n      \"dueDate\": \"2026-10-23\",\n      \"amount\": {\n        \"nominal\": 150.75,\n        \"currency\": \"BRL\"\n      },\n      \"payer\": {\n        \"name\": \"Maria da Silva\",\n        \"personType\": \"person\",\n        \"taxNumber\": \"52998224725\"\n      }\n    },\n    {\n      \"identifier\": \"pedido-1002\",\n      \"dueDate\": \"2026-10-24\",\n      \"amount\": {\n        \"nominal\": 89.9,\n        \"currency\": \"BRL\"\n      },\n      \"payer\": {\n        \"name\": \"Empresa Exemplo Ltda\",\n        \"personType\": \"company\",\n        \"taxNumber\": \"12345678000190\"\n      }\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Boleto Charge_addBoletoChargeBatchItems_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["items": [
    [
      "identifier": "pedido-1001",
      "dueDate": "2026-10-23",
      "amount": [
        "nominal": 150.75,
        "currency": "BRL"
      ],
      "payer": [
        "name": "Maria da Silva",
        "personType": "person",
        "taxNumber": "52998224725"
      ]
    ],
    [
      "identifier": "pedido-1002",
      "dueDate": "2026-10-24",
      "amount": [
        "nominal": 89.9,
        "currency": "BRL"
      ],
      "payer": [
        "name": "Empresa Exemplo Ltda",
        "personType": "company",
        "taxNumber": "12345678000190"
      ]
    ]
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches/batchId/items")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```