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

# Obtener fiscal_group por UUID



## OpenAPI

````yaml espanol/api-reference/openapi.json GET /admin/fiscal-groups/{id}
openapi: 3.0.1
info:
  title: Api V3 documentación
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.artisn.desarrollo-redbrand.com/api
  - url: https://api.kfc-group.desarrollo-redbrand.com
  - url: https://{apiId}.execute-api.{region}.amazonaws.com/{stage}
    description: API Gateway (PRIVATE; invocación típica vía VPC endpoint).
    variables:
      apiId:
        default: '{api-id}'
        description: ID del API REST desplegado.
      region:
        default: us-east-1
      stage:
        default: dev
        description: Mismo valor que parámetro EnvironmentName del stack.
security:
  - bearerAuth: []
paths:
  /admin/fiscal-groups/{id}:
    get:
      tags:
        - Admin
      summary: Obtener fiscal_group por UUID
      operationId: getFiscalGroup
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: fiscal_group encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FiscalGroup'
        '400':
          description: id no UUID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorMessage'
        '404':
          description: No encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorMessage'
components:
  schemas:
    FiscalGroup:
      type: object
      additionalProperties: true
      description: Propiedades en camelCase según respuesta Drizzle/JSON.
      properties:
        id:
          type: string
          format: uuid
        externalId:
          type: string
        name:
          type: string
        uf:
          type: string
        taxRegime:
          type: string
        stores:
          $ref: '#/components/schemas/StoresJson'
        taxMatrix:
          $ref: '#/components/schemas/TaxMatrixJson'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ApiErrorMessage:
      type: object
      required:
        - message
      properties:
        message:
          type: string
        error:
          type: string
    StoresJson:
      type: array
      description: >
        Arreglo JSON persistido en `fiscal_groups.stores`. Debe incluir al menos
        un objeto con `store_id`

        para que `findFiscalGroupByStoreId` pueda resolver la tienda desde
        `payload.store.id`.
      items:
        $ref: '#/components/schemas/FiscalGroupStoreEntry'
    TaxMatrixJson:
      type: object
      description: >
        Mapa código NCM → reglas (`tax_matrix` en BD). Claves típicamente
        numéricas de 8 dígitos (string).

        El motor usa `taxMatrix[ncm]` tras resolver el NCM del catálogo de
        producto.
      additionalProperties:
        $ref: '#/components/schemas/TaxMatrixEntry'
    FiscalGroupStoreEntry:
      type: object
      description: Elemento del arreglo JSON `stores` (asociación tienda ↔ grupo fiscal).
      required:
        - store_id
      properties:
        store_id:
          type: string
          description: >-
            Identificador de tienda; el motor fiscal busca coincidencia por este
            valor (string).
        store_name:
          type: string
          description: Nombre legible (opcional, no usado en el cálculo de impuestos).
    TaxMatrixEntry:
      type: object
      description: >-
        Reglas por NCM; misma forma que `src/types/fiscal.ts`
        (`TaxMatrixEntry`).
      properties:
        NCM:
          type: string
          description: Código NCM (suele coincidir con la clave del mapa).
        CEST:
          type: string
          nullable: true
        CST_ICMS:
          type: string
        ICMS_rate:
          type: number
        ICMS_reduction:
          type: number
          nullable: true
        CST_PIS:
          type: string
        PIS_rate:
          type: number
        CST_COFINS:
          type: string
        COFINS_rate:
          type: number
        CFOP:
          type: string
        FCP_rate:
          type: number
          nullable: true
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````