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

# Update Appointment by ID

> Update a specific appointment by ID



## OpenAPI

````yaml PATCH /api/v1/appointments/{appointment}
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/{appointment}:
    parameters:
      - $ref: '#/components/parameters/Appointment'
    patch:
      tags:
        - Appointment
      summary: Update specific appointment
      description: Update a specific appointment by ID
      operationId: patchAppointmentById
      parameters:
        - $ref: '#/components/parameters/PatchMethod'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                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
                department_id:
                  $ref: '#/components/schemas/Uuid'
                is_interpreter_needed:
                  type: boolean
                  description: Whether an interpreter is needed for the appointment
                  example: true
                  nullable: true
                interpreter_language:
                  type: string
                  description: The language of the interpreter
                  example: English
                  nullable: true
                status:
                  type: string
                  description: The status of the appointment
                  example: waiting
                  nullable: true
                claimant:
                  $ref: '#/components/schemas/Claimant'
                features_call_recording_enable:
                  type: boolean
                  description: Whether the call recording is enabled
                  example: true
                features_breakout_room_enable:
                  type: boolean
                  description: Whether the breakout room is enabled
                  example: true
                features_webcam_access_agent_enable:
                  type: boolean
                  description: Whether the webcam access for agent is enabled
                  example: true
                features_webcam_access_claimant_enable:
                  type: boolean
                  description: Whether the webcam access for claimant is enabled
                  example: true
                features_webcam_background_blurring_enable:
                  type: boolean
                  description: Whether the webcam background blurring is enabled
                  example: true
                features_microphone_access_enable:
                  type: boolean
                  description: Whether the microphone access is enabled
                  example: true
                features_screen_sharing_enable:
                  type: boolean
                  description: Whether the screen sharing is enabled
                  example: true
                features_messages_chat_enable:
                  type: boolean
                  description: Whether the 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 of the appointment
                  enum:
                    - low
                    - medium
                    - high
                use_custom_post_call_redirect:
                  type: boolean
                  description: Whether the 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
                  nullable: true
                custom_agent_post_call_redirect_url:
                  type: string
                  description: The url of the custom post call redirect for agent
                  nullable: true
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AppointmentResource'
                required:
                  - data
      security:
        - Cognito: []
components:
  parameters:
    Appointment:
      name: appointment
      in: path
      description: The Uuid of the required appointment model
      required: true
      schema:
        $ref: '#/components/schemas/Uuid'
    PatchMethod:
      name: _method
      description: >
        There is a bug in Laravel where using PATCH as the method when making a
        request will not work when submitting with a Content-Type of
        `multipart/form-data`.


        To fix this, the client needs to use `POST` as the method and add a
        `_method` query parameter and set its value to `PATCH`. This will still
        route to the `PATCH` route in laravel.


        Note: this is only needed for `PATCH` endpoints.
      in: query
      required: false
      schema:
        type: string
        enum:
          - PATCH
  schemas:
    Uuid:
      title: id
      description: Resource identifier as a UUID
      type: string
      example: 9a0f170e-0aa0-47db-ab14-4ddcdcbad061
    Claimant:
      title: Claimant
      type: object
      properties:
        name:
          type: string
          description: The name of the claimant
          example: John Doe
        email:
          type: string
          format: email
          description: The email of the claimant
          example: null
        phone_number:
          type: string
          format: phone
          description: The phone number of the claimant
          example: 1234567890
        date_of_birth:
          type: string
          format: date
          description: The date of birth of the claimant
          example: '2021-01-01'
        data:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/Uuid'
              value:
                type: string
                description: The value of the claimant data field
                example: value
    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
    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'
  securitySchemes:
    Cognito:
      type: http
      description: Provide a Bearer Token
      scheme: bearer

````