Skip to content
On this page

Batch

Batch create/update/send of invoices and bulk resource deletion

Batch create invoices

POST /api/v1/batch/invoices/create

Requires authentication (Bearer token) and the X-Organization-Id header.

API token scope: invoices.create

Creates up to 100 invoices. Each item is held to exactly the rules of POST /api/v1/invoices (tax resolved from the organization defaults, invoice quota checked per item). Partial success: a refused item is listed in errors with its index and the rest are created.

Request body

Field Type Required Description
invoices array yes

Responses

Status Description
201 Batch processed; created lists the created invoices, errors the refused items.
422

Example request

curl -X POST "https://kworia.com/api/v1/batch/invoices/create" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "invoices": []
}'

Batch send invoices

POST /api/v1/batch/invoices/send

Requires authentication (Bearer token) and the X-Organization-Id header.

API token scope: invoices.send

Sends multiple invoices via email and/or PEPPOL e-invoicing network. Supports partial failures - some invoices may succeed while others fail.

Request body

Field Type Required Description
method string no
message string no
attach_pdf boolean no
invoice_ids array yes
peppol_recipient object no

Responses

Status Description
200 For non-paginated data, return as before
422

Example request

curl -X POST "https://kworia.com/api/v1/batch/invoices/send" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "string",
    "message": "string",
    "attach_pdf": true,
    "invoice_ids": [],
    "peppol_recipient": {}
}'

Batch update invoices

POST /api/v1/batch/invoices/update

Requires authentication (Bearer token) and the X-Organization-Id header.

API token scope: invoices.update.any

Updates up to 100 invoices. Each item's data is held to exactly the rules of PUT /api/v1/invoices/{id} and applied through the same service, so locked or issued invoices are refused and totals are recomputed. Partial success: refused items are listed in errors.

Request body

Field Type Required Description
updates array yes

Responses

Status Description
200 Batch processed; updated lists the updated invoices, errors the refused items.
422

Example request

curl -X POST "https://kworia.com/api/v1/batch/invoices/update" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "updates": []
}'

Batch delete resources

DELETE /api/v1/batch/resources

Requires authentication (Bearer token) and the X-Organization-Id header.

API token scope: one of invoices.delete, quotes.delete, expenses.delete, customers.delete

Deletes up to 100 invoices, quotes, expenses or customers of the organization, with the same rules as the single delete (e.g. a billed expense is refused). Partial success: refused ids are listed in errors.

Parameters

Name In Type Required Description
resource query string yes
ids[] query array yes

Responses

Status Description
200 Batch processed; deleted lists the deleted ids, errors the refused ones.
422

Example request

curl -X DELETE "https://kworia.com/api/v1/batch/resources" \
  -H "Authorization: Bearer {{access_token}}" \
  -H "X-Organization-Id: {{organization_id}}" \
  -H "Accept: application/json"