> This page is for BaaS.

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

# Delete an item from a draft Boleto Charge batch

DELETE https://tenant.api.corpx.com/v1/accounts/{accountId}/boleto/charge/batches/{batchId}/items/{itemId}

Removes one item while the batch is `DRAFT`. Once dispatch is accepted,
items and their reserved quota are immutable.


Reference: https://docs.api.corpx.com/baas/referencia/boleto-charge/delete-boleto-charge-batch-item

## 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.
- `itemId` (string, required) — Item identifier returned when a chunk is added to the batch.

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

## Response

### 200

Item deleted; current draft and first item page

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

### 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` or `boleto_charge_batch_item_not_found`.

- `any`

### 409 Conflict Error

`boleto_charge_batch_not_editable`.

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

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

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

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

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

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

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

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

## Examples

**Response**

```json
{
  "batchId": "bcb_01J8Y7C8D9E0F1G2H3J4",
  "name": "Cobranças de setembro",
  "status": "DRAFT",
  "totalItems": 99,
  "quotaReserved": 0,
  "statistics": {
    "generation": {
      "total": 99,
      "pending": 99,
      "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:30Z",
  "items": [],
  "page": 1,
  "pageSize": 50,
  "totalPages": 2,
  "hasNext": true
}
```

**SDK Code**

```python Boleto Charge_deleteBoletoChargeBatchItem_example
import requests

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

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

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

print(response.json())
```

```javascript Boleto Charge_deleteBoletoChargeBatchItem_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/boleto/charge/batches/batchId/items/itemId';
const options = {
  method: 'DELETE',
  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_deleteBoletoChargeBatchItem_example
package main

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

func main() {

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

	req, _ := http.NewRequest("DELETE", 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_deleteBoletoChargeBatchItem_example
require 'uri'
require 'net/http'

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

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

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

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

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

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Boleto Charge_deleteBoletoChargeBatchItem_example
using RestSharp;

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

```swift Boleto Charge_deleteBoletoChargeBatchItem_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/batchId/items/itemId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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()
```