{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citi/json-schema/citi-response-to-request-for-information-schema.json",
  "title": "Response-To-Request-For-Information",
  "description": "Response to Request for Information",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-response-to-request-for-information-api-api-openapi.yml#/components/schemas/Response-To-Request-For-Information",
  "type": "object",
  "properties": {
    "rfi_id": {
      "type": "string",
      "description": "RFI ID.",
      "minLength": 1,
      "maxLength": 100,
      "title": "rfi_id"
    },
    "fieldlevel_requests": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Field-Level-Requests-With-Answers"
      },
      "description": " Field level requests for which response is requested",
      "maxItems": 30,
      "title": "fieldlevel_requests"
    }
  },
  "required": [
    "rfi_id",
    "alert_id",
    "request_data"
  ],
  "$defs": {
    "Field-Details-with-answers": {
      "type": "object",
      "description": "Field details can have one or more questions requested from client.",
      "title": "Field-Details-with-answers",
      "properties": {
        "question_name": {
          "type": "string",
          "description": "Data requested from client.",
          "minLength": 1,
          "maxLength": 250,
          "title": "question_name"
        },
        "answer": {
          "type": "string",
          "description": "Client answer to the question.",
          "minLength": 1,
          "maxLength": 2000,
          "title": "answer"
        }
      },
      "required": [
        "question_name",
        "answer"
      ]
    },
    "Field-Level-Requests-With-Answers": {
      "type": "object",
      "description": "Request can have one or more match level requests.",
      "title": "Field-Level-Requests-With-Answers",
      "properties": {
        "field_id": {
          "type": "number",
          "description": "Unique ID for each match.",
          "title": "field_id"
        },
        "field_name": {
          "type": "string",
          "description": "Name of the field where match has occurred.",
          "minLength": 1,
          "maxLength": 250,
          "title": "field_name"
        },
        "field_value": {
          "type": "string",
          "description": "Entire content of the field having the match.",
          "minLength": 1,
          "maxLength": 500,
          "title": "field_value"
        },
        "clarification_required_for": {
          "type": "string",
          "description": "Exact match.",
          "minLength": 1,
          "maxLength": 500,
          "title": "clarification_required_for"
        },
        "input_type": {
          "type": "string",
          "description": "The Input type or template to provide the response against the field. It will be one the following - individual / entity / aircraft / vessel / unknown / others. \n If requested input type is unknown, populate fields from any of the other 4 input types in the response.",
          "minLength": 1,
          "maxLength": 16,
          "title": "input_type"
        },
        "field_details": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Field-Details-with-answers"
          },
          "description": "Field details with questions requested from client.",
          "maxItems": 30,
          "title": "field_details"
        }
      },
      "required": [
        "field_id",
        "field_name",
        "field_value",
        "input_type"
      ]
    }
  }
}