5.9.4. Bulk Document Validation and Conflict Errors

The JSON returned by the _bulk_docs operation consists of an array of JSON structures, one for each document in the original submission. The returned JSON structure should be examined to ensure that all of the documents submitted in the original request were successfully added to the database.

The exact structure of the returned information is shown in Table 5.6, “ Bulk Document Response ”.

Table 5.6.  Bulk Document Response

FieldDescription
docs [array] Bulk Docs Returned Documents
        error Error type
        id Document ID
        reason Error string with extended reason

When a document (or document revision) is not correctly comitted to the database because of an error, you should check the error field to determine error type and course of action. Errors will be one of the following type: