PPR API - Changes to Improve BCMail+ Discharges Report Generation
PPR API changes are needed to improve individual report generation for the mail out to secured parties of PPR discharge verification statements. For reference, the design update to the current job is capture here: https://docs.google.com/document/d/102uyD-IFYq5ZvgfwxZby319mRZHJFfrV/edit
Th PPR API update is to generate the BCMail+ version of the discharge verification statements as the lien is discharged instead of as a batch job at the end of the day.
- A new GCP Pub/Sub configuration will process the report generation after a registration is discharged.
- The report path for a new GCP storage bucket is stored in the existing mail_reports database table
- The API changes are already in TEST and PROD. TEST is configured with this API change. PROD is ready but waiting on the job update.
- A new, optional request parameter named jobId for the /api/v1/callbacks/mail-report endpoint will store the job run id for each report included in the timestamp range. If present, the jobId will be echoed back in the response (see the example below).
Job update notes: A new endpoint /api/v1/callbacks/mail-report that takes timestamp range parameters returns references to the report docs to fetch from GCP cloud storage TEST example: GET https://ppr-api-6uxttmsfyq-nn.a.run.app/api/v1/callbacks/mail-report?startDateTime=2024-06-18T00%3A00%3A01-07%3A00&endDateTime=2024-06-22T00%3A00%3A01-07%3A00&jobId=482
Returns:
[
{
"dateTime": "2024-06-20T16:12:43+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894181.5916640.PDF",
"id": 399,
"jobId": 482
},
{
"dateTime": "2024-06-20T16:12:43+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894181.5916643.PDF",
"id": 400,
"jobId": 482
},
{
"dateTime": "2024-06-20T16:12:44+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894181.5916733.PDF",
"id": 401,
"jobId": 482
},
{
"dateTime": "2024-06-20T16:14:30+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894182.5916733.PDF",
"id": 404,
"jobId": 482
},
{
"dateTime": "2024-06-20T16:14:30+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894182.5916640.PDF",
"id": 402,
"jobId": 482
},
{
"dateTime": "2024-06-20T16:14:31+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894182.5916643.PDF",
"id": 403,
"jobId": 482
},
{
"dateTime": "2024-06-20T16:14:31+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894182.5916735.PDF",
"id": 405,
"jobId": 482
}
]
The doc storage reference filename format is PPRVER.{YYYYMMDD}.{registrationId}.{partyId}.PDF
The storage bucket names are: TEST: ppr_mail_report_test PROD: ppr_mail_report_mail
Update verified in DEV with GET https://ppr-api-p56lvhvsqa-nn.a.run.app/api/v1/callbacks/mail-report?startDateTime=2024-06-21T00%3A00%3A01-07%3A00&endDateTime=2024-06-28T00%3A00%3A01-07%3A00&jobId=22222 and GET https://ppr-api-p56lvhvsqa-nn.a.run.app/api/v1/callbacks/mail-report?startDateTime=2024-06-21T00%3A00%3A01-07%3A00&endDateTime=2024-06-28T00%3A00%3A01-07%3A00
Deploy to PROD with Securities Act Notices build PPR API 1.2.6
Verified in TEST with: GET https://ppr-api-6uxttmsfyq-nn.a.run.app/api/v1/callbacks/mail-report?startDateTime=2024-06-18T00%3A00%3A01-07%3A00&endDateTime=2024-06-22T00%3A00%3A01-07%3A00&jobId=22222
Response:
[
{
"dateTime": "2024-06-20T16:12:43+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894181.5916640.PDF",
"id": 399,
"jobId": 22222
},
{
"dateTime": "2024-06-20T16:12:43+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894181.5916643.PDF",
"id": 400,
"jobId": 22222
},
{
"dateTime": "2024-06-20T16:12:44+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894181.5916733.PDF",
"id": 401,
"jobId": 22222
},
{
"dateTime": "2024-06-20T16:14:30+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894182.5916733.PDF",
"id": 404,
"jobId": 22222
},
{
"dateTime": "2024-06-20T16:14:30+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894182.5916640.PDF",
"id": 402,
"jobId": 22222
},
{
"dateTime": "2024-06-20T16:14:31+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894182.5916643.PDF",
"id": 403,
"jobId": 22222
},
{
"dateTime": "2024-06-20T16:14:31+00:00",
"docStorageRef": "2024/06/20/PPRVER.20240620.1894182.5916735.PDF",
"id": 405,
"jobId": 22222
}
]
Moving to Done.