Skip to content

Commit

Permalink
Updates subscription feeds docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudify committed Oct 17, 2019
1 parent cb315ad commit d826f2a
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions openapi/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,24 @@ paths:
operationId: getSubscriptionsFeedForDate
summary: Get Subscriptions Feed
description: |-
Returns the hashed fiscal codes of users that subscribed to or
unsubscribed from your service on the provided date (UTC). By querying
this feed on each day, you can know what users you can or cannot send
messages to without having to query `getProfile` for each message.
This is an optimization for services that send hi volumes of
messages per day to avoid having to make two API calls for each message.
Returns the **hashed fiscal codes** of users that **subscribed to** or
**unsubscribed from** your service **on the provided date** (UTC).
By querying this feed on each day, you will be able to retrieve the
"delta" of users that subscribed and unsubscribed fom your service.
You will have to keep a list of users somewhere in your infrastructure
that you will update each day by adding the subscribed users and
removing the unsunbscribed 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))))`.
Note that this is an optimization for those services that need to send very high
volumes of messages per day, to avoid having to make two API calls for each message.
responses:
'200':
description: Found.
Expand Down

0 comments on commit d826f2a

Please sign in to comment.