Skip to main content

Document API - Document tags

The Archive provides information about the document types supported by the service. This information is available through a REST API, which can be accessed at:

The various APIs exposed allow you to understand and extrapolate the list of types supported by the service and, by requesting a specific type, it is possible to extract the following information:

General Informationโ€‹

Code type, description and file formats enabled and accepted for the particular type

{
"documentTypeCode": "2079",
"documentTypeDescription": "Informative consenso privacy",
"enabledExtensions": [
"pdf",
"tif",
"tiff",
"jpg",
"jpeg"
]
}

Tag List:โ€‹

  • Specialization of the detailed fields with type and path in the details. Information on the mandatory nature of the information.
  • List of custom fields that can be entered in the "custom_metadata" section
  "tags": [
{
"code": "data_registrazione",
"serviceCardLabel": "Data di registrazione",
"path": "details.datiRegistrazione.data",
"fullPath": "details.dati_registrazione.data",
"type": "date",
"wcfPath": "DataConsenso",
"wcfOnly": false,
"required": false
},
{
"code": "numero_documento",
"serviceCardLabel": "Numero documento",
"path": "details.datiRegistrazione.numero",
"fullPath": "details.dati_registrazione.numero",
"wcfOnly": false,
"required": false
},
{
"code": "tipo",
"serviceCardLabel": "Tipo",
"description": "Campo descrittivo libero",
"path": "details.customMetadata",
"fullPath": "details.custom_metadata.tipo",
"type": "string",
"wcfPath": "Tipo",
"wcfOnly": false,
"placeholder": "Inserisci il tipo di documento",
"required": false,
"rules": {
"maxLength": 200
},
"errors": {
"maxLength": "La lunghezza massima รจ di 200 caratteri"
},
"layoutSettings": {
"order": 0,
"gridParameter": "1 / span 2"
}
},
{
"code": "periodo_imposta",
"serviceCardLabel": "Periodo di Imposta",
"path": "annoRiferimento",
"fullPath": "anno_riferimento",
"wcfPath": "PeriodoRiferimentoAnno",
"wcfOnly": true,
"required": false
},
{
"code": "cognome_nome_interessato",
"serviceCardLabel": "Cognome nome interessato",
"path": "details.soggetti.destinatario",
"fullPath": "details.soggetti.destinatario.cognome",
"wcfPath": "CognomeNomeInteressato",
"wcfOnly": true,
"required": false
},
{
"code": "codice_fiscale_interessato",
"serviceCardLabel": "Codice fiscale interessato",
"path": "details.soggetti.destinatario",
"fullPath": "details.soggetti.destinatario.codiceFiscale",
"wcfPath": "CodiceFiscaleInteressato",
"wcfOnly": true,
"required": false
},
{
"code": "idaggregazione",
"serviceCardLabel": "Id fascicolo nel sistema amministrazione",
"path": "details.idagg",
"fullPath": "details.idagg.identificativoAggregazione",
"wcfPath": "IdentificativoInternoFascicolo",
"wcfOnly": true,
"required": false
},
{
"code": "identificativo",
"serviceCardLabel": "Identificativo Sistema Amministrazione",
"path": "details.identificativoDocumentoPrimario",
"fullPath": "details.identificativoDocumentoPrimario.identificativo",
"wcfPath": "IdentificativoInternoDocumento",
"wcfOnly": true,
"required": false
},
{
"code": "codice_identificativo",
"serviceCardLabel": "Codice identificativo",
"path": "details.classificazione",
"fullPath": "details.classificazione.indice",
"wcfPath": "CodiceIdentificativo",
"wcfOnly": true,
"required": false
}
]

Pre-set defaultsโ€‹

If this information is not passed, the relevant fields are set in the payment as shown here.

"defaults": {
"modalita_formazione": "A",
"tipologia_flusso": "E",
"tipologia_destinatario": "PF",
"tipologia_mittente": "PG",
"tipologia_autore": "PAI",
"tipologia_altro": "PF"
}

If you need to fill in a subject for a role specified by one of the Type* default values, use those defaults as guidance to choose the appropriate subject type.

The subject type is chosen by the user creating the payment. For these fields, we show the subject types that are compatible with the tags listed above

For example, if a field defined as:

{
"code": "cognome_nome_interessato",
"serviceCardLabel": "Cognome nome interessato",
"path": "details.soggetti.destinatario",
"fullPath": "details.soggetti.destinatario.cognome",
"wcfPath": "CognomeNomeInteressato",
"wcfOnly": true,
"required": false
}

From the fullpath it can be deduced how the indicated tag refers in the document to be prepared for payment to the array of subjects available in details.subjects[] in which to introduce an object with a recipient role on which the surname attribute must be valued.

The subject must be created of a certain type and its structure must be one of those accepted by AGID. Refer to the documentation for more details.

The default suggests which type to use and which will have the correct attributes available. In the example above, the tipologia_destinatario will have the value "PF", i.e. natural person.

"default:" {
...
"tipologia_destinatario": "PF",
...
}

Subjectsโ€‹

The constraints on subjects indicate which subjects must be entered and which subjects will be automatically filled in if they are not included in the payment.

The defaults used for the payment are available on the service sheet.

"subjects": [
{
"role": "AUTORE",
"minItems": 0,
"maxItems": null
},
{
"role": "SER",
"minItems": 0,
"maxItems": 1
}
],
"subjectsToAutofill": [
"AUTORE",
"SER"
]

API Referenceโ€‹

Use the links below to open the interactive OpenAPI (Swagger) documentation for this endpoint in each environment.

EnvironmentAPI Documentation
Testhttps://cct-archive-documents-tags.test.teamsystem.digital/swagger-ui/index.html?url=/v3/api-docs#/public-controller-v-2/getAllDocumentTypeTags
Productionhttps://archive-documents-tags.teamsystem.digital/swagger-ui/index.html?url=/v3/api-docs#/public-controller-v-2/getAllDocumentTypeTags