Definizione API PDND Connector

Endpoint del pdnd-connector

Il pdnd-connector espone endpoint specifici per ciascun e-service integrato, con diverse operazioni supportate tramite verbi HTTP.

Endpoint di Chiamata

Gli endpoint seguono una struttura che identifica l'erogatore e il servizio specifico. Ad esempio, per gli e-service ANPR (ANPR è l'erogatore), si utilizzano path come /e-services/anpr/<nome-e-service>. Esempi di <nome-e-service> includono accertamento-cittadinanza, stato-famiglia, accertamento-residenza.

Verbi HTTP Utilizzati

  • GET: Utilizzato per la fruizione degli e-service, ovvero per richiedere e ottenere i dati dal pdnd-connector, che a sua volta li recupera dagli enti erogatori (es. ANPR, INPS).

  • POST: Utilizzato per la validazione dei dati precedentemente ottenuti tramite GET. Questa operazione verifica che i dati non siano stati alterati prima di essere inviati dal Core.

  • Parametri Richiesti (Payload per POST, URL per GET):

    • Per GET (Fruizione): I parametri sono inclusi nella URL (query parameters). Esempi includono:

      • fiscalCode: Il codice fiscale dell'utente di cui si richiedono i dati.

      • format: Un parametro che specifica il formato in cui i dati devono essere restituiti dal pdnd-connector. Questo formato deve essere compatibile con il Nested Form di OpenCity che riceverà i dati.

      • Esempio URL: GET /e-services/anpr/stato-famiglia?fiscalCode=ABCDEF01G23H456I&format=statoFamigliaArchetipo

    • Per POST (Validazione): Il payload della richiesta POST deve contenere due campi principali:

      • data: L'oggetto JSON contenente i dati esatti (incluso il loro formato) così come ricevuti dalla risposta GET precedente, senza i metadati di isFromPdnd, isReadonly, isUpdatedToday.

      • meta: Un oggetto contenente la firma digitale (signature) dei dati, così come restituita dalla risposta GET.

  • Header Necessari: Per tutte le chiamate agli endpoint del pdnd-connector, è necessario includere un token JWT nell'header Authorization.

    • Authorization: Bearer <JWT_TOKEN>. Il pdnd-connector effettua una validazione del token. Per le API di configurazione (non direttamente usate da OpenCity per fruizione), è richiesto un admin token. Per le API di fruizione e validazione, è richiesto un user token, e il codice fiscale contenuto nel token viene verificato con quello eventualmente presente nella URL.

Esempi di chiamate API

Di seguito, alcuni esempi di richieste e risposte per chiarire il flusso di integrazione.

Accertamento Residenza

Richiesta:

Risposta:

È disponibile anche il formato "residenza_archetipo" che include campi aggiuntivi:

Stato Famiglia

Richiesta:

Risposta (esempio con coniuge e figli):

Validazione delle risposte

Per validare l'autenticità di una risposta, si utilizza il relativo l'endpoint di validazione:

Richiesta:

Risposta:

Definizione OpenAPI

Accertamento Cittadinanza

get

fruizione e-service Accertamento Cittadinanza

Query parameters
fiscal_codestringOptional

italian fiscal code

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
config_idstringOptional

id that identify a specific configuration to call an e-service

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
formatstringOptional

identify the output payload structure

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/anpr/accertamento-cittadinanza

Accertamento Cittadinanza

post

Validate Accertamento Cittadinanza payload

Query parameters
fiscal_codestringOptional

italian fiscal code

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
config_idstringOptional

id that identify a specific configuration to call an e-service

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
formatstringOptional

identify the output payload structure

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
Responses
200

OK

application/json
post
/anpr/accertamento-cittadinanza

Accertamento Residenza

get

fruizione e-service Accertamento Residenza

Query parameters
fiscal_codestringOptional

italian fiscal code

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
config_idstringOptional

id that identify a specific configuration to call an e-service

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
formatstringOptional

identify the output payload structure

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/anpr/accertamento-residenza

Accertamento Residenza

post

Validate Accertamento Residenza payload

Query parameters
fiscal_codestringOptional

italian fiscal code

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
config_idstringOptional

id that identify a specific configuration to call an e-service

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
formatstringOptional

identify the output payload structure

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
Responses
200

OK

application/json
post
/anpr/accertamento-residenza

Stato Famiglia

get

Retrieve Stato Famiglia for a specific fiscal code with specific configuration

Query parameters
fiscal_codestringOptional

italian fiscal code

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
config_idstringOptional

id that identify a specific configuration to call an e-service

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
formatstringOptional

identify the output payload structure

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/anpr/stato-famiglia

Stato famiglia

post

Validate Stato Famiglia payload

Query parameters
fiscal_codestringOptional

italian fiscal code

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
config_idstringOptional

id that identify a specific configuration to call an e-service

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
formatstringOptional

identify the output payload structure

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
DataanyOptional

data to validate. Can be different depending by the format param

Responses
200

OK

application/json
post
/anpr/stato-famiglia

Get e-services

get

Retrieve the list of e-services available through the service

Query parameters
offsetintegerOptional

the starting point or the index from which the data should be retrieved

Example: 6
limitintegerOptional

The limit parameter specifies the maximum number of items to be returned in a single page or request

sortstringOptional

...

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/e-services

Options e-services

options

Get available operations for the e-services resource.

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

No content

options
/e-services
200

OK

No content

ISEE

get

fruizione e-service attestazione ISEE

Query parameters
fiscal_codestringOptional

italian fiscal code

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
config_idstringOptional

id that identify a specific configuration to call an e-service

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
formatstringOptional

ISEE format to fetch

