Batch
POST /v1/batch
Section titled “POST /v1/batch”Built for migration. Each operation runs in its own transaction — partial success per operation; scopes are checked PER operation. Payments book on IdempotencyKey:index.
Request body fields 3
| Field | Type | Required | Description |
|---|---|---|---|
operations | object[] | Yes | Field in the request payload. |
operations[].op | string | Yes | Field in the request payload. |
operations[].params | any | Yes | Field in the request payload. |
Request exampleapplication/json
curl -X POST https://api.rieckflow.com/v1/batch \ -H "Authorization: Bearer $RIECK_API_KEY" \ -H "Idempotency-Key: order-2041" \ -H "Content-Type: application/json" \ -d '{ "operations": [ { "op": "customer.create", "params": "…" } ] }'const svar = await rieck.request("POST", "/v1/batch", { body: { "operations": [ { "op": "customer.create", "params": "…" } ] },});{ "data": { "results": [ { "index": 0, "op": "customer.create", "status": 201, "data": { "id": "467a0d8d-b9b2-4df3-bf7b-17d649442890" } } ] }, "meta": { "total": 1, "succeeded": 1, "failed": 0 }}200 Success envelopeapplication/json
Possible errors 8
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_idempotency_key | Idempotency-Key is missing or malformed. |
| 400 | invalid_request | The request body or parameter failed validation. |
| 401 | invalid_api_key | The API key is missing, invalid, expired or revoked. |
| 403 | api_not_included | The organisation’s plan does not include API access. |
| 409 | idempotency_conflict | The same key was used with a different request. |
| 409 | idempotency_in_progress | The same operation is currently being processed. Retry later. |
| 413 | payload_too_large | The JSON or uploaded file exceeds this endpoint’s size limit. |
| 429 | rate_limited | The organisation’s rate budget is exhausted. |
Request body — fuldt JSON Schema
{ "type": "object", "properties": { "operations": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "op": { "type": "string", "enum": [ "customer.create", "invoice.create", "payment.register" ] }, "params": {} }, "required": [ "op", "params" ], "additionalProperties": false } } }, "required": [ "operations" ], "additionalProperties": false}