> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqod.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Appointments

> Get list of appointments based on the user's role



## OpenAPI

````yaml GET /api/v1/appointments
openapi: 3.0.0
info:
  title: SQOD API
  version: 1.0.0
  contact:
    name: Daniel Loomes
    email: dloomes@involve.vc
  description: >-
    RESTful API specification for involve-api.


    All endpoints are secured (unless indicated otherwise) and need a valid
    Bearer token passed in the Authorization header of the request.


    Response model conventions:

    - Fields marked as "required" will have a value

    - Fields not marked as "required" can have a value, but may also be null, or
    may not be included in the response at all

    - Fields of type array may be empty (array with no items) unless validation
    indicates otherwise, however they are always "required"


    Patch update conventions:

    - Send only the fields you want to update with their new values

    - Fields marked as "required" cannot be unset/set to null, however they can
    be omitted from the request body if they should be left unchanged

    - The same rules also apply to fields inside nested objects


    Get collection conventions:

    - All paginated lists accept page and per_page query string parameters


    Other notes:

    - For sub-resources of the User resource, 'me' alias can be used instead of
    the user ID to work with currently authenticated user.

    - Expect 401 response in case of authentication problems, e.g. expired or
    invalid tokens.

    - Expect 403 response in case of authorisation problems, e.g. user doesn't
    have enough privileges to access a given resource.
  license:
    name: Private
    url: https://example.com
servers:
  - url: '{customerRef}'
    description: SQOD Customer Server
    variables:
      customerRef:
        default: ''
        description: Enter your customer URL
  - url: https://auth.app.sqod.co.uk
    description: SQOD Authentication Server
security: []
paths:
  /api/v1/appointments:
    get:
      tags:
        - Appointment
      summary: Get appointments
      description: Get list of appointments based on the user's role
      operationId: getAppointments
      parameters:
        - name: start_at
          in: query
          description: The start datetime to filter appointment date
          required: false
          schema:
            type: string
            format: date-time
            example: '2021-01-01T00:00:00.000Z'
        - name: end_at
          in: query
          description: >-
            The end datetime to filter appointment date (required with
            `start_at`)
          required: false
          schema:
            type: string
            format: date-time
            example: '2021-01-01T00:00:00.000Z'
        - $ref: '#/components/parameters/PerPageParameter'
      responses:
        '200':
          description: A paginated list of appointments.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AppointmentResource'
                  meta:
                    $ref: '#/components/schemas/MetaResource'
                  links:
                    $ref: '#/components/schemas/LinkResource'
                required:
                  - data
                  - meta
                  - links
      security:
        - Cognito: []
components:
  parameters:
    PerPageParameter:
      name: per_page
      in: query
      description: Number of items per page
      required: false
      schema:
        type: integer
        default: 10
        minimum: 1
        example: 10
  schemas:
    AppointmentResource:
      title: Appointment
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
        reference:
          type: string
          description: The reference of the appointment
          example: 123456789
        appointment_at:
          type: string
          format: date-time
          description: The date and time of the appointment
          example: '2021-01-01T00:00:00.000Z'
        duration_in_minutes:
          type: integer
          description: The duration of the appointment in minutes
          example: 60
        is_interpreter_needed:
          type: boolean
          description: Whether an interpreter is needed for the appointment
          example: true
        interpreter_language:
          type: string
          description: The language of the interpreter
          example: English
        status:
          type: string
          description: The status of the appointment
          example: scheduled
          enum:
            - no_show
            - late
            - complete
            - being_seen
            - waiting
            - scheduled
            - cancelled
        url:
          type: string
          description: The url of the appointment
          example: https://example.com/appointments/123456789
        created_at:
          type: string
          format: date-time
          description: The date and time the appointment was created
          example: '2021-01-01T00:00:00.000Z'
        cancelled_at:
          type: string
          format: date-time
          description: The date and time the appointment was cancelled
          example: '2021-01-01T00:00:00.000Z'
        cancellation_reason:
          type: string
          description: The reason the appointment was cancelled
          example: The appointment was cancelled because...
        department:
          $ref: '#/components/schemas/DepartmentResource'
        claimant:
          $ref: '#/components/schemas/AppointmentClaimantResource'
        meeting:
          $ref: '#/components/schemas/Meeting'
        session_started_at:
          type: string
          format: date-time
          description: The date and time the appointment session was started
          example: '2021-01-01T00:00:00.000Z'
          nullable: true
        session_ended_at:
          type: string
          format: date-time
          description: The date and time the appointment session was ended
          example: '2021-01-01T00:00:00.000Z'
          nullable: true
        features_call_recording_enable:
          type: boolean
          description: Whether call recording is enabled
          example: true
        features_breakout_room_enable:
          type: boolean
          description: Whether breakout rooms are enabled
          example: true
        features_webcam_access_agent_enable:
          type: boolean
          description: Whether webcam access is enabled for agents
          example: true
        features_webcam_access_claimant_enable:
          type: boolean
          description: Whether webcam access is enabled for claimants
          example: true
        features_webcam_background_blurring_enable:
          type: boolean
          description: Whether webcam background blurring is enabled
          example: true
        features_microphone_access_enable:
          type: boolean
          description: Whether microphone access is enabled
          example: true
        features_screen_sharing_enable:
          type: boolean
          description: Whether screen sharing is enabled
          example: true
        features_messages_chat_enable:
          type: boolean
          description: Whether chat messages are enabled
          example: true
        features_participant_list_enable:
          type: boolean
          description: Whether the participant list is enabled
          example: true
        features_bandwidth:
          type: string
          description: The bandwidth setting
          example: high
        use_custom_post_call_redirect:
          type: boolean
          description: Whether a custom post call redirect is used
          example: true
        custom_user_post_call_redirect_url:
          type: string
          description: The url of the custom post call redirect
          example: https://example.com/custom-post-call-redirect
        custom_agent_post_call_redirect_url:
          type: string
          description: The url of the custom post call redirect for agents
          example: https://example.com/custom-agent-post-call-redirect
    MetaResource:
      title: Pagination Meta
      type: object
      properties:
        current_page:
          type: number
        from:
          type: number
        last_page:
          type: number
        links:
          type: array
          items:
            type: object
            properties:
              url:
                $ref: '#/components/schemas/PaginatedUrl'
              label:
                type: string
              active:
                type: boolean
            required:
              - label
              - active
        path:
          $ref: '#/components/schemas/PaginatedUrl'
        per_page:
          type: number
        to:
          type: number
        total:
          type: number
      required:
        - current_page
        - from
        - last_page
        - links
        - path
        - per_page
        - to
        - total
    LinkResource:
      title: Pagination Links
      type: object
      properties:
        first:
          $ref: '#/components/schemas/PaginatedUrl'
        last:
          $ref: '#/components/schemas/PaginatedUrl'
        prev:
          $ref: '#/components/schemas/PaginatedUrl'
        next:
          $ref: '#/components/schemas/PaginatedUrl'
      required:
        - first
        - last
    Uuid:
      title: id
      description: Resource identifier as a UUID
      type: string
      example: 9a0f170e-0aa0-47db-ab14-4ddcdcbad061
    DepartmentResource:
      title: Department
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Department
    AppointmentClaimantResource:
      title: Appointment Claimant
      type: object
      properties:
        name:
          type: string
          description: The name of the claimant
        phone_number:
          type: string
          description: The phone number of the claimant
        email:
          type: string
          description: The email of the claimant
        date_of_birth:
          type: string
          format: date
          description: The date of birth of the claimant
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The id of the appointment data field
              value:
                type: string
                description: The value of the appointment data field
              name:
                type: string
                description: The name of the appointment data field
              type:
                type: string
                description: The type of the appointment data field
              required:
                type: boolean
                description: Whether the appointment data field is required
    Meeting:
      title: Meeting
      type: object
      properties:
        id:
          type: string
          description: The id of the meeting
          example: 1234567890
        room_name:
          type: string
          description: The name of the room
          example: Waiting Area 1
        room_url:
          type: string
          description: The url of the room
          example: https://meet.jit.si/WaitingArea1
        start_date:
          type: string
          format: date-time
          description: The date and time of the start of the meeting
          example: '2021-01-30T08:30:00Z'
        end_date:
          type: string
          format: date-time
          description: The date and time of the end of the meeting
          example: '2021-01-30T09:30:00Z'
    PaginatedUrl:
      title: Paginated Url
      description: HTTP link
      type: string
      example: https://dev.sqod.uk/path?page=1
  securitySchemes:
    Cognito:
      type: http
      description: Provide a Bearer Token
      scheme: bearer

````