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

# Update a patient in Candid Health

> Updates a patient. The version parameter must be the next version number (current + 1) to prevent race conditions.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml put /api/v2/integrations/candid/{slug}/patients/{patientId}/{version}
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/integrations/candid/{slug}/patients/{patientId}/{version}:
    put:
      tags:
        - Candid Health
      summary: Update a patient in Candid Health
      description: >-
        Updates a patient. The version parameter must be the next version number
        (current + 1) to prevent race conditions.
      parameters:
        - schema:
            type: string
          in: path
          name: slug
          required: true
          description: The slug of the Candid connection.
        - schema:
            type: string
          in: path
          name: patientId
          required: true
          description: The Candid patient ID.
        - schema:
            type: string
          in: path
          name: version
          required: true
          description: The next version number (current version + 1).
      requestBody:
        content:
          application/json:
            schema:
              description: The patient data to update.
        description: The patient data to update.
      responses:
        '200':
          description: The updated patient data from Candid Health.
          content:
            application/json:
              schema: {}
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The error message.
                  message:
                    type: string
                    description: The message.
                  statusCode:
                    type: number
                    description: The status code.
                  details:
                    type: object
                    additionalProperties: {}
                    description: The details of the error
                additionalProperties: true
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The error message.
                  message:
                    type: string
                    description: The message.
                  statusCode:
                    type: number
                    description: The status code.
                  details:
                    type: object
                    additionalProperties: {}
                    description: The details of the error
                additionalProperties: true
        '409':
          description: Version conflict - patient has been modified.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
                additionalProperties: false
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The error message.
                  message:
                    type: string
                    description: The message.
                  statusCode:
                    type: number
                    description: The status code.
                  details:
                    type: object
                    additionalProperties: {}
                    description: The details of the error
                additionalProperties: true

````