> ## 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.

# Lists the submissions of a structured document.

> One row per submission, showing its current version and answers; a deleted one is never
listed. `Id` stays the same when the submission is edited; `VersionId` changes.
Answers are shown against the structured document as it is now, as the Gorelo app shows them:
current question text and order, a question added since the save listed unanswered, an answer
to a deleted question left out, and chosen options matched to the current options by name.
`Title` falls back to the structured document's name when no title question is answered.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/documents/structured/{structuredDocumentId}/submissions
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}/submissions:
    get:
      tags:
        - Documents
      summary: Lists the submissions of a structured document.
      description: "One row per submission, showing its current version and answers; a deleted one is never\r\nlisted. `Id` stays the same when the submission is edited; `VersionId` changes.\r\nAnswers are shown against the structured document as it is now, as the Gorelo app shows them:\r\ncurrent question text and order, a question added since the save listed unanswered, an answer\r\nto a deleted question left out, and chosen options matched to the current options by name.\r\n`Title` falls back to the structured document's name when no title question is answered."
      operationId: get_v1_documents_structured_structuredDocumentId_submissions
      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
        - name: Cursor
          in: query
          description: >-
            Opaque pagination cursor from a previous page; omit for the first
            page.
          schema:
            type: string
        - name: PageSize
          in: query
          description: >-
            Number of items per page, 1-200 (default 50). Out of range is
            rejected, not clamped.
          schema:
            type: integer
            format: int32
            default: 50
        - name: ClientIds
          in: query
          description: >-
            Comma-separated client ids; only those clients' submissions. Max
            100.
          schema:
            type: string
        - name: SortBy
          in: query
          description: 'Sort field: `createdOn` (default) or `updatedOn`.'
          schema:
            type: string
            default: createdOn
        - name: SortOrder
          in: query
          description: 'Sort direction: `asc` or `desc` (default).'
          schema:
            type: string
            default: desc
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: >-
                  #/components/schemas/StructuredDocumentSubmissionListItemModelListBaseResponse
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/StructuredDocumentSubmissionListItemModelListBaseResponse
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/StructuredDocumentSubmissionListItemModelListBaseResponse
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/ObjectBaseResponse'
        '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:
    StructuredDocumentSubmissionListItemModelListBaseResponse:
      type: object
      properties:
        StatusCode:
          $ref: '#/components/schemas/HttpStatusCode'
        IsSuccess:
          type: boolean
        Data:
          type: array
          items:
            $ref: '#/components/schemas/StructuredDocumentSubmissionListItemModel'
          nullable: true
        DataContext:
          $ref: '#/components/schemas/PaginationDataContext'
        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
    StructuredDocumentSubmissionListItemModel:
      type: object
      properties:
        Id:
          type: string
          description: >-
            Submission identifier. Six url-safe characters; it does not change
            when the submission is edited.
        Title:
          type: string
          description: "The answer to the question marked `UseForTitle`, as text. When that question was not\r\nanswered or the structured document marks none, the structured document's name as it was when\r\nthe submission was saved; null only when that is blank too."
          nullable: true
        VersionId:
          type: string
          description: "Identifier of the current version. It changes on every edit. A document's related items and\r\nlinks copied from the app name a submission by this id; the get endpoint accepts it as well\r\nas `Id`."
        Version:
          type: integer
          description: The current version's number, counting from 1.
          format: int64
        StructuredDocumentId:
          type: string
          description: The structured document this submission fills in - its `Id`.
        ClientId:
          type: integer
          description: The client the submission belongs to; null when it has none.
          format: int64
          nullable: true
        Answers:
          type: array
          items:
            $ref: '#/components/schemas/StructuredDocumentAnswerModel'
          description: "The answers of the current version, shown against the structured document as it is now,\r\nas the Gorelo app shows them: one per current question, in the structured document's order,\r\nlabelled with the current question text. A question added since the save is listed\r\nunanswered; an answer to a question since deleted is left out; a chosen option is matched to\r\nthe current options by name, so an option since renamed or deleted is left out."
        CreatedOn:
          type: string
          description: When the submission was first saved (UTC).
          format: date-time
        CreatedById:
          type: integer
          description: Technician who first saved the submission.
          format: int64
        UpdatedOn:
          type: string
          description: >-
            When the submission was last edited, a version restored or its
            attachments changed (UTC); its creation time if it has not been
            changed since.
          format: date-time
      additionalProperties: false
      description: >-
        A submission of a structured document, as it appears in the submissions
        list.
    PaginationDataContext:
      type: object
      properties:
        Pagination:
          $ref: '#/components/schemas/PaginatedResponse'
      additionalProperties: false
      description: "The `DataContext` of a cursor-paginated success response: carries the paging metadata\r\nfor the returned page."
    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."
    StructuredDocumentAnswerModel:
      type: object
      properties:
        FieldId:
          type: string
          description: >-
            The question answered - the `Id` of its field on the structured
            document.
        Label:
          type: string
          description: The question text, as the structured document has it now, as HTML.
        Type:
          type: string
          description: >-
            The answer type: the field's `Type` without its `Question_` prefix,
            e.g. `Short_Answer`, `Checkbox`, `Assets`.
        TextValue:
          type: string
          description: >-
            The answer as text. Dates are `yyyy-MM-dd`, times as picked (`4:30
            PM`), long answers keep their line breaks.
          nullable: true
        NumberValue:
          type: number
          description: >-
            The answer to a `Number` question, when it reads as a number.
            `TextValue` keeps it as typed, leading zeros included.
          format: double
          nullable: true
        OptionValues:
          type: array
          items:
            type: string
          description: >-
            The chosen option names - one for a multiple choice, dropdown or
            toggle, any number for a checkbox.
          nullable: true
        ImageUrls:
          type: array
          items:
            type: string
          description: >-
            The images of an `Image_Carousel` answer. Each url carries a
            time-limited access token; do not store it.
          nullable: true
        AgentAssetIds:
          type: array
          items:
            type: string
            format: uuid
          description: The agent assets an `Assets` answer picked.
          nullable: true
        CustomAssetIds:
          type: array
          items:
            type: string
            format: uuid
          description: The custom assets an `Assets` answer picked.
          nullable: true
        ContactIds:
          type: array
          items:
            type: integer
            format: int64
          description: The contacts a `Contacts` answer picked.
          nullable: true
        DocumentIds:
          type: array
          items:
            type: string
            format: uuid
          description: The documents a `Documents` answer picked.
          nullable: true
        StructuredDocumentSubmissions:
          type: array
          items:
            $ref: '#/components/schemas/StructuredDocumentSubmissionLinkModel'
          description: The structured document submissions a `Documents` answer picked.
          nullable: true
        UptimeIds:
          type: array
          items:
            type: string
            format: uuid
          description: The uptime checks an `Uptime` answer picked.
          nullable: true
      additionalProperties: false
      description: "One answer, by the question's type: text types fill `TextValue`; a number fills\r\n`TextValue` with the digits as typed and `NumberValue` when they read as a number;\r\nmultiple choice, dropdown, checkbox and toggle fill `OptionValues`; an image carousel\r\nfills `ImageUrls`; an assets answer fills `AgentAssetIds` and `CustomAssetIds`,\r\na contacts answer `ContactIds`, a documents answer `DocumentIds` and\r\n`StructuredDocumentSubmissions`, an uptime answer `UptimeIds`. Every value is null\r\nwhen the question was left blank, and on every other type."
    PaginatedResponse:
      type: object
      properties:
        NextCursor:
          type: string
          nullable: true
        PreviousCursor:
          type: string
          nullable: true
        HasMore:
          type: boolean
        HasPrevious:
          type: boolean
        TotalCount:
          type: integer
          format: int32
      additionalProperties: false
    StructuredDocumentSubmissionLinkModel:
      type: object
      properties:
        StructuredDocumentId:
          type: string
          description: The structured document's `Id`.
        SubmissionId:
          type: string
          description: >-
            The submission's version id at the time it was picked; the
            submission get endpoint accepts it.
      additionalProperties: false
      description: A structured document submission picked in an answer.
  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.