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

# Set business entity config

> Replace all configs for a business entity. Each item is one country/currency row.



## OpenAPI

````yaml /openAPI/openapi-20240301.json put /business_entities/{business_entity_id}/config
openapi: 3.1.0
info:
  title: zenskar
  version: 2.0.0
servers:
  - url: https://api.zenskar.com
security:
  - ApiTokenAuth: []
    OrganisationAuth: []
paths:
  /business_entities/{business_entity_id}/config:
    put:
      tags:
        - Business Entities
      summary: Set business entity config
      description: >-
        Replace all configs for a business entity. Each item is one
        country/currency row.
      operationId: Set-business-entity-config
      parameters:
        - name: business_entity_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Business Entity Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BusinessEntityConfigItemSchema'
              title: Payload
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessEntityConfigResponseSchema'
                title: Response Set-Business-Entity-Config
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BusinessEntityConfigItemSchema:
      properties:
        country_code:
          type: string
          maxLength: 2
          minLength: 2
          title: Country Code
          description: ISO country code (e.g. IN, US, CA)
        currency_code:
          type: string
          maxLength: 3
          minLength: 3
          title: Currency Code
          description: ISO currency code (e.g. INR, USD)
        is_enabled:
          type: boolean
          title: Is Enabled
          description: Whether tax is enabled for this country/currency
          default: true
        tax_calculation_method:
          $ref: '#/components/schemas/TaxCalculationMethod'
          description: 'Calculator to use: NATIVE, AVALARA, or ANROK'
      type: object
      required:
        - country_code
        - currency_code
        - tax_calculation_method
      title: BusinessEntityConfigItemSchema
      description: A single country/currency config entry.
    BusinessEntityConfigResponseSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Config row ID
        organization_id:
          type: string
          format: uuid
          title: Organization Id
          description: Organisation ID
        business_entity_id:
          type: string
          format: uuid
          title: Business Entity Id
          description: Business entity ID
        country_code:
          type: string
          title: Country Code
          description: ISO country code
        currency_code:
          type: string
          title: Currency Code
          description: ISO currency code
        is_enabled:
          type: boolean
          title: Is Enabled
          description: Whether tax is enabled
        tax_calculation_method:
          type: string
          title: Tax Calculation Method
          description: 'Calculator: NATIVE, AVALARA, or ANROK'
      type: object
      required:
        - id
        - organization_id
        - business_entity_id
        - country_code
        - currency_code
        - is_enabled
        - tax_calculation_method
      title: BusinessEntityConfigResponseSchema
      description: Response shape for a single business entity config row.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaxCalculationMethod:
      type: string
      enum:
        - NATIVE
        - AVALARA
        - ANROK
      title: TaxCalculationMethod
      description: |-
        Tax engine selected per (business_entity, country, currency).

        Persisted as the string value (e.g. ``"NATIVE"``) on
        ``business_entity_config.tax_calculation_method``. Equality comparisons
        against raw strings work because the class inherits from ``str``.
    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
  securitySchemes:
    ApiTokenAuth:
      type: apiKey
      in: header
      name: x-api-key
      x-default: <your-api-key>
    OrganisationAuth:
      type: apiKey
      in: header
      name: organisation
      x-default: <your-organisation-id>

````