LogoLogo
v5.0
v5.0
  • 🏠Guida tecnica
  • 🕗Changelog
  • 🔢Setup iniziale
    • Adesione tramite l'Area Riservata
    • Iscrizione al Developer Portal
    • Condivisione configurazione remota
  • Funzionalità
    • 📦Pubblicare un servizio
      • Creare un servizio
      • Provare un servizio in test
      • Revisione del servizio
      • Visibilità del servizio
      • Importare servizi nell'Area Riservata
      • Dati obbligatori
        • Attributi
        • Service Metadata
      • Informazioni sensibili
      • Argomento del servizio
      • Stato del servizio
      • Chiave manage
    • ✉️Inviare un messaggio
      • Messaggi di test
      • Inviare un messaggio tradizionale
      • Inviare un messaggio a contenuto remoto
      • Aggiungere allegati
  • API e specifiche
    • 📐OpenAPI
    • API Servizi
      • Manage Service: Get
      • Manage Service: Get keys
      • Manage Service: Get User Services
      • Manage Service: Create
      • Manage Service: Delete
      • Manage Service: Update
      • Manage Service: Request Review
      • Manage Service: Release
      • Manage Service: Get Released
      • Manage Service: Unpublish
      • Manage Service: Regenerate api key
      • Manage Service: Upload service logo
      • Upload organization logo
      • Service Topics: Get all service topics
    • API Messaggi
      • Get a User Profile using POST
      • Submit a Message passing the user fiscal_code in the request body
      • Get Message
      • Get Subscriptions Feed
      • ⚠️Get a User Profile
      • ⚠️Submit a Message passing the user fiscal_code as path parameter
    • Errori comuni
    • Specifiche API
    • OpenAPI endpoint di recupero dei contenuti remotizzati
  • 🔑Abilitazioni
    • Test con Codici Fiscali reali
    • Test invio avvisi pagoPA
    • Invio messaggi massivo
    • Subscription feed
    • Gestione dei servizi
    • Funzionalità Premium
  • Risorse Utili
    • ❓Supporto agli Enti (tutorial, FAQ)
    • 📘Glossario
Powered by GitBook
On this page
  1. API e specifiche
  2. API Messaggi

Get Message

PreviousSubmit a Message passing the user fiscal_code in the request bodyNextGet Subscriptions Feed

Descrizione

Questa API controlla lo stato di invio del messaggio recuperando il contenuto. Dovrai interrogare l’API con il Codice Fiscale del cittadino oggetto del messaggio e l’identificativo del messaggio.

message

id

Descrizione

Tipo

Stringa

Esempio

01EM6X4JB9VSZTQ8H16KMQFCEJ

fiscal_code

Descrizione

Codice Fiscale del cittadino a cui è stato inviato il messaggio

Tipo

Stringa

Esempio

AAAAAA00A00A000A

created_at

Descrizione

Data di creazione del messaggio nel formato ISO-8601 e fuso orario UTC

Tipo

Stringa

Esempio

2021-02-18T08:17:01.775Z

sender_service_id

Descrizione

Identificativo del servizio associato al messaggio

Tipo

Stringa

Esempio

01EYNQ0864HKYR1Q9PXPJ18W7G

content

notification

email

Descrizione

Stato d'invio dell'email. - SENT: email inviata correttamente; - THROTTLED: errore temporaneo per sovraccarico, il messaggio potrà essere recapitato entro il TTL e per un massimo di 7 giorni; - EXPIRED: raggiunto il massimo TTL del messaggio; - FAILED: errore permanente della notifica.

Tipo

Stringa enumerata

Esempio

SENT

webhook

Descrizione

Stato d'invio della notifica push. - SENT: notifica inviata; - THROTTLED: errore temporaneo per sovraccarico, il messaggio potrà essere recapitato entro il TTL e per un massimo di 7 giorni; - EXPIRED: raggiunto il massimo TTL del messaggio; - FAILED: errore permanente della notifica.

Tipo

Stringa enumerata

Esempio

SENT

status

Descrizione

Stato d'invio del messaggio. - ACCEPTED: il messaggio è stato inserito in coda per il salvataggio; - THROTTLED: errore temporaneo per sovraccarico, il messaggio potrà essere recapitato entro il TTL e per un massimo di 7 giorni; - FAILED: errore permanente nel salvataggio del messaggio; - PROCESSED: il messaggio è stato inviato; quando rilevi questo stato hai la certezza che il tuo messaggio è a disposizione del destinatario quando aprirà app IO - REJECTED: il messaggio è stato scartato perché il destinatario non esiste o ha bloccato le comunicazioni del servizio.

Tipo

Stringa enumerata

Esempio

PROCESSED

read_status

Descrizione

  • READ --> il destinatario ha letto il messaggio

  • UNREAD --> il destinatario non ha ancora letto il messaggio

  • UNAVAILABLE --> il destinatario ha espresso la volontà di non condividere lo stato di lettura dei propri messaggi

Tipo

Stringa enumerata

Esempio

READ

payment_status

Descrizione

  • PAID --> l'avviso associato al messaggio è stato pagato

  • NOT_PAID --> l'avviso associato al messaggio non è stato ancora pagato

