## Send a requested batch to trade again at once (hr:work:billing)

`POST /api/hr/v1/work-batches/{id}/send`

Module: HR · operationId: `sendWorkBatch` · Tag: Work billing · Auth: access token (`Authorization: Bearer <accessToken>`)

Only a `requested` batch (`409 batch_state`); without trade `503 trade_unavailable`.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |

### Responses

- **200** The batch after the attempt (`application/json`)
- **404** Error (`application/json`)
- **409** Error (`application/json`)
- **503** Error (`application/json`)

Fields of the 200 answer:

- `billableMinutes` (integer): Hourly minutes (flat-rate entries are not counted)
- `contractId` (string): Trade contract of contract batches
- `createdAt` (string (date-time)): When the batch was created
- `customerId` (string): Customer (masterdata address id) of contract and customer batches
- `entryCount` (integer): Number of entries in the batch
- `grossTotal` (number, nullable): Gross total of trade's invoice
- `id` (string (uuid)): Id of the batch
- `invoiceNumber` (string): Given by trade on release
- `invoicedOn` (string (date), nullable): Date of the invoice (YYYY-MM-DD) once released
- `label` (string): Names the unit on the invoice and in lists
- `lastError` (string): Why the last send failed (German)
- `netAmount` (number): Net amount HR computed
- `netTotal` (number, nullable): Net total of trade's invoice
- `periodFrom` (string (date)): First work day of the period (YYYY-MM-DD)
- `periodTo` (string (date)): Last work day of the period (YYYY-MM-DD)
- `projectRef` (string): Reference of the project (project batches)
- `requestedAt` (string (date-time)): When the batch was requested
- `requestedBy` (string): Who requested it (e-mail)
- `scope` (string): Billing unit of the batch (one of `project`, `contract`, `customer`)
- `sendAttempts` (integer): Attempts to send the draft to trade
- `state` (string): requested → drafted (trade holds the draft) → invoiced; discarded: the draft was deleted, the entries are free again (one of `requested`, `drafted`, `invoiced`, `discarded`)
- `tradeTransactionId` (string): Id of trade's document
- `updatedAt` (string (date-time)): When the batch was last changed
- `version` (integer): Version for optimistic locking: send the version you read with a change (stale: 409 version_conflict)

Example 200 answer:

```json
{
  "billableMinutes": 270,
  "createdAt": "2026-11-03T10:15:00Z",
  "customerId": "1b3d5f7b-9d1f-4b3d-8f5b-9d1f3b5d7f50",
  "entryCount": 2,
  "grossTotal": null,
  "id": "1f3b5d7f-9b1d-4f3b-8d7f-9b1d3f5b7d61",
  "invoiceNumber": "",
  "invoicedOn": null,
  "label": "Kanzlei Hofmann \u0026 Partner",
  "lastError": "",
  "netAmount": 427.5,
  "netTotal": null,
  "periodFrom": "2026-10-01",
  "periodTo": "2026-10-31",
  "requestedAt": "2026-11-03T10:15:00Z",
  "requestedBy": "christina.adler@muster-it.example",
  "scope": "customer",
  "sendAttempts": 1,
  "state": "drafted",
  "tradeTransactionId": "3b5d7f9b-1d3f-4b5d-9f9b-1d3f5b7d9f62",
  "updatedAt": "2026-11-03T10:15:04Z",
  "version": 2
}
```

### Example request

```bash
curl -X POST 'https://api.mbcom.cloud/api/hr/v1/work-batches/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/send' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
