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

# Update a tax

> Updates an existing tax's information.

## Use Cases
- Modify tax percentage rates
- Update tax descriptions
- Activate/deactivate taxes
- Change tax names

## Path Parameters
- `id`: Tax UUID (required) - Must be a valid UUID format

## Example Request
`PUT /api/v0/taxes/123e4567-e89b-12d3-a456-426614174000`

## Example Request Body
```json
{
  "name": "Updated Sales Tax",
  "description": "Updated sales tax rate",
  "percentage": 9.0,
  "active": true
}
```

## Notes
- Only include fields that need to be updated
- All fields are optional in updates
- Percentage changes affect future calculations only



## OpenAPI

````yaml /swagger.yml put /api/v0/taxes/{id}
openapi: 3.0.0
info:
  title: Devdraft AI Payment & Business Management API
  description: >-

    A comprehensive payment processing and business management API that enables
    seamless integration of cryptocurrency and traditional payment methods.
        
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.devdraft.ai
    description: Production Server
security: []
tags: []
paths:
  /api/v0/taxes/{id}:
    put:
      tags:
        - Taxes
      summary: Update a tax
      description: |-
        Updates an existing tax's information.

        ## Use Cases
        - Modify tax percentage rates
        - Update tax descriptions
        - Activate/deactivate taxes
        - Change tax names

        ## Path Parameters
        - `id`: Tax UUID (required) - Must be a valid UUID format

        ## Example Request
        `PUT /api/v0/taxes/123e4567-e89b-12d3-a456-426614174000`

        ## Example Request Body
        ```json
        {
          "name": "Updated Sales Tax",
          "description": "Updated sales tax rate",
          "percentage": 9.0,
          "active": true
        }
        ```

        ## Notes
        - Only include fields that need to be updated
        - All fields are optional in updates
        - Percentage changes affect future calculations only
      operationId: TaxController_update
      parameters:
        - name: id
          required: true
          in: path
          description: Tax unique identifier (UUID)
          schema:
            format: uuid
            example: tax_123e4567-e89b-12d3-a456-426614174000
            type: string
      requestBody:
        required: true
        description: Tax update data - only include fields you want to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaxDto'
      responses:
        '200':
          description: Successfully updated tax
        '400':
          description: Bad Request - Invalid input data or tax ID format
        '401':
          description: Unauthorized - Invalid API credentials
        '404':
          description: Not Found - Tax not found
      security:
        - x-client-secret: []
        - x-client-key: []
components:
  schemas:
    UpdateTaxDto:
      type: object
      properties:
        name:
          type: string
          description: Tax name for identification and display purposes
          example: Updated Sales Tax
          maxLength: 100
        description:
          type: string
          description: Detailed description of what this tax covers
          example: Updated description for retail sales tax
          maxLength: 255
        percentage:
          type: number
          description: Tax rate as a percentage (0-100)
          example: 9.5
          minimum: 0
          maximum: 100
        active:
          type: boolean
          description: Whether this tax is currently active and can be applied
          example: false
        appIds:
          type: array
          description: Array of app IDs where this tax should be available
          example:
            - app_123e4567-e89b-12d3-a456-426614174000
          items:
            type: string
            format: uuid
  securitySchemes:
    x-client-secret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Your secret API key. Keep this secure and never expose it in client-side
        code.
    x-client-key:
      type: apiKey
      in: header
      name: x-client-key
      description: Your unique client API key. Obtain this from your Devdraft AI dashboard.

````