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

# RUC - Establecimientos

> Consulta establecimientos por RUC.



## OpenAPI

````yaml POST /ruc/establecimientos
openapi: 3.0.1
info:
  title: json.pe - API Consulta RUC, DNI, Placa, SOAT, Licencia de Conducir y más
  description: >-
    Documentación oficial de [json.pe](https://json.pe) — API Consulta RUC, DNI,
    Placa, SOAT, Licencia de Conducir y más. Regístrate gratis en
    [json.pe/signup](https://json.pe/signup).
  version: 1.0.0
servers:
  - url: https://api.json.pe/api
security:
  - bearerAuth: []
paths:
  /ruc/establecimientos:
    post:
      tags:
        - ruc
      description: Consulta establecimientos por RUC.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ruc-request'
      responses:
        '200':
          description: ruc response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ruc-anexo'
        '404':
          description: Recurso no encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              example:
                success: false
                message: No se encontró RUC
components:
  schemas:
    ruc-request:
      type: object
      required:
        - ruc
      properties:
        ruc:
          type: string
          description: El RUC a consultar
          example: '20552103816'
      example:
        ruc: '20552103816'
    ruc-anexo:
      type: object
      properties:
        success:
          type: boolean
          description: El estado de la respuesta  true o false
        message:
          type: string
          description: Mensaje de la respuesta
        data:
          type: array
          description: Datos detallados de la respuesta
          items:
            type: object
            properties:
              codigo:
                type: string
                description: Codigo del local
              tipo_establecimiento:
                type: string
                description: Tipo de establecimiento del local
              actividad_economica:
                type: string
                description: Actividad economica del local
              departamento:
                type: string
                description: Departamento del local
              provincia:
                type: string
                description: Provincia del local
              distrito:
                type: string
                description: Distrito del local
              direccion:
                type: string
                description: Dirección específica
              direccion_completa:
                type: string
                description: >-
                  Dirección completa, incluyendo distrito, provincia y
                  departamento
              ubigeo_sunat:
                type: string
                description: Ubigeo según SUNAT
              ubigeo:
                type: array
                description: Ubigeo desglosado por componentes
                items:
                  type: string
      example:
        success: true
        message: exito
        data:
          - codigo: '0003'
            tipo_establecimiento: DE. DEPOSITO
            actividad_economica: '-'
            direccion: MZA. E6 LOTE. 13 URB. PIT PARQUE INDUSTRIAL (MZ. E
            direccion_completa: >-
              MZA. E6 LOTE. 13 URB. PIT PARQUE INDUSTRIAL (MZ. E, LA LIBERTAD -
              TRUJILLO - LA ESPERANZA
            departamento: LA LIBERTAD
            provincia: TRUJILLO
            distrito: LA ESPERANZA
            ubigeo_sunat: '130105'
            ubigeo:
              - '13'
              - '1301'
              - '130105'
          - codigo: '0002'
            tipo_establecimiento: SU. SUCURSAL
            actividad_economica: '-'
            direccion: AV. EL EJERCITO NRO. 1020 INT. A BARR. EL MOLINO
            direccion_completa: >-
              AV. EL EJERCITO NRO. 1020 INT. A BARR. EL MOLINO, LA LIBERTAD -
              TRUJILLO - TRUJILLO
            departamento: LA LIBERTAD
            provincia: TRUJILLO
            distrito: TRUJILLO
            ubigeo_sunat: '130101'
            ubigeo:
              - '13'
              - '1301'
              - '130101'
    error:
      required:
        - message
        - success
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
      example:
        success: false
        message: Bad Request
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````