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

# Update Patient Credit

> Update a patient credit



## OpenAPI

````yaml patch /user/patient/{patient_id}/credit/{credit_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /user/patient/{patient_id}/credit/{credit_id}:
    patch:
      tags:
        - provider
        - user
      summary: Update Patient Credit
      description: Update a patient credit
      operationId: update_patient_credit_user_patient__patient_id__credit__credit_id__patch
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: patient_id
          in: path
          required: true
          schema:
            type: string
            title: Patient Id
        - name: credit_id
          in: path
          required: true
          schema:
            type: string
            title: Credit Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatientCreditUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientCreditSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PatientCreditUpdate:
      properties:
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        expiryDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expirydate
        amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Amount
          description: Update the total credit amount in cents
        amountRemaining:
          anyOf:
            - type: integer
            - type: 'null'
          title: Amountremaining
          description: Update the remaining credit amount in cents
      type: object
      title: PatientCreditUpdate
    PatientCreditSummary:
      properties:
        id:
          type: string
          title: Id
        patientId:
          type: string
          title: Patientid
        amount:
          type: integer
          title: Amount
        amountRemaining:
          type: integer
          title: Amountremaining
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        expiryDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expirydate
        memberId:
          anyOf:
            - type: string
            - type: 'null'
          title: Memberid
        createdDate:
          type: string
          format: date-time
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
        creator:
          anyOf:
            - $ref: '#/components/schemas/UserTiny'
            - type: 'null'
      type: object
      required:
        - id
        - patientId
        - amount
        - amountRemaining
        - createdDate
      title: PatientCreditSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserTiny:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier for the user.
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
          description: The user's first name.
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
          description: The user's last name.
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
          description: The user's phone number.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: The user's email address.
        type:
          $ref: '#/components/schemas/UserType'
          description: The type of user.
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
          description: The location of the user.
      type: object
      required:
        - id
        - type
      title: UserTiny
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UserType:
      type: string
      enum:
        - PROVIDER
        - PATIENT
        - ASSISTANT
      title: UserType

````