> For the complete documentation index, see [llms.txt](https://docs.delos.financial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.delos.financial/batchservice/commit-batch.md).

# Commit Batch

Starts processing a batch. The platform reads `manifest.json` from the root of the batch prefix, accepts it and moves the batch from `OPEN` or `CHANGE_REQUESTED` to `CLOSED`. Row validation, customer creation and submission for review then run **asynchronously**.

Before the state changes, the platform checks the manifest envelope. If `manifest.json` is missing or too large, is not valid JSON, has trailing content, contains no items, has more than **10,000 rows**, or carries a `schema_version` from another batch, the commit is rejected with `422`. The batch stays editable and nothing is processed.

Errors inside individual rows do **not** block the commit: those rows become `invalid` and all other rows are processed.

**Endpoint**

`POST /v2/compliance/batch/{batch_id}/commit`

**Link**

<https://partner.sandbox.delos.financial/openapi/v2.html#/operations/BatchService_CommitBatch>

**Request**

**Path Parameters**

| Parameter      | Type     | Description                        | Required | Example                                  |
| -------------- | -------- | ---------------------------------- | -------- | ---------------------------------------- |
| **`batch_id`** | `string` | Batch ID returned by Create Batch. | Yes      | `"01a0af8b-831f-7dbe-8eaf-459f81998958"` |

**Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `<JWT>`            | Yes      |
| `Accept`        | `application/json` | Yes      |

**Body**

No request body.

**Response (202 Accepted)**

The manifest was accepted and processing has started. Returns the `Batch` object. See Create Batch → Response Fields for every field and the `counters` object.

**Response (200 OK)** — the batch was already `CLOSED`: a repeated or concurrent commit returns the batch without accepting its own manifest. The manifest accepted by the first successful commit is the one being processed.

**Example Response:**

```json
{
  "batch_id": "01a0af8b-831f-7dbe-8eaf-459f81998958",
  "status": "CLOSED",
  "schema_version": "string",
  "types": [
    "individual",
    "company"
  ],
  "individual_kyc_level": "string",
  "company_kyc_level": "string",
  "party_kyc_levels": [
    "string"
  ],
  "counters": {
    "total": 120,
    "draft": 0,
    "valid": 0,
    "invalid": 3,
    "creating": 2,
    "submitted": 85,
    "finished": 24,
    "change_requested": 4,
    "rejected": 1,
    "failed": 1
  },
  "processed": false,
  "done": false,
  "created_at": "2026-09-28T10:15:30Z",
  "committed_at": "2026-09-28T11:02:04Z",
  "error": ""
}
```

Right after the commit, counters may still be `0`: rows appear in the counters as the platform ingests and validates the manifest.

***

**Examples**

**Request**

```bash
curl --request POST \
  --url <https://partner.sandbox.delos.financial/v2/compliance/batch/01a0af8b-831f-7dbe-8eaf-459f81998958/commit> \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <JWT>'
```

***

**Error Responses**

Errors are returned as `{"code", "message", "details"}`, where `code` is a gRPC status code. Use the HTTP status for error handling.

**Batch Cannot Be Committed (409)** — the batch is `CANCELLED`, or a newer editable version of the batch exists. Check the batch status before retrying:

```json
{ "code": 10, "message": "batch cannot be committed from its current state", "details": [] }
```

**Manifest Rejected (422)** — missing, oversized, malformed or trailing JSON, empty `items`, too many rows, or a foreign `schema_version`. The batch stays editable:

```json
{ "code": 3, "message": "manifest.json is not valid JSON", "details": [] }
```

**Batch Not Found (404)** — the batch does not exist or belongs to another partner:

```json
{ "code": 5, "message": "batch not found", "details": [] }
```

**Authorization fail (401)**:

```json
{ "code": 16, "message": "Unauthorized", "details": [] }
```

***

**Notes**

* **Upload everything first**: all documents and the final `manifest.json` must be fully uploaded before you commit.
* **Serialize uploads and commits**: do not upload files and commit in parallel, and do not send several commits at once.
* **Do not touch the manifest after commit**: the platform verifies the content of the accepted manifest; if it has been overwritten, processing stops. To change data, call Request Batch Changes first.
* **`schema_version`**: optional in the manifest. If omitted or empty, the batch's frozen schema is used.
* **Retries**: if the commit request timed out, call Get Batch before retrying. A `CLOSED` batch means the commit went through.

**Typical Workflow**:

1. Upload documents and `manifest.json` to the batch prefix.
2. Call `POST /v2/compliance/batch/{batch_id}/commit`.
3. On `422`, fix the manifest, upload it again and repeat step 2.
4. On `202`, poll Get Batch until `processed` is `true`.
5. Review problems with Get Batch Status.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.delos.financial/batchservice/commit-batch.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
