Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Verifica validità partita iva
- x-commons:
- ratelimit-headers: &ratelimit-headers
- X-RateLimit-Limit:
- $ref: '#/components/headers/X-RateLimit-Limit'
- X-RateLimit-Remaining:
- $ref: '#/components/headers/X-RateLimit-Remaining'
- X-RateLimit-Reset:
- $ref: '#/components/headers/X-RateLimit-Reset'
- common-responses: &common-responses
- '400':
- $ref: '#/components/responses/400BadRequest'
- '401':
- $ref: '#/components/responses/401Unauthorized'
- '429':
- $ref: '#/components/responses/429TooManyRequests'
- '503':
- $ref: '#/components/responses/503ServiceUnavailable'
- default:
- $ref: '#/components/responses/default'
- security:
- - IBM-Client-Secret: []
- IBM-Client-Id: []
- openapi: 3.0.0
- info:
- version: "1.0.0"
- title: |-
- Verifica validità partita iva.
- x-summary: >-
- Verifica di validità di partita iva e recupero di alcuni dati anagrafici
- description: |
- #### Documentazione
- Questo servizio ritorna la validità di una partita iva. In caso riscontro positivo
- vengono fornite alcune informazioni di tipo
- anagrafico tra cui eventuali riferimenti al GRUPPO IVA:
- - STATO, DENOMINAZIONE, DATA INIZIO ATTIVITA', DATA CESSAZIONE, DATA SOSPENSIONE
- ##### Denominazione
- Per le ditte individuali viene fornita la denominazione se dichiarata, diversamente il cognome e nome del titolare
- ##### Gruppo Iva
- Il concetto di *GRUPPO IVA* può essere approfondito al seguente
- [link](https://www.agenziaentrate.gov.it/portale/web/guest/schede/istanze/costituzione-gruppo-iva/scheda-informativa-costituzione-gruppoiva).
- #### Note
- Poiché il servizio effettua una verifica sul dato in input una risposta verrà sempre ritornata con stato 200
- anche se la partita iva in input non fosse presente negli archivi.
- Alcune "DATE" potrebbero essere espresse nei seguenti formati '1001-01-01', '9999-12-31'.
- Tali date devono essere interpretate come informazioni assenti o non certe.
- E' in corso una revisione degli archivi dell'Agenzia Delle Entrate per sanare queste informazioni.
- Il servizio non richiede autenticazione, ma va' usato rispettando gli
- header di throttling esposti in conformita' alle Linee Guida del Modello di interoperabilita'.
- ##### Confomrmità con il modello di interoperabilità
- L'Header di Throttling X-RateLimit-Reset non viene inviato in caso di https status code 200, sarà presente solo in caso di 429
- #### Sicurezza
- Pur essendo questa API di pubblico accesso, è richiesto l'invio delle API Key che consentono all'infrastruttura
- di applicare le politiche di throttling definite nell'ambito del piano sottoscritto
- #### Informazioni tecniche ed esempi
- Esempio:
- ```
- curl https://api.agenziaentrate.gov.it/entrate/api/partita-iva/v0/verifica/06363391001
- {
- "partitaIva": "06363391001",
- "valida": true,
- "stato": "ATTIVA",
- "denominazione": "AGENZIA DELLE ENTRATE",
- "dataInizioAttivita": "2001-01-02"
- }
- ```
- contact:
- name: Agenzia delle Entrate
- url: https://www.agenziaentrate.gov.it
- x-audience:
- - public
- x-api-id: 5ca54741-8f62-4aad-ab79-13ae762920e3
- license:
- name: Apache 2.0
- url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
- tags:
- - name: public
- description: |-
- Endpoint non autenticato per la verifica dello stato del servizio
- - name: verifiche
- description: |-
- verifica la validità e l'esistenza della partita iva in input
- servers:
- - description: Produzione
- url: https://api.agenziaentrate.gov.it/entrate/api/partita-iva/v0
- paths:
- /status:
- get:
- summary: Ritorna lo stato dell'applicazione.
- description: |
- Ritorna lo stato dell'applicazione: 200 se funziona correttamente
- o un errore se l'applicazione è temporaneamente indisponibile
- per manutenzione o per un problema tecnico.
- operationId: get_status
- tags:
- - public
- responses:
- <<: *common-responses
- '200':
- description: |
- Il server ha ritornato lo status. In caso di problemi
- ritorna sempre un problem+json.
- headers:
- <<: *ratelimit-headers
- content:
- application/problem+json:
- schema:
- $ref: '#/components/schemas/Problem'
- /verifica:
- post:
- summary: Valida una partita iva.
- description: |
- Ritorna informazioni sulla validità della partita iva
- e in caso di esito positivo vengono aggiunte alcune informazioni anagrafiche.
- operationId: post_partita_iva
- tags:
- - verifiche
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Richiesta'
- examples:
- partitaIvaNumerica:
- value:
- partitaIva: '06363391001'
- responses:
- <<: *common-responses
- '200':
- description: |
- Il servizio ha ritornato l'esito della validazione - che può essere positivo o negativo -
- a seconda del valore del campo `valida`.
- Attenzione! Le partite iva valide possono essere o meno attive: va quindi sempre
- verificato il contenuto della response.
- # header di throttling sono obbligatori
- headers:
- <<: *ratelimit-headers
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/VerificaPartitaIva'
- examples: # Esempi per ogni casistica
- Invalida:
- value:
- partitaIva: '01043931007'
- valida: false
- Attiva:
- value: &example_partita_iva_attiva
- partitaIva: '06363391001'
- valida: true
- stato: 'ATTIVA'
- denominazione: 'AGENZIA DELLE ENTRATE'
- dataInizioAttivita: '2001-01-02'
- Sospesa:
- value:
- <<: *example_partita_iva_attiva
- stato: 'SOSPESA'
- dataInizioSospensione: '2013-03-15'
- Cessata:
- value:
- <<: *example_partita_iva_attiva
- stato: 'CESSATA'
- dataCessazioneAttivita: '1989-01-01'
- GruppoIva:
- value:
- <<: *example_partita_iva_attiva
- isGruppoIva: true
- PartecipanteGruppoIva:
- value:
- <<: *example_partita_iva_attiva
- isPartecipanteGruppoIva: true
- dataInizioPartecipazioneGruppoIva: '2018-10-27'
- partitaIvaGruppo: '06363391001'
- components:
- schemas:
- Richiesta:
- type: object
- properties:
- partitaIva:
- $ref: '#/components/schemas/PartitaIva'
- PartitaIva:
- type: string
- maxLength: 11
- minLength: 11
- pattern: '^[0-9]+'
- example: '06363391001'
- VerificaPartitaIva:
- type: object
- properties:
- partitaIva:
- $ref: '#/components/schemas/PartitaIva'
- valida:
- type: boolean
- example: true
- stato:
- type: string
- enum:
- - ATTIVA
- - CESSATA
- - SOSPESA
- example: 'ATTIVA'
- denominazione:
- type: string
- example: 'AGENZIA DELLE ENTRATE'
- dataInizioAttivita:
- type: string
- format: date
- example: '1982-05-22'
- dataCessazioneAttivita:
- type: string
- format: date
- example: '1982-05-22'
- dataInizioSospensione:
- type: string
- format: date
- example: '1982-05-22'
- isGruppoIva:
- type: boolean
- example: false
- partitaIvaGruppo:
- $ref: '#/components/schemas/PartitaIva'
- dataInizioPartecipazioneGruppoIva:
- type: string
- format: date
- example: '1982-05-22'
- isPartecipanteGruppoIva:
- type: boolean
- example: false
- Problem:
- properties:
- detail:
- description: |
- A human readable explanation specific to this occurrence of the
- problem. You MUST NOT expose internal informations, personal
- data or implementation details through this field.
- example: Request took too long to complete.
- type: string
- instance:
- description: |
- An absolute URI that identifies the specific occurrence of the problem.
- It may or may not yield further information if dereferenced.
- format: uri
- type: string
- status:
- description: |
- The HTTP status code generated by the origin server for this occurrence
- of the problem.
- example: 503
- exclusiveMaximum: true
- format: int32
- maximum: 600
- minimum: 100
- type: integer
- title:
- description: |
- A short, summary of the problem type. Written in english and readable
- for engineers (usually not suited for non technical stakeholders and
- not localized); example: Service Unavailable
- type: string
- type:
- default: about:blank
- description: |
- An absolute URI that identifies the problem type. When dereferenced,
- it SHOULD provide human-readable documentation for the problem type
- (e.g., using HTML).
- format: uri
- type: string
- type: object
- securitySchemes:
- IBM-Client-Secret:
- type: apiKey
- description: ''
- name: X-IBM-Client-Secret
- in: header
- IBM-Client-Id:
- type: apiKey
- description: ''
- name: X-IBM-Client-Id
- in: header
- headers:
- Retry-After:
- description: |-
- Retry contacting the endpoint *at least* after seconds.
- See https://tools.ietf.org/html/rfc7231#section-7.1.3
- schema:
- type: string
- WWW-Authenticate:
- description: |-
- Auth realm=APIkey
- See https://tools.ietf.org/html/rfc7235#section-4.1
- schema:
- type: string
- X-RateLimit-Limit:
- description: The number of allowed requests in the current period
- schema:
- type: string
- X-RateLimit-Remaining:
- description: The number of remaining requests in the current period
- schema:
- type: string
- X-RateLimit-Reset:
- description: The number of seconds left in the current period
- schema:
- type: string
- responses:
- 400BadRequest:
- content:
- application/problem+json:
- schema:
- $ref: '#/components/schemas/Problem'
- description: Bad Request
- 401Unauthorized:
- content:
- application/problem+json:
- schema:
- $ref: '#/components/schemas/Problem'
- headers:
- WWW-Authenticate:
- $ref: '#/components/headers/WWW-Authenticate'
- description: Not authorized
- 403Forbidden:
- description: Forbidden
- 404NotFound:
- description: Not Found
- 429TooManyRequests:
- description: Too many requests
- headers:
- Retry-After:
- $ref: '#/components/headers/Retry-After'
- X-RateLimit-Limit:
- $ref: '#/components/headers/X-RateLimit-Limit'
- X-RateLimit-Remaining:
- $ref: '#/components/headers/X-RateLimit-Remaining'
- X-RateLimit-Reset:
- $ref: '#/components/headers/X-RateLimit-Reset'
- 503ServiceUnavailable:
- content:
- application/problem+json:
- schema:
- $ref: '#/components/schemas/Problem'
- description: Service Unavailable
- headers:
- Retry-After:
- $ref: '#/components/headers/Retry-After'
- default:
- description: Unexpected error
Add Comment
Please, Sign In to add comment