> ## Documentation Index
> Fetch the complete documentation index at: https://help.gorelo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Gets a single structured document, with its fields.

> Takes the structured document's `Id`, or any of its version ids - a link copied from the
app may carry one - and always answers with the current version.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/documents/structured/{structuredDocumentId}
openapi: 3.0.4
info:
  title: Public API
  description: Gorelo Public API documentation.
  version: 1.0.0
servers:
  - url: https://api.usw.gorelo.io
    description: US
  - url: https://api.aue.gorelo.io
    description: Australia
security:
  - ApiKeyAuth: []
tags:
  - name: Attachments
    description: "Uploading a file, for anything that can carry one. One endpoint rather than one per record\r\ntype, because the upload itself is identical - only the record it is checked against differs."
  - name: Alerts
    description: Alerts management operations
  - name: Assets
    description: Assets management operations
  - name: Billing
    description: Billing management operations
  - name: Tickets
    description: Tickets management operations
  - name: Clients
    description: Clients management operations
  - name: Contacts
    description: Contacts management operations
  - name: Deletions
    description: Deletions management operations
  - name: Documents
    description: Documents management operations
  - name: Forms
    description: Forms management operations
  - name: Organization
    description: Organization management operations
  - name: Projects
    description: Projects management operations
paths:
  /v1/documents/structured/{structuredDocumentId}:
    get:
      tags:
        - Documents
      summary: Gets a single structured document, with its fields.
      description: "Takes the structured document's `Id`, or any of its version ids - a link copied from the\r\napp may carry one - and always answers with the current version."
      operationId: get_v1_documents_structured_structuredDocumentId
      parameters:
        - name: structuredDocumentId
          in: path
          description: Structured document identifier, or one of its version ids.
          required: true
          schema:
            pattern: ^[A-Za-z0-9_-]{1,64}$
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/StructuredDocumentDetailModelBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/StructuredDocumentDetailModelBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/StructuredDocumentDetailModelBaseResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
components:
  schemas:
    StructuredDocumentDetailModelBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          $ref: '#/components/schemas/StructuredDocumentDetailModel'
        DataContext:
          type: object
          additionalProperties: false
          nullable: true
          example: null
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    ObjectBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          nullable: true
        DataContext:
          $ref: '#/components/schemas/ErrorDataContext'
        Notifications:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      additionalProperties: false
    HttpStatusCode:
      enum:
        - 100
        - 101
        - 102
        - 103
        - 200
        - 201
        - 202
        - 203
        - 204
        - 205
        - 206
        - 207
        - 208
        - 226
        - 300
        - 301
        - 302
        - 303
        - 304
        - 305
        - 306
        - 307
        - 308
        - 400
        - 401
        - 402
        - 403
        - 404
        - 405
        - 406
        - 407
        - 408
        - 409
        - 410
        - 411
        - 412
        - 413
        - 414
        - 415
        - 416
        - 417
        - 421
        - 422
        - 423
        - 424
        - 426
        - 428
        - 429
        - 431
        - 451
        - 500
        - 501
        - 502
        - 503
        - 504
        - 505
        - 506
        - 507
        - 508
        - 510
        - 511
      type: integer
      format: int32
    StructuredDocumentDetailModel:
      type: object
      properties:
        Id:
          type: string
          description: >-
            Structured document identifier. Six url-safe characters; it does not
            change when the document is edited.
        Name:
          type: string
          description: Name.
        Version:
          type: integer
          description: The current version's number, counting from 1.
          format: int64
        VersionId:
          type: string
          description: "Identifier of the current version. It changes on every edit; a link copied from the app may\r\ncarry it, and the get endpoint accepts it as well as `Id`."
        Fields:
          type: array
          items:
            $ref: '#/components/schemas/StructuredDocumentFieldModel'
          description: The fields of the current version, in display order.
        CreatedOn:
          type: string
          description: When the structured document was first created (UTC).
          format: date-time
        UpdatedOn:
          type: string
          description: >-
            When the structured document was last edited, or a version restored
            (UTC); its creation time if it has not been changed since.
          format: date-time
      additionalProperties: false
      description: >-
        A structured document with its fields - the questions a submission
        answers, and the headings and text around them.
    Error:
      type: object
      properties:
        Code:
          pattern: ^[0-9]{6}$
          type: string
          description: 6-digit MMTTNN error code. See the Public API error-code registry.
          example: '070101'
        Message:
          type: string
        PropertyName:
          type: string
          nullable: true
        ActionHint:
          type: string
          nullable: true
        DocUrl:
          type: string
          nullable: true
      additionalProperties: false
    ErrorDataContext:
      type: object
      properties:
        TraceId:
          type: string
          description: Request correlation id. Quote this when reporting a problem.
          nullable: true
      additionalProperties: false
      description: "The `DataContext` of an error response: carries the correlation id for the failed\r\nrequest."
    StructuredDocumentFieldModel:
      type: object
      properties:
        Id:
          type: string
          description: >-
            Field identifier, unique within the structured document. A
            submission's answers refer to it as `FieldId`.
        Type:
          type: string
          description: "Field type, one of a fixed set. Questions: `Question_Short_Answer`,\r\n`Question_Long_Answer`, `Question_Multiple_Choice`, `Question_Checkbox`,\r\n`Question_Dropdown`, `Question_Toggle`, `Question_Number`,\r\n`Question_Email`, `Question_Phone_Number`, `Question_Link`,\r\n`Question_Date`, `Question_Time`, `Question_Image_Carousel`,\r\n`Question_Assets`, `Question_Contacts`, `Question_Documents`,\r\n`Question_Uptime`. Layout: `Heading_1`, `Heading_2`, `Heading_3`,\r\n`Label`, `Text`, `Divider`, and `Question` for question text with no\r\nanswer box. Logic: `Conditional_Logic`. Empty for a block of any other kind."
        Label:
          type: string
          description: >-
            The question text, heading, label or text, as HTML. Null on a
            divider.
          nullable: true
        Required:
          type: boolean
          description: Whether a submission must answer this question.
        ShowInList:
          type: boolean
          description: >-
            Whether the app shows this question's answer as a column of the
            submissions list.
        UseForTitle:
          type: boolean
          description: >-
            Whether this question's answer is a submission's title. At most one
            field has it.
        Options:
          type: array
          items:
            $ref: '#/components/schemas/StructuredDocumentFieldOptionModel'
          description: >-
            The choices of a multiple-choice, checkbox, dropdown or toggle
            question. Null on every other type.
          nullable: true
        ConditionalLogic:
          $ref: '#/components/schemas/StructuredDocumentConditionalLogicModel'
      additionalProperties: false
      description: "One block of a structured document. A question and its answer box are one field, typed\r\n`Question_` plus the answer type (`Question_Short_Answer`, `Question_Assets`);\r\nheadings, text and dividers are fields of their own with no answer."
    StructuredDocumentFieldOptionModel:
      type: object
      properties:
        Id:
          type: integer
          description: >-
            Option identifier, unique within the field. Not stable across
            versions: the app renumbers options when one is inserted.
          format: int32
        Name:
          type: string
          description: Option text.
      additionalProperties: false
      description: One choice of an option-bearing question.
    StructuredDocumentConditionalLogicModel:
      type: object
      properties:
        Operator:
          type: string
          description: 'How the conditions combine: `and` or `or`.'
        When:
          type: array
          items:
            $ref: '#/components/schemas/StructuredDocumentConditionModel'
          description: The conditions.
        Then:
          type: array
          items:
            $ref: '#/components/schemas/StructuredDocumentConditionActionModel'
          description: The actions taken when the conditions hold.
      additionalProperties: false
      description: >-
        A show/hide/require rule: when the conditions hold, combined with
        `Operator`, the actions apply.
    StructuredDocumentConditionModel:
      type: object
      properties:
        FieldId:
          type: string
          description: The field whose answer is tested - a field `Id`.
        Operator:
          type: string
          description: 'The comparison: `eq` or `ne`.'
        Value:
          type: integer
          description: The option id the answer is compared with.
          format: int32
          nullable: true
      additionalProperties: false
      description: One condition of a conditional-logic rule.
    StructuredDocumentConditionActionModel:
      type: object
      properties:
        Action:
          type: string
          description: '`Show_Blocks`, `Hide_Blocks` or `Require_Answer`.'
        FieldIds:
          type: array
          items:
            type: string
          description: The fields the action applies to.
      additionalProperties: false
      description: One action of a conditional-logic rule.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Your Gorelo API key. See [Generate API key](/generate-api-key). If your
        data is hosted in Australia, click the base URL at the top of this page
        and select `https://api.aue.gorelo.io`.
      name: X-API-Key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.