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

# Profilo aziendale

> Un profilo che si adatta alla dimensione dell'azienda: le grandi aziende includono un confronto con i peer, le più piccole una vista di rischio più approfondita. È presente esattamente uno dei due rami.



## OpenAPI

````yaml api-reference/openapi.it.json GET /companies/{taxId}/profile
openapi: 3.1.0
info:
  title: API Syrto (esempio)
  version: 1.0.0
  description: >-
    Una specifica di esempio per gli endpoint di esempio dell'API Syrto, fornita
    per la consultazione interattiva. La tua API è configurata per cliente -
    scarica la tua specifica con la tua API key per vedere esattamente cosa può
    chiamare la tua organizzazione.
servers:
  - url: https://api.syrto.ai
security:
  - bearerAuth: []
paths:
  /companies/{taxId}/profile:
    get:
      summary: Profilo aziendale
      description: >-
        Un profilo che si adatta alla dimensione dell'azienda: le grandi aziende
        includono un confronto con i peer, le più piccole una vista di rischio
        più approfondita. È presente esattamente uno dei due rami.
      operationId: company-profile
      parameters:
        - name: taxId
          in: path
          required: true
          description: Il codice fiscale italiano dell'azienda. Qualsiasi valore non vuoto.
          schema:
            type: string
            minLength: 1
          example: '01654010345'
      responses:
        '200':
          description: Il profilo aziendale.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyProfile'
                  meta:
                    $ref: '#/components/schemas/Meta'
              example:
                data:
                  id: Zm86SVRfMDE2NTQwMTAzNDVfVTox
                  identity:
                    legalName: BARILLA G. E R. FRATELLI - SOCIETÀ PER AZIONI
                    legalForm: S.p.A.
                    foundingYear: 1877
                    incorporationDate: '1877-01-01'
                    isQuoted: false
                    vatNumber: '01654010345'
                    fiscalCode: '01654010345'
                    naceCode: '10.73'
                    naceSection: C
                    address: null
                  latest:
                    year: 2023
                    isForecasted: false
                    size: L
                    statementDate: '2023-12-31'
                    employees: 8760
                    employeesYoY: 0.03
                  peerCount: 2
                  peers:
                    - id: Zm86SVRfMDExMjM0NTY3ODlfVToy
                      identity:
                        legalName: PASTIFICIO ESEMPIO S.P.A.
                        legalForm: S.p.A.
                        foundingYear: 1952
                        incorporationDate: '1952-05-01'
                        isQuoted: false
                        vatNumber: '01123456789'
                        fiscalCode: '01123456789'
                        naceCode: '10.73'
                        naceSection: C
                        address: null
                      latest:
                        year: 2023
                        isForecasted: false
                        size: L
                        statementDate: '2023-12-31'
                        employees: 3200
                        employeesYoY: 0.01
                meta:
                  requestId: req_018f9c2e7b7a7c3e9a1b2c3d4e5f6a7b
                  endpoint: company-profile
                  usage:
                    quantity: 8
                    unit: credits
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/InvalidParams'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    CompanyProfile:
      type: object
      description: >-
        I campi di base sono sempre presenti; poi esattamente uno tra il ramo
        grande azienda (peerCount, peers) o il ramo azienda più piccola (risk).
      properties:
        id:
          type: string
        identity:
          $ref: '#/components/schemas/CompanyIdentity'
        latest:
          anyOf:
            - $ref: '#/components/schemas/AnnualSnapshot'
            - type: 'null'
        peerCount:
          type: number
          description: Ramo grande azienda.
        peers:
          type: array
          description: Ramo grande azienda.
          items:
            type: object
            properties:
              id:
                type: string
              identity:
                $ref: '#/components/schemas/CompanyIdentity'
              latest:
                anyOf:
                  - $ref: '#/components/schemas/AnnualSnapshot'
                  - type: 'null'
        risk:
          description: Ramo azienda più piccola.
          allOf:
            - $ref: '#/components/schemas/RiskIndicators'
            - type: object
              properties:
                stateAids:
                  type:
                    - object
                    - 'null'
                  properties:
                    count:
                      type:
                        - number
                        - 'null'
                    amount:
                      type:
                        - number
                        - 'null'
                history:
                  type: array
                  items:
                    $ref: '#/components/schemas/AnnualSnapshot'
    Meta:
      type: object
      description: Metadati sulla chiamata.
      required:
        - requestId
        - endpoint
        - usage
      properties:
        requestId:
          type: string
          description: Id univoco della richiesta (req_ seguito da un UUID).
        endpoint:
          type: string
          description: Lo slug dell'endpoint che ha servito la richiesta.
        usage:
          $ref: '#/components/schemas/Usage'
    CompanyIdentity:
      type: object
      description: Informazioni descrittive, non finanziarie, su un'azienda.
      properties:
        legalName:
          type:
            - string
            - 'null'
        legalForm:
          type:
            - string
            - 'null'
        foundingYear:
          type:
            - number
            - 'null'
        incorporationDate:
          type:
            - string
            - 'null'
        isQuoted:
          type:
            - boolean
            - 'null'
        vatNumber:
          type:
            - string
            - 'null'
        fiscalCode:
          type:
            - string
            - 'null'
        naceCode:
          type:
            - string
            - 'null'
        naceSection:
          type:
            - string
            - 'null'
        address:
          anyOf:
            - $ref: '#/components/schemas/Address'
            - type: 'null'
    AnnualSnapshot:
      type: object
      description: Un singolo esercizio con le cifre di sintesi.
      properties:
        year:
          type: number
        isForecasted:
          type: boolean
        size:
          type:
            - string
            - 'null'
        statementDate:
          type:
            - string
            - 'null'
        employees:
          type:
            - number
            - 'null'
        employeesYoY:
          type:
            - number
            - 'null'
    RiskIndicators:
      type: object
      description: Flag di rischio booleani; ciascuno è true, false o null se sconosciuto.
      properties:
        protestsOfBill:
          type:
            - boolean
            - 'null'
        insolvencyProceedings:
          type:
            - boolean
            - 'null'
        insolvencyApplications:
          type:
            - boolean
            - 'null'
        assetEncumbrances:
          type:
            - boolean
            - 'null'
        officersWithRiskIndicators:
          type:
            - boolean
            - 'null'
    Usage:
      type: object
      description: La misura d'uso registrata per la chiamata.
      required:
        - quantity
        - unit
      properties:
        quantity:
          type: number
        unit:
          type: string
          examples:
            - credits
            - calls
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
              description: Codice di errore stabile e leggibile dalle macchine.
              enum:
                - missing_api_key
                - invalid_api_key
                - credits_exhausted
                - limit_reached
                - client_not_configured
                - not_entitled
                - unknown_endpoint
                - not_found
                - invalid_params
                - rate_limited
                - internal_error
                - upstream_error
                - auth_unavailable
                - entitlement_unavailable
                - upstream_timeout
            message:
              type: string
            requestId:
              type: string
            details:
              type: array
              description: Presente solo per gli errori di validazione.
              items:
                type: object
                properties:
                  path:
                    type: string
                  message:
                    type: string
    Address:
      type: object
      properties:
        line1:
          type:
            - string
            - 'null'
        line2:
          type:
            - string
            - 'null'
        locality:
          type:
            - string
            - 'null'
        postalCode:
          type:
            - string
            - 'null'
        countryCode:
          type: string
  responses:
    Unauthorized:
      description: API key mancante o non valida.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_api_key
              message: The API key is not recognised.
              requestId: req_018f9c2e7b7a7c3e9a1b2c3d4e5f6a7b
    NotFound:
      description: Nessuna azienda corrisponde all'identificatore. Non addebitata.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: No company matches that identifier.
              requestId: req_018f9c2e7b7a7c3e9a1b2c3d4e5f6a7b
    InvalidParams:
      description: Un parametro di path o query non ha superato la validazione.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_params
              message: Invalid request parameters.
              requestId: req_018f9c2e7b7a7c3e9a1b2c3d4e5f6a7b
              details:
                - path: path.fiscalCode
                  message: >-
                    fiscalCode must be an 11-digit tax/VAT code or a
                    16-character codice fiscale
    RateLimited:
      description: Rate limit superato. Vedi l'header Retry-After.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Rate limit exceeded.
              requestId: req_018f9c2e7b7a7c3e9a1b2c3d4e5f6a7b
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key associata all'organizzazione (sk_...), inviata come
        Authorization: Bearer <key>.

````