Example: ordinario
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/inps/consultazione-attestazione-residenti-isee

Status health-check

get

...

Responses
200

OK

application/json
get
/status

Save Tenant Configuration

post

...

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
ipa_codestringOptional

...

Example: 123456
namestringOptional

nome del tenant

Example: comune di Bugliano
Responses
post
/tenants

Options Tenant

options

Get available operations for the tenant resource.

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

No content

options
/tenants
200

OK

No content

Get Tenant Configuration

get

...

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/tenants/{tenant_id}

Update tenant Configuration

put

...

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
ipa_codestringOptional

...

Example: 123456
namestringOptional

nome del tenant

Example: comune di Bugliano
Responses
200

OK

application/json
put
/tenants/{tenant_id}

delete Tenants Configuration

delete

...

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
delete
/tenants/{tenant_id}

Update tenant Configuration

patch

...

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
ipa_codestringOptional

...

Example: 123456
namestringOptional

nome del tenant

Example: comune di Bugliano
Responses
200

OK

application/json
patch
/tenants/{tenant_id}

Options Tenant by id

options

Get available operations for the tenant resource.

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

No content

options
/tenants/{tenant_id}
200

OK

No content

Get Clients list

get

Get Clients Configuration list for specific tenant

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Query parameters
limitintegerOptional

The limit parameter specifies the maximum number of items to be returned in a single page or request

sortstringOptional

...

offsetintegerOptional

the starting point or the index from which the data should be retrieved

Example: 6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/tenants/{tenant_id}/clients

store client pdnd Configuration

post

Save client pdnd Configuration of specific tenant

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
envstringOptional

ambiente del client

Example: collaudo
idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
key_idstringOptional

key id del client

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
key_pair_idstringOptional

id interno del materiale critografico

namestringOptional

nome del tenant

Example: comune di Bugliano
Responses
post
/tenants/{tenant_id}/clients

Options Clients

options

Get available operations for the Clients resource.

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Query parameters
limitintegerOptional

The limit parameter specifies the maximum number of items to be returned in a single page or request

sortstringOptional

...

offsetintegerOptional

the starting point or the index from which the data should be retrieved

Example: 6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

No content

options
/tenants/{tenant_id}/clients
200

OK

No content

Get client pdnd Configuration

get

Get client pdnd Configuration of specific tenant

Path parameters
client_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/tenants/{tenant_id}/clients/{client_id}

Update client pdnd Configuration

put

Update client pdnd Configuration of specific tenant

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
client_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
envstringOptional

ambiente del client

Example: collaudo
key_idstringOptional

key id del client

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
key_pair_idstringOptional

id interno del materiale critografico

namestringOptional

nome del tenant

Example: comune di Bugliano
Responses
200

OK

application/json
put
/tenants/{tenant_id}/clients/{client_id}

Delete client pdnd Configuration

delete

Delete client pdnd Configuration of specific tenant

Path parameters
client_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
delete
/tenants/{tenant_id}/clients/{client_id}

No content

Update client pdnd Configuration

patch

Update client pdnd Configuration of specific tenant

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
client_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
envstringOptional

ambiente del client

Example: collaudo
key_idstringOptional

key id del client

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
key_pair_idstringOptional

id interno del materiale critografico

namestringOptional

nome del tenant

Example: comune di Bugliano
Responses
200

OK

application/json
patch
/tenants/{tenant_id}/clients/{client_id}

Options Clients

options

Get available operations for the Clients resource.

Path parameters
client_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

No content

options
/tenants/{tenant_id}/clients/{client_id}
200

OK

No content

Get Config list of specific tenant

get

...

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Query parameters
limitintegerOptional

The limit parameter specifies the maximum number of items to be returned in a single page or request

sortstringOptional

...

offsetintegerOptional

the starting point or the index from which the data should be retrieved

Example: 6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/tenants/{tenant_id}/configs

Save Service Configuration

post

...

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
client_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
eservice_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
is_activeboolean | nullableOptional

...

Example: false
purpose_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
post
/tenants/{tenant_id}/configs

Options Config

options

Get available operations for the Config resource.

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
options
/tenants/{tenant_id}/configs
201

Created

No content

Get Config

get

Get config of specific tenant by id

Path parameters
config_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/tenants/{tenant_id}/configs/{config_id}

Update Config

put

Update config of specific tenant

Path parameters
config_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
client_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
eservice_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
is_activeboolean | nullableOptional

...

Example: false
purpose_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
put
/tenants/{tenant_id}/configs/{config_id}

Disable Config

delete

Soft deleting config of specific tenant

Path parameters
config_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
delete
/tenants/{tenant_id}/configs/{config_id}

No content

Patch Config

patch

Patch config of specific tenant

Path parameters
config_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
client_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
eservice_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
is_activeboolean | nullableOptional

...

Example: false
purpose_idstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
patch
/tenants/{tenant_id}/configs/{config_id}

Options Config

options

Get available operations for the Config resource.

Path parameters
config_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

No content

options
/tenants/{tenant_id}/configs/{config_id}
200

OK

No content

Get Key

get

Get key unused key for a specific tenant

Path parameters
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
200

OK

application/json
get
/tenants/{tenant_id}/keys

Delete Key

delete

Delete key used by specific tenant

Path parameters
keys_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
tenant_idstringRequired

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Responses
delete
/tenants/{tenant_id}/keys/{keys_id}

No content

Validation

post

Validate pdnd e-service response

Header parameters
AuthorizationstringOptional

...

Example: b212c4b4-db26-4404-8c7c-47dab99dd2e6
Body
DataanyOptional

data to validate. Can be different depending by the format param

Responses
200

OK

application/json
post
/validate

Last updated

Was this helpful?