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

# List Establishments

> List Establishments for an Issuer.



## OpenAPI

````yaml /openapi.json get /issuers/{issuer_id}/establishments
openapi: 3.1.0
info:
  title: Factio SRI API
  description: >-
    Plataforma headless, multi-tenant, API-first para emitir comprobantes
    electrónicos válidos ante el SRI de Ecuador.


    ## Autenticación


    Soporta tres métodos:

    - **JWT Bearer por Google OAuth**: `/auth/google/callback`

    - **JWT Bearer por email/password**: `/auth/login`

    - **API Key**: header `X-API-Key` con clave generada en `/auth/api-keys`


    ## Multi-tenant


    El aislamiento por tenant combina PostgreSQL RLS y validaciones explícitas
    en backend. El `tenant_id` se resuelve desde el contexto de autenticación.


    ## Flujo de Emisión


    1. `POST /documents` — reserva secuencial y encola el documento (responde
    202)

    2. `GET /documents/{id}` — consulta el estado actual por polling

    3. Cuando `status = AUTHORIZED`, el campo `authorization_number` contiene la
    clave de autorización del SRI


    Documentación completa en https://docs.factioapp.com
  version: 0.1.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://api.factioapp.com
    description: Producción
  - url: https://api.staging.factioapp.com
    description: Sandbox (datos de prueba, sin efecto fiscal real)
security: []
paths:
  /issuers/{issuer_id}/establishments:
    get:
      tags:
        - establishments
        - emission-points
      summary: List Establishments
      description: List Establishments for an Issuer.
      operationId: list_establishments_issuers__issuer_id__establishments_get
      parameters:
        - name: issuer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Issuer Id
        - name: is_active
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Filter by active status
            title: Is Active
          description: Filter by active status
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Items per page
            default: 20
            title: Page Size
          description: Items per page
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - name: x-tenant-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Tenant-Id
        - name: factio_access_token
          in: cookie
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Factio Access Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstablishmentListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    EstablishmentListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/EstablishmentResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
      type: object
      required:
        - items
        - total
        - page
        - page_size
      title: EstablishmentListResponse
      description: Schema for paginated list of Establishments.
      example:
        items: []
        page: 1
        page_size: 20
        total: 0
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EstablishmentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        issuer_id:
          type: string
          format: uuid
          title: Issuer Id
        code:
          type: string
          title: Code
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        address:
          type: string
          title: Address
        is_active:
          type: boolean
          title: Is Active
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - tenant_id
        - issuer_id
        - code
        - name
        - address
        - is_active
        - created_at
        - updated_at
      title: EstablishmentResponse
      description: Schema for Establishment response.
      example:
        address: Av. Principal 123, Quito, Ecuador
        code: '001'
        created_at: '2024-01-01T00:00:00Z'
        id: 770e8400-e29b-41d4-a716-446655440000
        is_active: true
        issuer_id: 550e8400-e29b-41d4-a716-446655440000
        name: Matriz
        tenant_id: 660e8400-e29b-41d4-a716-446655440000
        updated_at: '2024-01-01T00:00:00Z'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````