Skip to main content
POST
Process batch document update

Task status in the response

Send the task’s status as statusSlug on the task object. The task echoed back in the response carries it under the same name, matching the Task model everywhere else in the API, so a client can apply the returned task directly to its local copy.
The legacy statusId key is no longer emitted in the batch response. Integrations that read the task status from this endpoint must read statusSlug.

Completing a task with a discarded save

When the batch moves the task to a status of type DONE, the platform first checks the task’s documents. If the most recent saved changes for one of them were discarded server-side and never redone, the request is refused with 409 Conflict and no part of the batch is applied — the status change, the queued document uploads, the label changes and the deletes are all rolled back together. The message names the affected documents by path (or by ID when a document has no path):
To clear the block, reopen each document the message names, redo the changes, and save again. A successful re-save — or any full-document save — releases it and the batch completes normally.
Uploads sent in the same batch as the completion are queued before the check runs, so saving and completing in one request is not blocked by that request’s own save. Only the latest save per document counts, so a failure that has already been redone and saved does not block completion. Batches that leave the task’s status unchanged, or move it to a status of any other type, are unaffected.
This endpoint also returns 409 Conflict for a stale changeSequence on the task; the two cases share the CONFLICT code and are distinguished by the message.

Authorizations

x-api-key
string
header
required

API key for authentication. Create one from the Kodexa platform UI under Settings > Access Tokens.

Body

A batch update request containing multiple document operations to be processed atomically.

contentObjectUploads
object

Content object file uploads to add to document families.

deletes
object

Document families to delete.

documentFamilyIds
string[]

IDs of document families to include in the batch.

labelUpdates
object

Label additions and removals.

projectId
string

ID of the project containing the document families.

task
object

Optional task data to associate with the batch update.

userWorkSession
object

Optional client-supplied work-session context. The UI captures startedAt when the user opens a task and sends it back on save so the server can record how long the user spent on this work for time-allocation analytics.

Response

Batch update result

Response from a batch update operation, containing results for each document family.

contentObjectUpdates
object[]

Results for each content object upload.

task
object

Updated task data, if a task was included in the batch.