{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "DigitalBox Ask Read API"
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ListCategoriesResponse": {
        "type": "object",
        "properties": {
          "_embedded": {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ListTemplatesResponse": {
        "type": "object",
        "properties": {
          "_embedded": {
            "type": "object",
            "properties": {
              "templates": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "categoryId": {
                      "type": "string"
                    },
                    "availableTo": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "GetTemplateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "availableTo": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "hint": {
                  "type": "string"
                },
                "isRequired": {
                  "type": "boolean"
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "ListSurveysResponse": {
        "type": "object",
        "properties": {
          "_embedded": {
            "type": "object",
            "properties": {
              "surveys": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "templateId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "categoryId": {
                      "type": "string"
                    },
                    "availableTo": {
                      "type": "string"
                    },
                    "requesterId": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "createdByItemId": {
                      "type": "string"
                    },
                    "isRequired": {
                      "type": "boolean"
                    },
                    "recipients": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "answerId": {
                            "type": "string"
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "requesterViewedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "recipientViewedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "remindedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "completedAt": {
                                "type": "string",
                                "format": "date-time"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "GetAnswerResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "surveyId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "requesterId": {
            "type": "string"
          },
          "recipientId": {
            "type": "string"
          },
          "status": {
            "type": "object",
            "properties": {
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "createdByItemId": {
                "type": "string"
              },
              "requesterViewedAt": {
                "type": "string",
                "format": "date-time"
              },
              "recipientViewedAt": {
                "type": "string",
                "format": "date-time"
              },
              "remindedAt": {
                "type": "string",
                "format": "date-time"
              },
              "completedAt": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "hint": {
                  "type": "string"
                },
                "isRequired": {
                  "type": "boolean"
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "GetSurveyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "categoryId": {
            "type": "string"
          },
          "availableTo": {
            "type": "string"
          },
          "requesterId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdByItemId": {
            "type": "string"
          },
          "isDraft": {
            "type": "boolean"
          },
          "recipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "answerId": {
                  "type": "string"
                },
                "status": {
                  "type": "object",
                  "properties": {
                    "requesterViewedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "recipientViewedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "remindedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "completedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "format": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "hint": {
                  "type": "string"
                },
                "isRequired": {
                  "type": "boolean"
                },
                "choices": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "GetAnswerDocumentResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      }
    }
  },
  "paths": {
    "/categories": {
      "get": {
        "description": "List categories",
        "parameters": [
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all available categories.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCategoriesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/templates": {
      "get": {
        "description": "List templates",
        "parameters": [
          {
            "name": "itemId",
            "in": "query",
            "description": "TS Digital item identifier to which the template refers",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all available templates.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTemplatesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/templates/{id}": {
      "get": {
        "description": "Get template",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Template id to retrieve",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get template details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetTemplateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/surveys": {
      "get": {
        "description": "List surveys",
        "parameters": [
          {
            "name": "requesterId",
            "in": "query",
            "description": "TS Digital item identifier which request the survey",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recipientId",
            "in": "query",
            "description": "TS Digital item identifier to whom the survey is dedicated",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "includeDrafts",
            "in": "query",
            "description": "Include surveys draft in response",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List all available surveys.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSurveysResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/answers/{id}": {
      "get": {
        "description": "Get answer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Answer id to retrieve",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get answer details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAnswerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/answers/{id}/documents/{documentId}": {
      "get": {
        "description": "Get answer documents",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Answer id to retrieve",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "description": "Answer document id to retrieve",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get answer document content.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAnswerDocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/answers/{id}/previews/{documentId}": {
      "get": {
        "description": "Get answer documents",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Answer id to retrieve",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "description": "Answer document id to retrieve",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get answer document preview.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAnswerDocumentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/surveys/{id}": {
      "get": {
        "description": "Get survey",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Survey id to retrieve",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get survey details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSurveyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  }
}