Skip to content

API - Switch from Minio to DRS #34142

Closed
Closed

Description

@mstanton1

Create new Business API endpoints for maintaining client submitted documents using the DRS. These endpoints will:

  • create a new document record with a client document
  • update document record information associated with a document
  • add/update a document for an existing document record
  • delete an existing document and document record

Do not remove/disable existing minio code from the business API as part of this ticket. Only remove after all UI's have switched to using the new endpoints.

The new Business API endpoints are "wrappers" for the DRS API endpoints described below.
A business entity type maps to a DRS document type: one of CORP, COOP, FIRM.
Reverse engineering from the TEST environment documents table, verify the set below is complete:

Filing Type Legal Types Business Document Types
courtOrder BC, BEN, C, CC, CP, CUL, GP, SP, ULC court_order
continuationOut BC, BEN, C continuation_out
continuationIn C, CBEN, CCC, CUL authorization_file, director_affidavit
correction CP coop_memorandum, coop_rules
dissolution CP affidavit
incorporationApplication CP coop_memorandum, coop_rules
specialResolution CP coop_memorandum, coop_rules

Business Legal type - DRS Document Class Mapping

Legal Types Document Class
BC, BEN, C, CBEN, CC, CCC, CUL, ULC CORP
CP COOP
GP, SP FIRM

Business Document Type - DRS Document Type Mapping ("*" represents default).

Business Document Type DRS Document Type
court_order CRTO
continuation_out CNTO
authorization_file CNTA
director_affidavit DIRECTOR_AFFIDAVIT
coop_memorandum COOP_MEMORANDUM
coop_rules COOP_RULES
affidavit COSD
* COSD

Basic client document information referenced by the Business API will continue using the business database documents table. The DRS GUID documentServiceId will be stored in the documents record file_key column.

DRS API spec: https://okagqp-test-bcregrestricted.apigee.io/docs/docserviceproxy/1/overview

New business endpoints to use:
Upload a document for the first time (DEV is /business-dev/*):
Optional request params: businessIdentifier, filename
POST /business/api/v2/documents/client/{filing_type}/{entity_type}/{document_type}
See above tables for fiing_type/entity_type, document_type values

Example
POST /business/api/v2/documents/client/specialResolution/CP/coop_rules?businessIdentifier=CP02345678&filename=coop_rules_2026.pdf
POST data: <actual file content, not shown here>
Request Headers:
x-apikey:
Content-Type: application/pdf
Authorization: Bearer *
Account-Id:

201 status response:

{
  "author": "",
  "consumerDocumentId": "0100000683",
  "consumerFilename": "coop_rules_2026.pdf",
  "consumerIdentifier": "CP02345678",
  "consumerReferenceId": "",
  "createDateTime": "2026-07-16T17:29:38+00:00",
  "documentClass": "COOP",
  "documentServiceId": "DS0000101951",
  "documentType": "COOP_RULES",
  "documentTypeDescription": "Cooperative Rules",
  "documentURL": "https://storage.googleapis.com/docs_business_dev/2026/07/16/coop_rules-DS0000101951.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=sa-api%40c4hnrd-dev.iam.gserviceaccount.com%2F20260716%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20260716T172938Z&X-Goog-Expires=172800&X-Goog-SignedHeaders=host&X-Goog-Signature=636ab5926c644dc85d247925bb9f96f69f56dcf290f6b0dc8a56678693a963f743fe9720bc559a286c4da98fa42a0adbaae8fd3cc46feda22621ad86af31b8ce3228e80597c640f665fa955e09ee3b80173003545dac914892569a9dd03d9c7fc35e95587be3bca1011f98f53cc2cb73c1a6b53a141f3ff85b265628bef01976c8ca8c76c09869a797c2a1c50c676808fb70d3e9398ea6d19b6850b2d8a1000e8e4041dd0549ce00c40988d5dd44ab090a2a797f6dccca038ca3a67ca2eb69b8e2937798fd389f9ce15663ae3dff46ab2cb2cf46161411a83c64bb0e3d7bb006c7d7ca98f03785c6457e503066c09b30e30f7c7080b576ce81261eb9544821ac",
  "key": "COOP-DS0000101951"
}

Replace a previously uploaded document or add a document to an existing record that has no document:
PUT /business/api/v2/documents/client/{documentKey}
The documentKey is the key value returned from the POST request.

Example:
PUT /business/api/v2/documents/client/COOP-DS0000101951
PUT data: <actual file content, not shown here>

200 status response:

{"message":"Document COOP-DS0000101951 replaced successfully."}

Update information associated with a document (Filer after filing completes successfully):
PATCH /business/api/v2/documents/client/{documentKey}

Example:
PATCH /business/api/v2/documents/client/COOP-DS0000101951
PATCH data: (Include businessIdentifier if not in POST).

{
  "businessIdentifier": "CP02345678",
  "filingDate": "2026-07-17T23:02:02+00:00",
  "filingId": 1996422  
}

200 status response:

{"message":"Document record COOP-DS0000101951 updated successfully."}

Permanently delete a draft document (document record retained for audit):
DELETE /business/api/v2/documents/client/{documentKey}

Example:
DELETE /business/api/v2/documents/client/COOP-DS0000101951
DELETE data: none

200 status response:

{"message":"Document COOP-DS0000101951 deleted successfully."}

Download a document:
GET /business/api/v2/documents/client/{documentKey}
Note: submit the request header Accept=application/json to get JSON with a cloud storage download link instead of the default document itself.

Example:
GET /business/api/v2/documents/client/COOP-DS0000101951
GET data: none

200 status response:
PDF binary data.

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

Sequence diagram for business - DRS integration:
Business-DRS-client-documents (1).png

Activity

  1. added
    Entities Team
    on Jul 9, 2026
  2. added theissue type on Jul 9, 2026
  3. changed the issue type fromtoon Jul 9, 2026
  4. changed the issue type fromtoon Jul 9, 2026
  5. mruff-aeq commented on Jul 10, 2026

    @mruff-aeq
    Collaborator

    Screenshot 2026-07-10 at 2.33.32 PM.png

  6. mruff-aeq commented on Jul 10, 2026

    @mruff-aeq
    Collaborator

    image.png

  7. chdivyareddy commented on Jul 23, 2026

    @chdivyareddy
    Collaborator

    Verified in DEV!

    image.png

    image.png

    image.png

    image.png

    image.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Colin EgressEntities Team

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions