Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legal API - Create endpoint for retrieving stage 1 AR letter #22235

Closed
2 tasks
argush3 opened this issue Jul 10, 2024 · 1 comment
Closed
2 tasks

Legal API - Create endpoint for retrieving stage 1 AR letter #22235

argush3 opened this issue Jul 10, 2024 · 1 comment
Assignees
Labels
Entities - David A label to filter on the tickets for the Entities based team that David is PO for. ENTITY Business Team

Comments

@argush3
Copy link
Collaborator

argush3 commented Jul 10, 2024

Create an endpoint that will be used by the emailer to retrieve the stage 1 letter(notice of commencement of dissolution) to be used as email attachment. Note that this endpoint will be used to retrieve the stage 1 letter for a one business. A separate ticket will take care of generating the batch stage 1 letters that will be sent to BCMail+.

Url structure of new endpoint

GET <base_url>/businesses/<business_identifier>/furnishings/<id>/document
Content-Type: application/pdf
Accept: application/pdf

Although we have a separate endpoint for generating furnishing documents, it will still leverage the existing report generating code that is already available in the legal api.

One major difference to note is that the letter will need to follow BCMail+ formatting requirements. If these requirements are not met, there may be printing issues on their end.

Reference PPR repo for reference BCMail+ implementation. The repo contains an implementation for generating a cover letter + main content report as well as code for SFTP upload. Note that a cover is not required for this ticket.

TODOs

  • Implement GET endpoint(GET <base_url>/businesses/<business_identifier>/furnishings//document) which returns a BCMail+ compatible AR pdf version of letter. Note: some updates around address may be still pending design updates. check with Andy to see where things are at before starting work. Should still be able to start work even if pending design updates though.
  • Add units tests as appropriate

image.png

PPR code reference - https://github.com/bcgov/ppr/blob/94dd475c3b657c88c35ab33922f5d540b64b6fb8/ppr-api/src/ppr_api/resources/v1/callbacks.py#L36-L76

@vishnup0422
Copy link
Collaborator

Using the endpoint to retrieve the PDF doc for a business

Screenshot 2024-07-26 at 1.45.30 PM.png

Retrieving the greyscale doc for mailing

Screenshot 2024-07-26 at 1.45.54 PM.png

If the business is registered in Extra Provinces

Screenshot 2024-07-26 at 1.50.29 PM.png

When the Business ID is not correct

Screenshot 2024-07-26 at 1.50.11 PM.png

When BusinessId and FurnishingID are not matching.

Screenshot 2024-07-26 at 1.50.00 PM.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Entities - David A label to filter on the tickets for the Entities based team that David is PO for. ENTITY Business Team
Projects
None yet
Development

No branches or pull requests

4 participants