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

# Update Rate

Only the fields you send are changed. Fields you leave out keep their current values.

To make a rate apply to everything again, clear the field:

* Send `null` for `plan_type`, `state`, or `service_location_id`.
* Send `[]` for `treatment_codes`.

`treatment_codes` replaces the rate's existing treatment codes. To keep the current codes, leave it out.

You can't change a rate's payor, rate type, or self-pay status. To change those, [delete the rate](https://docs.silnahealth.com/api-reference/v1rateresource/delete-rate.md) and [create a new one](https://docs.silnahealth.com/api-reference/v1ratesresource/create-rates.md).

If the update would make the rate match another existing rate, the request returns a `409`.


## OpenAPI

````yaml patch /public/v1/rates/{rate_id}
openapi: 3.0.2
info:
  title: Silna Public API
  version: '1.0'
servers:
  - url: https://app.silnahealth.com/api
security:
  - bearerAuth: []
paths:
  /public/v1/rates/{rate_id}:
    patch:
      tags:
        - V1RateResource
      summary: Update Rate
      operationId: V1RateResource.patch
      parameters:
        - in: path
          name: rate_id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1RateUpdateBody'
        description: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1Rate'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectNotFoundError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
        '429':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsError'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The maximum number of requests allowed in the time window
            X-RateLimit-Remaining:
              schema:
                type: integer
                description: The number of requests remaining in the current time window
            X-RateLimit-Reset:
              schema:
                type: integer
                description: The time when the rate limit will reset, in Unix timestamp
            Retry-After:
              schema:
                type: number
                description: The number of seconds to wait before making another request
components:
  schemas:
    V1RateUpdateBody:
      properties:
        amount:
          anyOf:
            - minimum: 0
              type: number
            - pattern: >-
                ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)
              type: string
          default: null
          description: Rate amount in USD
          title: Amount
          nullable: true
        specialty:
          $ref: '#/components/schemas/PublicSpecialty'
          default: null
          description: Specialty the rate applies to
          nullable: true
        network_status:
          $ref: '#/components/schemas/NetworkStatus'
          default: null
          description: Network status the rate applies to
          nullable: true
        plan_type:
          $ref: '#/components/schemas/InsuranceType'
          default: null
          description: Plan type. Set to null to apply to all plan types
          nullable: true
        state:
          $ref: '#/components/schemas/StateCode'
          default: null
          description: State. Set to null to apply to all states
          nullable: true
        service_location_id:
          default: null
          description: Service location. Set to null to apply to all locations
          title: Service Location Id
          nullable: true
          format: uuid
          type: string
        treatment_codes:
          default: null
          description: >-
            Treatment codes (e.g. CPT or HCPCS) to restrict the rate to. Set to
            [] to apply to all codes
          title: Treatment Codes
          nullable: true
          items:
            type: string
          type: array
      title: V1RateUpdateBody
      type: object
      x-folder: public_api
    V1Rate:
      properties:
        id:
          description: The rate's Silna identifier
          format: uuid
          title: Id
          type: string
        rate_type:
          $ref: '#/components/schemas/V1RateType'
          description: The rate type
        amount:
          description: Rate amount in USD
          title: Amount
          type: string
          example: '150.00'
        specialty:
          $ref: '#/components/schemas/PublicSpecialty'
          description: Specialty the rate applies to
        is_self_pay:
          description: Whether this is a self-pay rate
          title: Is Self Pay
          type: boolean
        payor_id:
          default: null
          description: The payor the rate applies to. Null for self-pay rates
          title: Payor Id
          nullable: true
          format: uuid
          type: string
        network_status:
          $ref: '#/components/schemas/NetworkStatus'
          default: null
          description: Network status the rate applies to
          nullable: true
        plan_type:
          $ref: '#/components/schemas/InsuranceType'
          default: null
          description: Plan type the rate applies to. Null applies to all
          nullable: true
        state:
          $ref: '#/components/schemas/StateCode'
          default: null
          description: State the rate applies to. Null applies to all
          nullable: true
        service_location_id:
          default: null
          description: Service location the rate applies to. Null applies to all
          title: Service Location Id
          nullable: true
          format: uuid
          type: string
        treatment_codes:
          description: >-
            Treatment codes (e.g. CPT or HCPCS) the rate is restricted to. Empty
            applies to all
          items:
            type: string
          title: Treatment Codes
          type: array
          example:
            - - '97110'
      required:
        - id
        - rate_type
        - amount
        - specialty
        - is_self_pay
        - treatment_codes
      title: V1Rate
      type: object
      x-folder: public_api
    ValidationError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
      x-folder: null
    AuthenticationError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
        type:
          $ref: '#/components/schemas/PublicApiErrorType'
      x-folder: null
    ObjectNotFoundError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
      x-folder: null
    ConflictError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
      x-folder: null
    TooManyRequestsError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Human readable error message
      x-folder: null
    PublicSpecialty:
      type: string
      enum:
        - PHYSICAL_THERAPY
        - ABA_THERAPY
        - SPEECH_THERAPY
        - OCCUPATIONAL_THERAPY
        - PSYCHOLOGICAL_TESTING
        - HOME_HEALTH_CARE
        - HOSPICE
        - CARDIAC_REHABILITATION
        - INTENSIVE_CARDIAC_REHABILITATION
        - MENTAL_HEALTH
        - PRINCIPAL_ILLNESS_NAVIGATION
        - PRINCIPAL_CARE_MANAGEMENT
        - ADVANCED_PRIMARY_CARE_MODELS
        - PREVENTATIVE_HEALTH
        - PARTIAL_HOSPITALIZATION_PROGRAM
        - INTENSIVE_OUTPATIENT_PROGRAM
        - INTERVENTIONAL_RADIOLOGY
        - VASCULAR_SURGERY
        - INTERVENTIONAL_CARDIOLOGY
        - ORTHOPEDICS
        - CHIROPRACTIC
        - GYNECOLOGY
        - LONG_TERM_CARE
        - NUTRITIONAL_COUNSELING
        - PHYSICAL_MEDICINE
        - PULMONARY_REHABILITATION
        - INJECTABLE_SPECIALTY_MEDICATIONS
        - ALLERGY_TESTING
        - SKILLED_NURSING
        - RADIOLOGY
        - OTOLARYNGOLOGY
        - DURABLE_MEDICAL_EQUIPMENT
        - DERMATOLOGY
        - PROFESSIONAL_OFFICE_VISIT
        - PSYCHIATRY
        - PRIVATE_DUTY_NURSING
        - NEUROLOGY
        - PSYCHIATRIC_RESIDENTIAL_TREATMENT
        - INPATIENT_PSYCHIATRY
        - SLEEP_MEDICINE
      x-folder: specialty
    NetworkStatus:
      type: string
      enum:
        - IN_NETWORK
        - OUT_OF_NETWORK
      x-folder: payor_entity
    InsuranceType:
      type: string
      enum:
        - COMMERCIAL
        - MEDICARE
        - MEDICAID
        - REGIONAL_CENTER
        - WORKERS_COMPENSATION
        - AUTO_INSURANCE
      x-folder: patient
    StateCode:
      type: string
      enum:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DC
        - DE
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - PR
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
        - AA
        - AE
        - AP
        - AS
        - FM
        - GU
        - MH
        - MP
        - PW
        - VI
      x-folder: address_autocomplete
    V1RateType:
      properties:
        id:
          description: The rate type's Silna identifier
          format: uuid
          title: Id
          type: string
        name:
          description: Rate type name
          title: Name
          type: string
          example: '97110'
        duration:
          $ref: '#/components/schemas/RateDuration'
          description: The unit of time the rate amount applies to
      required:
        - id
        - name
        - duration
      title: V1RateType
      type: object
      x-folder: public_api
    PublicApiErrorType:
      type: string
      enum:
        - AUTH_INVALID_REQUEST_HEADER
        - AUTH_INVALID_CREDENTIALS
      x-folder: null
    RateDuration:
      type: string
      enum:
        - PER_VISIT
        - PER_HOUR
        - PER_DAY
        - PER_SESSION
        - PER_MONTH
        - PER_WEEK
        - PER_PHASE
        - NONE_HIDDEN
      x-folder: provider
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.