LogoLogo
v1.3
v1.3
  • 🏠Per iniziare
  • 🕗Changelog
  • 🔢Setup iniziale
  • Funzionalità
    • 📦Creare un servizio
      • Dati obbligatori
        • Attributi
        • Service Metadata
      • Controllo di qualità
      • Come visualizzare un servizio in test
    • ✉️Inviare un messaggio
      • Controllo pre-invio
      • Invio messaggio
      • Controllo post-invio
      • Invio messaggi di test
  • 📐API
    • OpenAPI
    • 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
    • API Servizi
      • Create Service
      • Get User Services
      • Get Service
      • Update Service
      • Regenerate Service Key
      • Upload service logo
      • Upload organization logo
    • Errori comuni
    • Specifiche API
  • 🔑Abilitazioni
    • Test con codici fiscali reali
    • Test invio avvisi pagoPA
    • Invio messaggi massivo
    • Subscription feed
    • Gestione dei servizi
  • Risorse Utili
    • ❓Domande frequenti
    • 📘Glossario
Powered by GitBook
On this page
  1. API
  2. API Messaggi

Get Subscriptions Feed

PreviousGet MessageNextGet a User Profile

Last updated 2 years ago

Descrizione

API che permette di ottenere i codici fiscali in modalità hashed che si sono sottoscritti o disiscritti per una specifica data (UTC - YYYY-MM-DD). In questo modo è possibile scaricare gli utenti iscritti ad un servizio (identificato dalla API KEY), facendo una request per ogni giorno a partire dal 24/03/2020 e salvando i dati nella propria infrastruttura.

Per una risposta corretta ottengo:

  1. lo status code della risposta è 200

  2. nel body di risposta il campo subscriptions e unsubscriptions

Lo scopo del subscription feed è mettere a disposizione degli enti centrali uno strumento per minimizzare le chiamate verso l'infrastruttura di IO attraverso un filtro applicato dall’ente stesso.

In nessun caso sarà possibile richiedere i codici fiscali in chiaro.

Prima che un servizio venga messo visibile in app, l'API restituirà l’elenco completo degli hash dei codici fiscali dei cittadini iscritti/disiscritti ad IO in un determinato giorno.

Esempi

### REQUEST
curl --location --request GET 'https://api.io.pagopa.it/api/v1/subscriptions-feed/2020-02-23' \
--header 'Ocp-Apim-Subscription-Key: __YOUR_API_KEY__'
### RESPONSE
{
"dateUTC": "2020-02-23",
"subscriptions": [ "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ],
"unsubscriptions": [ ]
}

Risorse utili

📐
https://developer.io.italia.it/openapi.html#operation/getSubscriptionsFeedForDate

Get Subscriptions Feed

get

Returns the hashed fiscal codes of users that subscribed to or unsubscribed from your service on the provided date (UTC).

By querying this feed everyday, you will be able to retrieve the "delta" of users that subscribed and unsubscribed from your service. You will have to keep a list of users somewhere in your infrastructure that you will keep updated at all times by adding the subscribed users and removing the unsubscribed users.

You will then be able to query this local list to know which users you can send messages, to without having to query getProfile for each message.

To avoid sharing the citizens fiscal codes, the API will provide the hex encoding of the SHA256 hash of the upper case fiscal code. In pseudo code CF_HASH = LOWERCASE(HEX(SHA256(UPPERCASE(CF)))).

Access to this feed is subject to case-by-case authorization, and it is primarily intended for large-scale services, such as those pertaining to organizations that have an extensive user base (including geographically), and/or need to send very high volumes of messages per day.

This feed serves the purpose of minimizing data processing activities while preserving optimization of API calls and data accuracy. Organizations allowed are required to query this feed everyday.

Authorizations
Path parameters
dateanyRequired

A date in the format YYYY-MM-DD.

Responses
200
Found.
application/json
401
Unauthorized
403
Forbidden.
404
Subscriptions feed not available yet.
application/json
429
Too many requests
get
GET /api/v1/subscriptions-feed/{date} HTTP/1.1
Host: api.io.pagopa.it
Ocp-Apim-Subscription-Key: YOUR_API_KEY
Accept: */*
{
  "dateUTC": "text",
  "subscriptions": [
    "text"
  ],
  "unsubscriptions": [
    "text"
  ]
}
  • Descrizione
  • GETGet Subscriptions Feed
  • Esempi
  • Risorse utili