bcgov / bcgov/entity

DRS Integration

Open
#28,757 2 comments 0 reactions 1 assignee Claimed by @shahriarkhan-ey View on GitHub
Assets Colin Egress DRS Corps P
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

WE NEED TO FIGURE OUT document schema, retention schedules

Developer Notes for modernized business integration - switch from minio to DRS.
DRS API spec: https://okagqp-test-bcregrestricted.apigee.io/docs/docserviceproxy/1/overview
Endpoints to use:
Upload a document for the first time:
POST /doc/api/v1/documents/{documentClass}/{documentType}
https://okagqp-test-bcregrestricted.apigee.io/docs/docserviceproxy/1/routes/doc/api/v1/documents/%7BdocumentClass%7D/%7BdocumentType%7D/post

Replace a previously uploaded document:
PUT /doc/api/v1/documents/{docServiceId}
https://okagqp-test-bcregrestricted.apigee.io/docs/docserviceproxy/1/routes/doc/api/v1/documents/%7BdocServiceId%7D/put

Update information associated with a document:
PATCH /doc/api/v1/documents/{docServiceId}
https://okagqp-test-bcregrestricted.apigee.io/docs/docserviceproxy/1/routes/doc/api/v1/documents/%7BdocServiceId%7D/patch

Delete a document:
DELETE /doc/api/v1/documents/{docServiceId}
https://okagqp-test-bcregrestricted.apigee.io/docs/docserviceproxy/1/routes/doc/api/v1/documents/%7BdocServiceId%7D/delete

Alternatively mark a document as removed with a specific PATCH payload:
PATCH /doc/api/v1/documents/{docServiceId}
```
{
"removed": true
}
```

Download a document:
GET doc/api/v1/searches/{documentClass}?documentServiceId={docServiceId}
Note: submit the request header Accept=application/pdf to get the doc data instead of the default son with a cloud storage download link.
https://okagqp-test-bcregrestricted.apigee.io/docs/docserviceproxy/1/routes/doc/api/v1/searches/%7BdocumentClass%7D/get

Note: if a filing such as a COOP incorporation/change has multitple documents, use the same consumerDocumentId returned in a POST response (auto-generated if not submitted). In other words, use the first document response consumerDocumentId as the second document request consumerDocumentId

DRS Business property mapping:
consumerIdentifer: business identifier
consumerFilename: ledger filing document file name
consumerFilingDateTime: business filing date
consumerReferenceId: business filing id

Suggestion: use the existing business api configuration in src/legal_api/reports/report.py to specify the DRS document type AND document class for each filing document. For example:
```
static_reports = {
"certifiedRules": {
"documentType": "COOP_RULES",
"documentClass": "COOP"
},
"certifiedMemorandum": {
"documentType": "COOP_MEMORANDUM",
"documentClass": "COOP"
},
"affidavit": {
"documentType": "CORP_AFFIDAVIT",
"documentClass": "CORP"
},
"uploadedCourtOrder": {
"documentType": "CRTO",
"documentClass": "CORP"
}
}
```
Sequence diagram for business - DRS integration:
Business-DRS-client-documents.png

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.