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

# Update service

> Partially updates a service. Only the fields provided in the request body will be updated.



## OpenAPI

````yaml patch /v1/businesses/{businessId}/catalog/services/{serviceId}
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/catalog/services/{serviceId}:
    patch:
      tags: []
      summary: Update service
      description: >-
        Partially updates a service. Only the fields provided in the request
        body will be updated.
      operationId: business.catalog.services.service.patch
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business.
          required: true
          schema:
            type: string
            format: uuid
        - name: serviceId
          in: path
          description: The UUID of the service.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchServiceParams'
      responses:
        '200':
          description: Service updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiService'
        '404':
          description: Service not found.
components:
  schemas:
    PatchServiceParams:
      type: object
      properties:
        external_id:
          type: string
          nullable: true
          description: Update the external identifier for the service.
        name:
          type: string
          description: Update the name of the service.
        account_identifier:
          $ref: '#/components/schemas/AccountIdentifier'
          nullable: true
          description: >-
            Update the ledger account identifier. Set to null to remove the
            account association.
        billable_rate_per_minute_amount:
          type: integer
          format: int64
          nullable: true
          description: Update the billable rate per minute in cents.
        memo:
          type: string
          nullable: true
          description: Update the memo.
        metadata:
          type: object
          additionalProperties: true
          nullable: true
          description: Update the custom metadata.
      description: >-
        Partial update parameters for a service. Only specified fields will be
        updated.
    ApiService:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the service.
        business_id:
          type: string
          format: uuid
          description: The UUID of the business this service belongs to.
        external_id:
          type: string
          nullable: true
          description: >-
            An optional external identifier for the service, used for
            idempotency.
        name:
          type: string
          description: The name of the service.
        account_identifier:
          $ref: '#/components/schemas/AccountIdentifier'
          nullable: true
          description: The ledger account identifier for revenue tracking.
        ledger_account:
          $ref: '#/components/schemas/SingleApiChartAccount'
          nullable: true
          description: The ledger account associated with this service.
        billable_rate_per_minute_amount:
          type: integer
          format: int64
          nullable: true
          description: >-
            The billable rate per minute for this service in cents (e.g., 100 =
            $1.00 per minute or $60.00 per hour).
        memo:
          type: string
          nullable: true
          description: Optional memo or notes about the service.
        metadata:
          type: object
          additionalProperties: true
          nullable: true
          description: Custom metadata for the service.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the service was created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the service was last updated.
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the service was deleted, or null if not deleted.
      required:
        - id
        - business_id
        - name
        - created_at
        - updated_at
    AccountIdentifier:
      oneOf:
        - $ref: '#/components/schemas/AccountId'
          description: ID of the account.
          title: Account ID
        - $ref: '#/components/schemas/AccountStableName'
          description: Stable name associated with the account.
          title: Account Stable Name
    SingleApiChartAccount:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AccountIdentifier'
        name:
          type: string
          description: Name of the account.
          example: Current Assets
        account_number:
          type: string
          nullable: true
          description: Account number if configured.
          example: '4000'
        stable_name:
          $ref: '#/components/schemas/AccountStableName'
        normality:
          $ref: '#/components/schemas/BankTransactionDirection'
        account_type:
          $ref: '#/components/schemas/ApiLedgerAccountType'
        account_subtype:
          $ref: '#/components/schemas/ApiLedgerAccountSubtype'
      description: A single ledger account without nested children.
    AccountId:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          enum:
            - AccountId
          description: Resource type. Value will be `AccountId`.
          example: AccountId
        id:
          type: string
          format: uuid
          description: ID of the account.
    AccountStableName:
      type: object
      required:
        - type
        - stable_name
      properties:
        type:
          type: string
          enum:
            - StableName
          description: Resource type. Value will be `StableName`.
          example: StableName
        stable_name:
          type: string
          example: CURRENT_ASSETS
          description: Stable name of the account.
    BankTransactionDirection:
      type: string
      enum:
        - CREDIT
        - DEBIT
    ApiLedgerAccountType:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/LedgerAccountType'
          description: Type of the account.
        display_name:
          type: string
          description: Display name of the account type.
          example: Asset
    ApiLedgerAccountSubtype:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/LedgerAccountSubtype'
        display_name:
          type: string
          description: Display name of the account subtype.
          example: Current Assets
    LedgerAccountType:
      type: string
      enum:
        - ASSET
        - LIABILITY
        - EQUITY
        - REVENUE
        - COGS
        - EXPENSE
    LedgerAccountSubtype:
      type: string
      enum:
        - BANK_ACCOUNTS
        - ACCOUNTS_RECEIVABLE
        - INVENTORY
        - PAYMENT_PROCESSOR_CLEARING_ACCOUNT
        - FIXED_ASSET
        - ACCUMULATED_DEPRECIATION
        - CASH
        - UNDEPOSITED_FUNDS
        - CURRENT_ASSET
        - NON_CURRENT_ASSET
        - PREPAID_EXPENSES
        - DEVELOPMENT_COSTS
        - LOANS_RECEIVABLE
        - INTANGIBLE_ASSET
        - ACCOUNTS_PAYABLE
        - CREDIT_CARD
        - TAXES_PAYABLE
        - INCOME_TAXES_PAYABLE
        - SALES_TAXES_PAYABLE
        - OTHER_TAXES_PAYABLE
        - PAYROLL_TAXES_PAYABLE
        - UNEARNED_REVENUE
        - PAYROLL_LIABILITY
        - PAYROLL_CLEARING
        - LINE_OF_CREDIT
        - TIPS
        - REFUND_LIABILITIES
        - UNDEPOSITED_OUTFLOWS
        - OUTGOING_PAYMENT_CLEARING_ACCOUNT
        - OTHER_CURRENT_LIABILITY
        - LOANS_PAYABLE
        - NOTES_PAYABLE
        - SHAREHOLDER_LOAN
        - NON_CURRENT_LIABILITY
        - CONTRIBUTIONS
        - DISTRIBUTIONS
        - COMMON_STOCK
        - PREFERRED_STOCK
        - ADDITIONAL_PAID_IN_CAPITAL
        - RETAINED_EARNINGS
        - ACCUMULATED_ADJUSTMENTS
        - OPENING_BALANCE_EQUITY
        - OTHER_EQUITY
        - SALES
        - UNCATEGORIZED_REVENUE
        - RETURNS_ALLOWANCES
        - DIVIDEND_INCOME
        - INTEREST_INCOME
        - OTHER_INCOME
        - COGS
        - OPERATING_EXPENSES
        - PAYROLL
        - TAXES_LICENSES
        - UNCATEGORIZED_EXPENSE
        - CHARITABLE_CONTRIBUTIONS
        - LOAN_EXPENSES
        - FINANCE_COSTS
        - INTEREST_EXPENSES
        - DEPRECIATION
        - AMORTIZATION
        - BAD_DEBT
        - OTHER_EXPENSES
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````