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

# Patch a fee

> Patches a fee for the specified matter.



## OpenAPI

````yaml /openapi.json patch /matters/{matterId}/fees/{id}
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /matters/{matterId}/fees/{id}:
    patch:
      tags:
        - Fees
      summary: Patch a fee
      description: Patches a fee for the specified matter.
      operationId: PatchFee
      parameters:
        - name: matterId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/FeeDto'
          application/json:
            schema:
              $ref: '#/components/schemas/FeeDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/FeeDto'
      responses:
        '202':
          description: >-
            When request is accepted. Returns a hypermedia 'Link' object of the
            fee to be patched.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Link'
        '400':
          description: When an unsupported request is made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            When fee with specified id is not associated with authenticated
            client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When fee with specified id does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    FeeDto:
      required:
        - feeDate
        - subject
      type: object
      properties:
        updatedByUserId:
          type: string
          description: "Unique identifier of the user updating the fee.\r\n\r\nThis field is reserved for server-to-server operations."
          nullable: true
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        staffId:
          type: string
          description: "Unique identifier of the associated staff member.\r\n\r\nWhen StaffId is not provided, the API will attempt to match your User Id to a Staff Id automatically."
          nullable: true
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        invoiceId:
          type: string
          description: Unique identifier of the associated invoice.
          nullable: true
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
        activityCode:
          type: string
          description: The activity code associated to the fee.
          nullable: true
          example: PRT
        feeType:
          allOf:
            - $ref: '#/components/schemas/FeeType'
          description: The type of the fee (Fixed = 0, Time = 1).
          example: 0
        feeDate:
          type: string
          description: The date of the fee.
          format: date-time
          example: '2022-07-01'
        subject:
          minLength: 1
          type: string
          description: The subject - this should be a short description of the fee.
          example: Review contract
        description:
          type: string
          description: Optional detailed description of the fee.
          nullable: true
          example: Print documents
        duration:
          type: integer
          description: >-
            The duration billed - in minutes. This duration is used if there are
            no sub activities.
          format: int64
          example: 60
        durationWorked:
          type: integer
          description: >-
            The duration worked - in minutes. This duration is used if there are
            no sub activities.
          format: int64
          nullable: true
          example: 50
        rate:
          type: number
          description: The rate of the fee in dollars.
          format: double
          example: 350
        tax:
          type: number
          description: "Tax amount of the fee in dollars. Only applicable in AU and UK regions.\r\n\r\nWhen TaxOutOfScope or TaxExempt is true, this value must be 0."
          format: double
          nullable: true
          example: 35
        taxInclusive:
          type: boolean
          description: "If true, the amount is tax inclusive, otherwise tax exclusive. Only applicable in AU and UK regions.\r\n\r\nTax inclusive means: Amount exc. tax = Amount - Tax, Amount inc. tax = Amount.\r\n\r\nTax exclusive means: Amount exc. tax = Amount, Amount inc. tax = Amount + Tax.\r\n\r\n(Amount = Rate for fixed fees, or Rate * Duration for time fees, Tax = value of the Tax field)"
          example: false
        taxExempt:
          type: boolean
          description: "True if the fee is exempt from tax.\r\n\r\nThis field is mutually exclusive with TaxOutOfScope.\r\nWhen true, Tax must be 0."
          example: false
        taxOutOfScope:
          type: boolean
          description: "True if the fee is out of scope for tax purposes. Only supported in UK regions.\r\n\r\nThis field is mutually exclusive with TaxExempt.\r\nWhen true, Tax must be 0."
          example: false
        finalized:
          type: boolean
          description: True if the fee has been finalized.
          example: false
        isWrittenOff:
          type: boolean
          description: "True if the fee is written off. True only allowed if IsBillable is true.\r\n\r\nWritten off fee will show on an invoice with their amount, but will not be counted in the invoice total."
          example: false
        isBillable:
          type: boolean
          description: >-
            True if the fee is billable. Non-billable fee will, by default, not
            be shown on invoices (and, if shown, the amount will be 0).
          example: false
        isInvoicedExternally:
          type: boolean
          description: True if the fee is invoiced externally.
          example: false
        sourceItems:
          type: array
          items:
            $ref: '#/components/schemas/FeeSourceItemDto'
          description: The source items on the fee.
          nullable: true
        createdFromActivityId:
          type: string
          description: "Associates an existing activity id to a fee.\r\nOnly valid for Fee creation. \r\nValue is supplied by Smokeball for some partners."
          nullable: true
          example: 504b9f77-20c7-4dee-8227-d3007c8f6cea
      additionalProperties: false
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    FeeType:
      enum:
        - 0
        - 1
      type: integer
      description: The type of the fee (Fixed = 0, Time = 1).
      format: int32
    FeeSourceItemDto:
      type: object
      properties:
        description:
          type: string
          description: The description.
          nullable: true
          example: Print document
        duration:
          type: integer
          description: The duration in minutes.
          format: int64
          example: 5
        isBillable:
          type: boolean
          description: True if the fee source item is billable.
          example: false
      additionalProperties: false
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````