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

# Get Surveys Submissions

> Get Surveys Submissions



## OpenAPI

````yaml /api-reference/surveys/openapi.json get /surveys/submissions
openapi: 3.0.0
info:
  title: Surveys API
  description: Documentation for surveys API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Surveys
    description: Documentation for surveys API
paths:
  /surveys/submissions:
    get:
      tags:
        - Surveys
      summary: Get Surveys Submissions
      description: Get Surveys Submissions
      operationId: get-surveys-submissions
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: locationId
          required: true
          in: query
          schema:
            type: string
            example: ve9EPM428h8vShlRW1KT
        - name: page
          required: false
          in: query
          description: Page No. By default it will be 1
          schema:
            default: 1
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: >-
            Limit Per Page records count. will allow maximum up to 100 and
            default will be 20
          schema:
            default: 20
            example: 20
            type: number
        - name: surveyId
          required: false
          in: query
          description: Filter submission by survey id
          schema:
            type: string
            example: jjusM6EOngDExnbo2DbU
        - name: q
          required: false
          in: query
          description: Filter by contactId, name, email or phone no.
          schema:
            type: string
            example: john@deo.com
        - name: startAt
          required: false
          in: query
          description: >-
            Get submission by starting of this date. By default it will be same
            date of last month(YYYY-MM-DD).
          schema:
            example: '2020-11-14'
            type: string
        - name: endAt
          required: false
          in: query
          description: >-
            Get submission by ending of this date. By default it will be current
            date(YYYY-MM-DD).
          schema:
            example: '2020-12-14'
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSurveysSubmissionSuccessfulResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - bearer:
            - surveys.readonly
components:
  schemas:
    GetSurveysSubmissionSuccessfulResponseDto:
      type: object
      properties:
        submissions:
          type: array
          items:
            $ref: '#/components/schemas/SubmissionSchema'
        meta:
          $ref: '#/components/schemas/metaSchema'
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error
    SubmissionSchema:
      type: object
      properties:
        id:
          type: string
          example: be759b9a-c3ec-4b29-ba07-fc3c89c77673
        contactId:
          type: string
          example: 9NkT25Vor1v4aQatFsv2
        createdAt:
          type: string
          example: '2020-11-01T18:02:21.000Z'
        surveyId:
          type: string
          example: jjusM6EOngDExnbo2DbU
        name:
          type: string
          example: test
        email:
          type: string
          example: test@test.com
        others:
          $ref: '#/components/schemas/othersSchema'
    metaSchema:
      type: object
      properties:
        total:
          type: number
          example: 1
        currentPage:
          type: number
          example: 1
        nextPage:
          type: number
          example: null
          nullable: true
        prevPage:
          type: number
          example: null
          nullable: true
    othersSchema:
      type: object
      properties:
        __submissions_other_field__:
          type: string
          example: john@deo.com
        __custom_field_id__:
          type: string
          example: '20'
        eventData:
          $ref: '#/components/schemas/EventDataSchema'
        fieldsOriSequance:
          example:
            - full_name
            - first_name
            - last_name
            - phone
            - email
          type: array
          items:
            type: string
    EventDataSchema:
      type: object
      properties:
        fbc:
          type: string
          example: fb.1.123456789.987654321
        fbp:
          type: string
          example: fbp.1.987654321.123456789
        page:
          $ref: '#/components/schemas/PageDetailsSchema'
        type:
          type: string
          example: page-visit
        domain:
          type: string
          example: example.com
        medium:
          type: string
          example: survey
        source:
          type: string
          example: Direct traffic
        version:
          type: string
          example: v3
        adSource:
          type: string
          example: example-ad-source
        mediumId:
          type: string
          example: medium-id-123
        parentId:
          type: string
          example: parent-id-456
        referrer:
          type: string
          example: https://staging.hoopai.com
        fbEventId:
          type: string
          example: event-id-789
        timestamp:
          type: number
          example: 1234567890
        parentName:
          type: string
          example: Parent Survey
        fingerprint:
          type: string
          example: example-fingerprint
        pageVisitType:
          type: string
          example: survey
        contactSessionIds:
          $ref: '#/components/schemas/ContactSessionIds'
          nullable: true
    PageDetailsSchema:
      type: object
      properties:
        url:
          type: string
          example: https://example.com
        title:
          type: string
          example: Example Page
    ContactSessionIds:
      type: object
      properties:
        ids:
          example:
            - session1
            - session2
          nullable: true
          type: array
          items:
            type: string
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Use the Access Token generated with user type as Sub-Account (OR)
        Private Integration Token of Sub-Account.
      type: http

````