Tipo

Stringa enumerata

Esempio

NOT_PAID

Esempi

Messaggio standard

### REQUEST
curl --location --request GET 'https://api.io.pagopa.it/api/v1/messages/AAAAAA00A00A000A/01EM6X4JB9VSZTQ8H16KMQFCEJ' \
--header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__'
### RESPONSE
{
"message": {
  "content": {
    "subject": "My first IO app message with min 10 character",
    "markdown": "This is my first message to the IO app. Use body markdown format with min 80 character"
    },
    "created_at": "2021-02-18T08:17:01.775Z",
    "fiscal_code": "AAAAAA00A00A000A",
    "id": "01EM6X4JB9VSZTQ8H16KMQFCEJ",
    "sender_service_id": "01EYNQ0864HKYR1Q9PXPJ18W7G"
  },
  "notification": {
    "email": "SENT",
    "webhook": "SENT"
  },
  "status": "PROCESSED"
}

Messaggio premium

###  REQUEST
curl --location --request GET 'https://api.io.pagopa.it/api/v1/messages/AAAAAA00A00A000A/01EM6X4JB9VSZTQ8H16KMQFCEJ' \
--header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__'
### RESPONSE
{
   "message": {
       "content": {
           "subject": "My first IO app message with min 10 character",
           "markdown": "This is my first message to the IO app. Use body markdown format with min 80 character"
       },
       "created_at": "2021-02-18T08:17:01.775Z",
       "fiscal_code": "AAAAAA00A00A000A",
       "id": "01EM6X4JB9VSZTQ8H16KMQFCEJ",
       "sender_service_id": "01EYNQ0864HKYR1Q9PXPJ18W7G"
   },
   "notification": {
       "email": "SENT",
       "webhook": "SENT"
   },
   “read_status”: “READ”,
   “payment_status”: “NOT_PAID”,
   "status": "PROCESSED"
}

Risorse utili

Identificativo del messaggio ottenuto con l'API

I dati relativi al sono gli stessi inviati in occasione della creazione del messaggio.

Campo presente solo per i messaggi inviati come (parte del programma Premium). Il campo può assumere i seguenti valori:

Campo presente solo per i messaggi che e che vengono inviati come (parte del programma Premium). Il campo può assumere i seguenti valori:

https://developer.io.italia.it/openapi.html#operation/getMessage
Submit a Message passing the user fiscal_code as path parameter

Get Message

get

The previously created message with the provided message ID is returned. With right permission and ADVANCED feature level type related to the previously submitted message, also read and payment status infos (when applicable) are returned.

Authorizations
Path parameters
fiscal_codeanyRequired

The fiscal code of the user, all upper case.

idstringRequired

The ID of the message.

Responses
200
Message found.
application/json
401
Unauthorized
403
Forbidden.
404
No message found for the provided ID.
application/json
429
Too many requests
get
GET /api/v1/messages/{fiscal_code}/{id} HTTP/1.1
Host: api.io.pagopa.it
Ocp-Apim-Subscription-Key: YOUR_API_KEY
Accept: */*
{
  "message": {
    "id": "text",
    "fiscal_code": "SPNDNL80R13C555X",
    "time_to_live": 3600,
    "created_at": "2018-10-13T00:00:00.000Z",
    "content": {
      "subject": "Welcome new user !",
      "markdown": "# This is a markdown header\n\nto show how easily markdown can be converted to **HTML**\n\nRemember: this has to be a long text.",
      "require_secure_channels": true,
      "payment_data": {
        "amount": 1,
        "notice_number": "text",
        "invalid_after_due_date": true,
        "payee": {
          "fiscal_code": "12345678901"
        }
      },
      "due_date": "2018-10-13T00:00:00.000Z",
      "prescription_data": {
        "nre": "text",
        "iup": "text",
        "prescriber_fiscal_code": "TCNZRO80R13C555Y"
      },
      "eu_covid_cert": {
        "auth_code": "text"
      },
      "third_party_data": {
        "id": "text",
        "original_sender": "text",
        "original_receipt_date": "2018-10-13T00:00:00.000Z",
        "has_attachments": true,
        "has_remote_content": true,
        "has_precondition": "text",
        "summary": "text",
        "configuration_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
      },
      "legal_data": {
        "sender_mail_from": "text",
        "has_attachment": true,
        "message_unique_id": "text",
        "original_message_url": "text",
        "pec_server_service_id": "text"
      }
    },
    "sender_service_id": "text",
    "feature_level_type": "STANDARD"
  },
  "notification": {
    "email": "SENT",
    "webhook": "SENT"
  },
  "status": "text",
  "read_status": "UNREAD",
  "payment_status": "NOT_PAID"
}
  • Descrizione
  • GETGet Message
  • message
  • id
  • fiscal_code
  • created_at
  • sender_service_id
  • content
  • notification
  • email
  • webhook
  • status
  • read_status
  • payment_status
  • Esempi
  • Messaggio standard
  • Messaggio premium
  • Risorse utili
content *
ADVANCED
contengono un avviso di pagamento
ADVANCED