{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-global-bulk-response-item-schema.json",
  "title": "_global.bulk.ResponseItem",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastic-document-api-openapi.yml#/components/schemas/_global.bulk.ResponseItem",
  "type": "object",
  "properties": {
    "_id": {
      "description": "The document ID associated with the operation.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": [
            "string",
            "null"
          ]
        }
      ]
    },
    "_index": {
      "description": "The name of the index associated with the operation.\nIf the operation targeted a data stream, this is the backing index into which the document was written.",
      "type": "string"
    },
    "status": {
      "description": "The HTTP status code returned for the operation.",
      "type": "number"
    },
    "failure_store": {
      "allOf": [
        {
          "$ref": "#/$defs/_global.bulk.FailureStoreStatus"
        }
      ]
    },
    "error": {
      "description": "Additional information about the failed operation.\nThe property is returned only for failed operations.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.ErrorCause"
        }
      ]
    },
    "_primary_term": {
      "description": "The primary term assigned to the document for the operation.\nThis property is returned only for successful operations.",
      "type": "number"
    },
    "result": {
      "description": "The result of the operation.\nSuccessful values are `created`, `deleted`, and `updated`.",
      "type": "string"
    },
    "_seq_no": {
      "description": "The sequence number assigned to the document for the operation.\nSequence numbers are used to ensure an older version of a document doesn't overwrite a newer version.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.SequenceNumber"
        }
      ]
    },
    "_shards": {
      "description": "Shard information for the operation.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.ShardStatistics"
        }
      ]
    },
    "_version": {
      "description": "The document version associated with the operation.\nThe document version is incremented each time the document is updated.\nThis property is returned only for successful actions.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.VersionNumber"
        }
      ]
    },
    "forced_refresh": {
      "type": "boolean"
    },
    "get": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.InlineGetDictUserDefined"
        }
      ]
    }
  },
  "required": [
    "_index",
    "status"
  ],
  "$defs": {
    "_global.bulk.FailureStoreStatus": {
      "type": "string",
      "enum": [
        "not_applicable_or_unknown",
        "used",
        "not_enabled",
        "failed"
      ]
    },
    "_types.ErrorCause": {
      "description": "Cause and details about a request failure. This class defines the properties common to all error types.\nAdditional details are also provided, that depend on the error type.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of error",
          "type": "string"
        },
        "reason": {
          "description": "A human-readable explanation of the error, in English.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "stack_trace": {
          "description": "The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.",
          "type": "string"
        },
        "caused_by": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.ErrorCause"
            }
          ]
        },
        "root_cause": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ErrorCause"
          }
        },
        "suppressed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ErrorCause"
          }
        }
      },
      "required": [
        "type"
      ]
    },
    "_types.IndexName": {
      "type": "string"
    },
    "_types.InlineGetDictUserDefined": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "found": {
          "type": "boolean"
        },
        "_seq_no": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.SequenceNumber"
            }
          ]
        },
        "_primary_term": {
          "type": "number"
        },
        "_routing": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.Routing"
            }
          ]
        },
        "_source": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        }
      },
      "required": [
        "found"
      ]
    },
    "_types.Routing": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "_types.SequenceNumber": {
      "type": "number"
    },
    "_types.ShardFailure": {
      "type": "object",
      "properties": {
        "index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "node": {
          "type": "string"
        },
        "reason": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.ErrorCause"
            }
          ]
        },
        "shard": {
          "type": "number"
        },
        "status": {
          "type": "string"
        },
        "primary": {
          "type": "boolean"
        }
      },
      "required": [
        "reason"
      ]
    },
    "_types.ShardStatistics": {
      "type": "object",
      "properties": {
        "failed": {
          "description": "The number of shards the operation or search attempted to run on but failed.",
          "allOf": [
            {
              "$ref": "#/$defs/_types.uint"
            }
          ]
        },
        "successful": {
          "description": "The number of shards the operation or search succeeded on.",
          "allOf": [
            {
              "$ref": "#/$defs/_types.uint"
            }
          ]
        },
        "total": {
          "description": "The number of shards the operation or search will run on overall.",
          "allOf": [
            {
              "$ref": "#/$defs/_types.uint"
            }
          ]
        },
        "failures": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ShardFailure"
          }
        },
        "skipped": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.uint"
            }
          ]
        }
      },
      "required": [
        "failed",
        "successful",
        "total"
      ]
    },
    "_types.VersionNumber": {
      "type": "number"
    },
    "_types.uint": {
      "type": "number"
    }
  }
}