{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/culture-amp/json-schema/culture-amp-survey-question-response-schema.json",
  "title": "SurveyQuestionResponse",
  "description": "container object for a single Survey question",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/culture-amp-surveys-api-openapi.yml#/components/schemas/SurveyQuestionResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/SurveyQuestion"
    }
  },
  "required": [
    "data"
  ],
  "$defs": {
    "SurveyQuestion": {
      "title": "SurveyQuestion",
      "type": "object",
      "description": "The Survey Question record",
      "properties": {
        "id": {
          "type": "string",
          "description": "the identifier used by Culture Amp to identify the Survey"
        },
        "code": {
          "type": "string",
          "description": "The unique question code"
        },
        "questionType": {
          "type": "string",
          "description": "The type of the survey question eg. culture, segment"
        },
        "label": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localised label of the survey question"
        },
        "description": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localised description of the survey question"
        },
        "ratingScale": {
          "type": "string",
          "description": "The rating scale of the survey question"
        },
        "selectOptions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SurveyQuestionSelectOption"
          }
        },
        "otherOption": {
          "type": "boolean",
          "description": "The flag for other select option"
        },
        "status": {
          "type": "string",
          "description": "The status of the survey question, active or deleted"
        },
        "sectionId": {
          "type": "string",
          "description": "The ID of a section the survey question belongs to"
        },
        "factorIds": {
          "type": "array",
          "description": "The IDs of factors associated with the survey question",
          "items": {
            "type": "string"
          }
        },
        "createdAt": {
          "type": "string",
          "description": "The date the Survey question was created",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "description": "The date the Survey question was last updated",
          "format": "date-time"
        },
        "processedAt": {
          "type": "string",
          "description": "The date the survey question was last processed by the public API. This can be used by consumers to determine if the question has been updated since the last time it was retrieved.",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "otherOption",
        "processedAt"
      ]
    },
    "SurveyQuestionSelectOption": {
      "type": "object",
      "description": "a survey question's select option",
      "properties": {
        "id": {
          "type": "string",
          "description": "originated from a demographic_value_id or select_option_id"
        },
        "label": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localised label of the option"
        },
        "value": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The localised value of the option"
        },
        "status": {
          "type": "string",
          "description": "Select option status, active or deleted"
        },
        "createdAt": {
          "type": "string",
          "description": "The date the option was created",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "description": "The date the option was last updated",
          "format": "date-time"
        }
      }
    }
  }
}