> Documentation index: https://beezr.io/developers/api/llms.txt

# Update up to 100 records

`POST /api/v1/records/bulk_update`

Applies each update in order. Items succeed or fail independently; failed items are listed in `failures` with their id.

## Requirements

| Requirement | Value |
| --- | --- |
| Auth | `X-API-Key` |
| Counts as | 1 request |
| Idempotency | not supported |
| Batch limit | up to 100 |

## Headers

| Parameter | Type | Presence | Description |
| --- | --- | --- | --- |
| `X-API-Key` | string | required | Read from your server environment. |
| `Content-Type` | string | required | `application/json`. |

## Body parameters

| Parameter | Type | Presence | Description |
| --- | --- | --- | --- |
| `module` | string | required | The module's table name, shown under the module name on its card in Beezr Designer (for example `cm_equipment_requests_base`). |
| `updates` | array of object | required | 1–100 items. |
| `updates[].id` | integer | required | Minimum 1. |
| `updates[].data` | object | required | Field values keyed by each field's System name (Designer → module → Fields). Lookup, relation and user fields take the id of the chosen item. File fields take a FileUpload object (or an array for multi-file fields). Fields not in the module are ignored.  |

## Returns

HTTP 200. Processed. Check `failed` and `failures`.

| Parameter | Type | Presence | Description |
| --- | --- | --- | --- |
| `success` | boolean | optional | — |
| `data` | object | optional | — |
| `data.total` | integer | optional | — |
| `data.updated` | integer | optional | — |
| `data.failed` | integer | optional | — |
| `data.records` | array of object | optional | — |
| `data.records[].id` | integer | optional | — |
| `data.failures` | array of object | optional | — |
| `data.failures[].index` | integer | optional | Position in dataList (bulk create) |
| `data.failures[].id` | integer | optional | Record id (bulk update and delete) |
| `data.failures[].data` | object | optional | — |
| `data.failures[].error` | string | optional | — |

Field values come back in the same form the Designer shows them.

## Errors

| HTTP | Code | What to do |
| --- | --- | --- |
| 400 | [`MISSING_REQUIRED_FIELD`](/developers/api/errors/#missing-required-field) | Send the required body fields. |
| 400 | [`INVALID_DATA`](/developers/api/errors/#invalid-data) | Check field System names. |
| 400 | [`KEY_FIELD_UNRESOLVED`](/developers/api/errors/#key-field-unresolved) | Check the module key field. |
| 401 | [`AUTHENTICATION_FAILED`](/developers/api/errors/#authentication-failed) | Check the API key. |
| 404 | [`MODULE_NOT_FOUND`](/developers/api/errors/#module-not-found) | Copy the module table name. |
| 413 | [`PAYLOAD_TOO_LARGE`](/developers/api/errors/#payload-too-large) | Send at most 100 items. |
| 429 | [`RATE_LIMIT_EXCEEDED`](/developers/api/errors/#rate-limit-exceeded) | Wait for the rate-limit reset. |
| 429 | [`TOO_MANY_CONCURRENT_REQUESTS`](/developers/api/errors/#too-many-concurrent-requests) | Wait; keep at most 2 in flight. |
| 429 | [`MONTHLY_QUOTA_EXCEEDED`](/developers/api/errors/#monthly-quota-exceeded) | Stop retries until the 1st. |
| 500 | [`FIELD_LOAD_FAILED`](/developers/api/errors/#field-load-failed) | Retry later. |
| 500 | [`INTERNAL_ERROR`](/developers/api/errors/#internal-error) | Retry later. |

## Request

```curl
curl --fail-with-body --silent --show-error \
  'https://services.beezr.io/generic/api/v1/records/bulk_update' \
  -H "X-API-Key: $BEEZR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "module": "cm_equipment_requests_base",
  "updates": [{"id":482913,"data":{"priority":1}},{"id":482914,"data":{"priority":1}}]
}'
```

```javascript
const response = await fetch("https://services.beezr.io/generic/api/v1/records/bulk_update", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.BEEZR_API_KEY,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "module": "cm_equipment_requests_base",
    "updates": [{"id":482913,"data":{"priority":1}},{"id":482914,"data":{"priority":1}}]
  })
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());
```

```python
import os
import requests

response = requests.post(
    "https://services.beezr.io/generic/api/v1/records/bulk_update",
    headers={"X-API-Key": os.environ["BEEZR_API_KEY"]},
    json={
      "module": "cm_equipment_requests_base",
      "updates": [{"id":482913,"data":{"priority":1}},{"id":482914,"data":{"priority":1}}]
    }
)
response.raise_for_status()
print(response.json())
```

## Success response

```json
{
  "success": true,
  "data": {"total":2,"updated":2,"failed":0,"records":[{"id":482913},{"id":482914}]}
}
```

## Common error

```json
{"success":false,"error":{"code":"AUTHENTICATION_FAILED","message":"Invalid or missing API key"}}
```
