From 022c388f3093552e26cd47f8b675ac1a19120b51 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 11 Apr 2025 12:09:17 -0700 Subject: [PATCH 01/21] Small changes to include Sbc Connect page --- .github/CODEOWNERS | 4 ++++ web/site/app/utils/createContentNav.ts | 2 ++ .../en-CA/products/1.get-started/1.account-setup.md | 13 +++++++------ .../en-CA/products/1.get-started/2.apis-summary.md | 6 +++++- web/site/content/en-CA/products/connect/card.yml | 13 ++++++++----- web/site/content/en-CA/products/pay/card.yml | 6 +++--- web/site/nuxt.config.ts | 1 - web/site/package.json | 2 +- 8 files changed, 30 insertions(+), 17 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 29a084ea..7adca837 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,6 +8,10 @@ /web/site/content/en-CA/products/bn @thorwolpert /web/site/public/bn @thorwolpert +## SBC Connect +/web/site/content/en-CA/products/connect @thorwolpert @deetz99 @pwei1018 @bolyachevets @seeker25 @jxio @ochiu +/web/site/public/connect @thorwolpert @deetz99 @pwei1018 @bolyachevets @seeker25 @jxio @ochiu + ## MHR - Manufactured Home Registry /web/site/content/en-CA/products/mhr @doug-lovett /web/site/public/mhr @doug-lovett diff --git a/web/site/app/utils/createContentNav.ts b/web/site/app/utils/createContentNav.ts index c2fef91b..cadb0cca 100644 --- a/web/site/app/utils/createContentNav.ts +++ b/web/site/app/utils/createContentNav.ts @@ -18,6 +18,8 @@ export function createContentNav (navItems: NavItem[] | undefined) { } }) } + }).sort((a, b) => { + return a.label?.localeCompare(b.label) // sort accordian items alphabetically }) }) as AccordianNavItem[] } diff --git a/web/site/content/en-CA/products/1.get-started/1.account-setup.md b/web/site/content/en-CA/products/1.get-started/1.account-setup.md index 3f59818f..4af88316 100644 --- a/web/site/content/en-CA/products/1.get-started/1.account-setup.md +++ b/web/site/content/en-CA/products/1.get-started/1.account-setup.md @@ -8,7 +8,7 @@ description: 'Learn how to setup and begin using BC Registries Services and APIs Start using Service BC Connect application programming interfaces (APIs) by following these steps: 1. Review the specifications in the Service BC Connect [API list](/products/get-started/apis-summary) and read the specifications to find the API(s) that meet your needs. -2. [Set up an account](https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/permits-licences/news-updates/modernization-updates/modernization-resources#setupacct). You will need a BC Registries and Online Services premium account, with Pre-Authorized Debit (PAD) as the payment option before you can request access. If you already have an account, proceed to the next step. +2. [Set up an account](https://www2.gov.bc.ca/gov/content/employment-business/business/managing-a-business/permits-licences/news-updates/modernization-updates/modernization-resources#setupacct). You will need a BC Registries and Online Services account in the sandbox environment (BC Services Card users can create accounts right away, BCEID requires Staff approval) before you can request access. If you already have a sandbox account, proceed to the next step. 3. Download, review and sign the API Terms Of Use.pdf. 4. Email your access request for an API Sandbox key to BC Registries. - Email **bcregistries@gov.bc.ca** @@ -17,14 +17,15 @@ Start using Service BC Connect application programming interfaces (APIs) by foll - In the body of the email, include your BC Registries and Online Services account number, along with your company’s account administrator’s name and email address. 5. Upon completion of the access request, you will be issued with a sandbox environment API key with the appropriate access. They will be made available to you via your Account Administrator's BC Registries account dashboard. 6. Validate your API key credentials by initiating a connection to the Sandbox environment. Also, test your API queries/calls in the Sandbox. Note that no fees will be charged for sandbox API keys or test transactions in the Sandbox environment only. -7. After completing your testing, email a request for keys to BC Registries Production Environment. +7. Ensure you have a production account, if not create one in the production environment (note BC Services Card will work right away, BCEID requires uploading an affidavit and approval from Staff): +8. After completing your testing, email a request for keys to BC Registries Production Environment. - Email your request for a production environment API key to **bcregistries@gov.bc.ca**. - Subject: Request for Service BC Connect API Production keys - In the body of your email, include your BC Registries account number, name and email of your account administrator. -8. You will be issued with a production environment API key in your Account Dashboard in the BC Registry application which can be accessed by your Account Administrator(s). -9. Use the API key for your queries and submission of data. Review the [Detailed API documentation](/products/get-started/apis-summary) for more information about how the APIs work. -10. Post your technical questions and join discussions in the BC Discourse forum and be sure to watch for any announcements on API outages or new features being released. -11. Attend the BC Registries API User Group meetings to get updates on specifications and releases or to discuss technical questions with developers. Email BCReg.engagement@gov.bc.ca to request a meeting invitation. +9. You will be issued with a production environment API key in your Account Dashboard in the BC Registry application which can be accessed by your Account Administrator(s). +10. Use the API key for your queries and submission of data. Review the [Detailed API documentation](/products/get-started/apis-summary) for more information about how the APIs work. +11. Post your technical questions and join discussions in the BC Discourse forum and be sure to watch for any announcements on API outages or new features being released. +12. Attend the BC Registries API User Group meetings to get updates on specifications and releases or to discuss technical questions with developers. Email BCReg.engagement@gov.bc.ca to request a meeting invitation. Questions? View our [About APIs](/products/get-started/about#frequently-asked-questions). diff --git a/web/site/content/en-CA/products/1.get-started/2.apis-summary.md b/web/site/content/en-CA/products/1.get-started/2.apis-summary.md index 2daa7a23..7414057f 100644 --- a/web/site/content/en-CA/products/1.get-started/2.apis-summary.md +++ b/web/site/content/en-CA/products/1.get-started/2.apis-summary.md @@ -19,6 +19,7 @@ Click on the Short Name to see more. | Short Name | Description | | --------------------------------------- | ------------------------------- | +| [SBC Connect (formerly Auth)](/products/connect/overview) | SBC Connect Api (formerly Auth Api) | | [Pay](/products/pay/overview) | Pay Api | | [PPR](/products/ppr/overview) | Personal Property Registry API | | [Business](/products/br/overview) | Business Registry API | @@ -256,7 +257,10 @@ Updates of note to this page are recorded here.

Removed versions from the List of APIs table. Refer to the respective API's Version History section for version information.

Removed Mock from the Environments table.

Removed the Analytics Reports section.

-

Updated the Environments table SANDBOX and PRODCUCTION Base URLs.

+

Updated the Environments table SANDBOX and PRODUCTION Base URLs.

+ + 2025-04-03 +

Added SBC Connect.

diff --git a/web/site/content/en-CA/products/connect/card.yml b/web/site/content/en-CA/products/connect/card.yml index ec63080c..cbff89d6 100644 --- a/web/site/content/en-CA/products/connect/card.yml +++ b/web/site/content/en-CA/products/connect/card.yml @@ -1,7 +1,10 @@ # Used to populate product card components -name: Product Name Here -description: Product Description Here -badge: NEW | BETA etc +name: SBC Connect +description: Provides authentication/authorization services for the SBC Connect platform +badge: Stable bulletPoints: - - bullet point 1 - - bullet point 2 \ No newline at end of file + - Create an account + - Manage account products + - Manage admin/coordinator/users + - Manage affiliations + - View API keys diff --git a/web/site/content/en-CA/products/pay/card.yml b/web/site/content/en-CA/products/pay/card.yml index e15415a7..a1038990 100644 --- a/web/site/content/en-CA/products/pay/card.yml +++ b/web/site/content/en-CA/products/pay/card.yml @@ -1,8 +1,8 @@ # Used to populate product card components name: Platform Payment and Catalog Services -description: The payment and catalog services for the sbc-connect platform -badge: BETA +description: The payment and catalog services for the SBC Connect platform +badge: Stable bulletPoints: - Pay for a service - Register services in the Catalog - - Transaction history \ No newline at end of file + - Transaction history diff --git a/web/site/nuxt.config.ts b/web/site/nuxt.config.ts index 6cfa9b2e..2975cb69 100644 --- a/web/site/nuxt.config.ts +++ b/web/site/nuxt.config.ts @@ -76,7 +76,6 @@ export default defineNuxtConfig({ 'web-component', '/sbc/tos', '/products/bn', - 'products/connect', '/1.get-started/3.api-access-request.md' ] }, diff --git a/web/site/package.json b/web/site/package.json index 1a64bffb..2fd6e9e2 100644 --- a/web/site/package.json +++ b/web/site/package.json @@ -2,7 +2,7 @@ "name": "developer-connect-site", "private": true, "type": "module", - "version": "1.1.2", + "version": "1.1.3", "scripts": { "build-check": "nuxt build", "build": "nuxt generate", From 041995490a239f49fcbc6bed3a6b21fe94f45715 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 11 Apr 2025 12:58:27 -0700 Subject: [PATCH 02/21] Add in connect spec --- web/site/nuxt.config.ts | 8 + web/site/public/connect/connect-spec.yaml | 388 ++++++++++++++++++++++ 2 files changed, 396 insertions(+) create mode 100644 web/site/public/connect/connect-spec.yaml diff --git a/web/site/nuxt.config.ts b/web/site/nuxt.config.ts index 2975cb69..798069b7 100644 --- a/web/site/nuxt.config.ts +++ b/web/site/nuxt.config.ts @@ -100,6 +100,14 @@ export default defineNuxtConfig({ basePath: '/oas/strr' } }, + { + spec: { + url: '/connect/connect-spec.yaml' + }, + pathRouting: { + basePath: '/oas/connect' + } + }, { spec: { url: '/br/business-spec.yaml' diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml new file mode 100644 index 00000000..85ae4527 --- /dev/null +++ b/web/site/public/connect/connect-spec.yaml @@ -0,0 +1,388 @@ +openapi: 3.0.0 +info: + title: SBC Connect API former Auth API + description:

SBC Connect API is used to manage the SBC Connect accounts. The system manages the authorizations related data and does integration with keycloak.

+ version: 1.0.2 + contact: + name: BC Registries + license: + name: Apache 2.0 +paths: +/affiliationInvitations: + parameters: + - name: businessDetails + in: query + schema: + type: string + default: 'false' + description: Flag to indicate if business details should be included + - name: orgId + in: query + schema: + type: string + description: Organization identifier + - name: businessIdentifier + in: query + schema: + type: string + description: Business identifier + - name: fromOrgId + in: query + schema: + type: string + description: Source organization identifier + - name: toOrgId + in: query + schema: + type: string + description: Target organization identifier + - name: statuses + in: query + schema: + type: array + items: + type: string + description: Status codes to filter invitations + explode: true + - name: types + in: query + schema: + type: array + items: + type: string + description: Invitation types to filter + explode: true + get: + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + affiliationInvitations: + type: array + items: + $ref: '#/components/schemas/affiliation_invitation' + '401': + description: Not Authorized + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + operationId: get_affiliation_invitations + tags: + - affiliationInvitations + summary: Get affiliation invitations. + description: Get affiliation invitations. + post: + responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/affiliation_invitation' + '400': + description: Bad Request + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + operationId: post_affiliation_invitation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/affiliation_invitation_request' + tags: + - affiliationInvitations + summary: Send a new affiliation invitation and save it. + description: Send a new affiliation invitation using the details in request and saves the affiliation invitation. + /affiliationInvitations/{affiliation_invitation_id}: + parameters: + - name: affiliation_invitation_id + in: path + description: Affiliation invitation identifier + required: true + schema: + type: string + get: + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/affiliation_invitation' + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: Description of the error. + operationId: get_affiliation_invitation + tags: + - affiliationInvitations + summary: Get the affiliation invitation by id. + description: Get the affiliation invitation specified by the provided id. + patch: + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/affiliation_invitation' + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: Description of the error. + operationId: patch_affiliation_invitation + requestBody: + content: + application/json: + schema: + type: object + tags: + - affiliationInvitations + summary: Update the affiliation invitation. + description: Update the affiliation invitation specified by the provided id. + delete: + responses: + '200': + description: Success + '404': + description: Not Found + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + operationId: delete_affiliation_invitation + tags: + - affiliationInvitations + summary: Delete the affiliation invitation. + description: Delete the specified affiliation invitation. + /affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token}: + parameters: + - name: affiliation_invitation_id + in: path + description: Affiliation invitation identifier + required: true + schema: + type: string + - name: affiliation_invitation_token + in: path + description: Affiliation invitation token + required: true + schema: + type: string + put: + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/affiliation_invitation' + '401': + description: Not Authorized + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: Description of the error. + operationId: accept_affiliation_invitation_token + tags: + - affiliationInvitations + summary: Accept an affiliation invitation using a token. + description: Check whether the passed token is valid and add affiliation from the affiliation invitation. + /affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action}: + parameters: + - name: affiliation_invitation_id + in: path + description: Affiliation invitation identifier + required: true + schema: + type: string + - name: authorize_action + in: path + description: Authorization action (accept or refuse) + required: true + schema: + type: string + enum: [accept, refuse] + patch: + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/affiliation_invitation' + '400': + description: Bad Request + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + operationId: patch_affiliation_invitation_authorization + tags: + - affiliationInvitations + summary: Authorize or refuse an affiliation invitation. + description: Check if user is active part of the Org. Authorize/Refuse Authorization invite if he is. +servers: + - url: "https://sandbox.api.connect.gov.bc.ca" + description: "Test" + - url: "https://api.connect.gov.bc.ca" + description: "Production" +tags: + - name: affiliationInvitations +components: + schemas: + affiliation_invitation_request: + title: affiliation_invitation_request + type: object + properties: + fromOrgId: + type: string + description: The ID of the organization sending the invitation + toOrgId: + type: string + description: The ID of the organization receiving the invitation + toOrgUuid: + type: string + description: The UUID of the organization receiving the invitation + businessIdentifier: + type: string + description: The business identifier for the entity + recipientEmail: + type: string + description: The email of the recipient + type: + type: string + description: The type of affiliation invitation + enum: [EMAIL, REQUEST] + additionalMessage: + type: string + description: Additional message for the invitation + required: + - fromOrgId + - businessIdentifier + affiliation_invitation: + title: affiliation_invitation + type: object + properties: + id: + type: string + description: The ID of the affiliation invitation + fromOrg: + type: object + properties: + id: + type: string + description: The ID of the organization sending the invitation + name: + type: string + description: The name of the organization sending the invitation + toOrg: + type: object + properties: + id: + type: string + description: The ID of the organization receiving the invitation + name: + type: string + description: The name of the organization receiving the invitation + entity: + type: object + properties: + business_identifier: + type: string + description: The business identifier + name: + type: string + description: The name of the business + corp_type: + type: string + description: The corporation type + state: + type: string + description: The state of the business + recipientEmail: + type: string + description: The email of the recipient + type: + type: string + description: The type of affiliation invitation + enum: [EMAIL, REQUEST] + status: + type: string + description: The status of the invitation + enum: [PENDING, ACCEPTED, EXPIRED] + additionalMessage: + type: string + description: Additional message for the invitation + sentDate: + type: string + format: date-time + description: The date the invitation was sent + acceptedDate: + type: string + format: date-time + description: The date the invitation was accepted + token: + type: string + description: The token for the invitation + expiresOn: + type: string + format: date-time + description: The date the invitation expires + securitySchemes: + JWT: + type: http + scheme: bearer +security: + - JWT: [] From 2e3b7ec107d3efa4912c0fb4f32fdbe0a3ab95ca Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 11 Apr 2025 14:07:31 -0700 Subject: [PATCH 03/21] Adding in overview.md --- .../en-CA/products/connect/overview.md | 135 +++++++++++++++++- 1 file changed, 132 insertions(+), 3 deletions(-) diff --git a/web/site/content/en-CA/products/connect/overview.md b/web/site/content/en-CA/products/connect/overview.md index 475d00b7..aa38451e 100644 --- a/web/site/content/en-CA/products/connect/overview.md +++ b/web/site/content/en-CA/products/connect/overview.md @@ -1,10 +1,139 @@ --- title: 'Overview' -description: 'SBC Connect Overview' +description: 'SBC Connect API' --- -# SBC Connect +# SBC Connect API --- -## Overview \ No newline at end of file +## Overview + +SBC Connect API (former Auth API) is a centralized authorization and authentication system designed to manage secure access across all partner applications. It ensures seamless user verification, enforces access controls, and protects sensitive resources through robust authentication mechanisms. By integrating with SBC Connect, partner apps can leverage a unified security framework, simplifying user management while maintaining compliance and security best practices. + +This specification focuses on creating business affiliations: +- By passcode +- By magic link +- By delegation + + +More to be added in the future. +
+ +::ButtonDownloadSpec{href="/connect/connect-spec.yaml" download="connect-spec.yaml"} +:: + +
+
+ +**Note:** All requests must include a **BC Registries issued API key** and an **Account ID**. + +--- + +## View the API + +View the definition and select a path to try it out. To submit a request you will need an API key and an account ID, which are obtained as part of completing an [access request](/products/get-started/api-access-request). To set your session API key, click on the top, right AUTHORIZE button and under API Key Auth enter your key value. Click on AUTHORIZE, then OK. + + View the API + +--- + +## API Quick Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Endpoint PathDescription
GET /auth/api/v1/affiliationInvitations + Get fee details based on the type business type and filing type. +
GET /auth/api/v1/affiliationInvitations + Get fee details based on the type business type and filing type. +
GET /auth/api/v1/affiliationInvitations + Get fee details based on the type business type and filing type. +
GET /auth/api/v1/affiliationInvitations + Get fee details based on the type business type and filing type. +
GET /auth/api/v1/affiliationInvitations + Get fee details based on the type business type and filing type. +
+ +--- + +## Date and Date Time Formats + + + + + + + + + + + + + + + + + +
TypeFormatExample
DateYYYY-MM-DD2020-05-14
DateTimeYYYY-MM-DDThh:mm:ss[Z|+hh:mm]. Either +hh:mm (the time zone offset) or Z must be supplied. Default Z for Pacific time zone value.2020-05-14T21:08:32Z
+ +--- + +## API Version History + + + + + + + + + + + + +
DateVersionDescription
2020-10-061.0.0Initial version
+ +--- + +## Additional Resources + +Postman collection WIP - Download a Demo Postman collection to view at least one example of each API path. Provide your own API key and account Id to submit requests and view the responses. + +## Page History + +Updates of note to this page are recorded here. + + + + + + + + + + +
DateDescription
2025-04-03Initial version
From 0f84db3f67f918ba9aa78aa80dac6a2058812b59 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 11 Apr 2025 14:11:23 -0700 Subject: [PATCH 04/21] add quotes --- web/site/public/connect/connect-spec.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml index 85ae4527..80efde14 100644 --- a/web/site/public/connect/connect-spec.yaml +++ b/web/site/public/connect/connect-spec.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: title: SBC Connect API former Auth API description:

SBC Connect API is used to manage the SBC Connect accounts. The system manages the authorizations related data and does integration with keycloak.

@@ -8,7 +8,7 @@ info: license: name: Apache 2.0 paths: -/affiliationInvitations: +'/affiliationInvitations': parameters: - name: businessDetails in: query @@ -114,7 +114,7 @@ paths: - affiliationInvitations summary: Send a new affiliation invitation and save it. description: Send a new affiliation invitation using the details in request and saves the affiliation invitation. - /affiliationInvitations/{affiliation_invitation_id}: + '/affiliationInvitations/{affiliation_invitation_id}'': parameters: - name: affiliation_invitation_id in: path @@ -195,7 +195,7 @@ paths: - affiliationInvitations summary: Delete the affiliation invitation. description: Delete the specified affiliation invitation. - /affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token}: + '/affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token}': parameters: - name: affiliation_invitation_id in: path @@ -232,7 +232,7 @@ paths: - affiliationInvitations summary: Accept an affiliation invitation using a token. description: Check whether the passed token is valid and add affiliation from the affiliation invitation. - /affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action}: + '/affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action}': parameters: - name: affiliation_invitation_id in: path From 2ef6cc7db58b82e7ae7df7cf7950fc3daeeb9652 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 11 Apr 2025 14:15:04 -0700 Subject: [PATCH 05/21] fix tabs --- web/site/public/connect/connect-spec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml index 80efde14..e139391d 100644 --- a/web/site/public/connect/connect-spec.yaml +++ b/web/site/public/connect/connect-spec.yaml @@ -8,7 +8,7 @@ info: license: name: Apache 2.0 paths: -'/affiliationInvitations': + '/affiliationInvitations': parameters: - name: businessDetails in: query @@ -114,7 +114,7 @@ paths: - affiliationInvitations summary: Send a new affiliation invitation and save it. description: Send a new affiliation invitation using the details in request and saves the affiliation invitation. - '/affiliationInvitations/{affiliation_invitation_id}'': + '/affiliationInvitations/{affiliation_invitation_id}': parameters: - name: affiliation_invitation_id in: path From ad845f1a8c61cb056e7bb6eff812d1ba816dc1db Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 11 Apr 2025 14:18:17 -0700 Subject: [PATCH 06/21] fix spec more --- web/site/public/connect/connect-spec.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml index e139391d..74124ebe 100644 --- a/web/site/public/connect/connect-spec.yaml +++ b/web/site/public/connect/connect-spec.yaml @@ -8,7 +8,7 @@ info: license: name: Apache 2.0 paths: - '/affiliationInvitations': + /auth/api/v1/affiliationInvitations: parameters: - name: businessDetails in: query @@ -114,7 +114,7 @@ paths: - affiliationInvitations summary: Send a new affiliation invitation and save it. description: Send a new affiliation invitation using the details in request and saves the affiliation invitation. - '/affiliationInvitations/{affiliation_invitation_id}': + /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}: parameters: - name: affiliation_invitation_id in: path @@ -195,7 +195,7 @@ paths: - affiliationInvitations summary: Delete the affiliation invitation. description: Delete the specified affiliation invitation. - '/affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token}': + /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token}: parameters: - name: affiliation_invitation_id in: path @@ -232,7 +232,7 @@ paths: - affiliationInvitations summary: Accept an affiliation invitation using a token. description: Check whether the passed token is valid and add affiliation from the affiliation invitation. - '/affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action}': + /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action}: parameters: - name: affiliation_invitation_id in: path From cb3fbf3848582293fbb501afebd8ca043e21641f Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 11 Apr 2025 14:26:13 -0700 Subject: [PATCH 07/21] more changes --- .../en-CA/products/connect/overview.md | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/web/site/content/en-CA/products/connect/overview.md b/web/site/content/en-CA/products/connect/overview.md index aa38451e..97d5c8a9 100644 --- a/web/site/content/en-CA/products/connect/overview.md +++ b/web/site/content/en-CA/products/connect/overview.md @@ -45,37 +45,62 @@ View the definition and select a path to try it out. To submit a request you wil Endpoint Path Description + + GET /orgs/{account_id}/affiliations + + Get Affiliations + + + + POST /orgs/{account_id}/affiliations + + Create affiliation by passcode + + + GET /auth/api/v1/affiliationInvitations - Get fee details based on the type business type and filing type. + Get delegation or magic links. + - GET /auth/api/v1/affiliationInvitations + POST /auth/api/v1/affiliationInvitations Get fee details based on the type business type and filing type. - GET /auth/api/v1/affiliationInvitations + GET /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} Get fee details based on the type business type and filing type. - GET /auth/api/v1/affiliationInvitations + PATCH /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} Get fee details based on the type business type and filing type. - - GET /auth/api/v1/affiliationInvitations + + DELETE /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} Get fee details based on the type business type and filing type. - + + PUT /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token} + + Get fee details based on the type business type and filing type. + + + + PATCH /affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action} + + go + + --- From 5d997c38b4fccddd95993fddf5c78285578f0d8c Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 11 Apr 2025 14:28:21 -0700 Subject: [PATCH 08/21] More changes --- web/site/content/en-CA/products/connect/overview.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/site/content/en-CA/products/connect/overview.md b/web/site/content/en-CA/products/connect/overview.md index 97d5c8a9..b0fa3f7e 100644 --- a/web/site/content/en-CA/products/connect/overview.md +++ b/web/site/content/en-CA/products/connect/overview.md @@ -46,13 +46,13 @@ View the definition and select a path to try it out. To submit a request you wil Description - GET /orgs/{account_id}/affiliations + GET /auth/api/v1/orgs/{account_id}/affiliations Get Affiliations - POST /orgs/{account_id}/affiliations + POST /auth/api/v1/orgs/{account_id}/affiliations Create affiliation by passcode @@ -136,7 +136,7 @@ View the definition and select a path to try it out. To submit a request you wil Description - 2020-10-06 + 2025-04-11 1.0.0 Initial version From 5fb3ff1e3a40e399d171cf0888e8036a58da47f3 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Tue, 15 Apr 2025 08:11:57 -0700 Subject: [PATCH 09/21] small update --- .../en-CA/products/connect/overview.md | 109 +++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/web/site/content/en-CA/products/connect/overview.md b/web/site/content/en-CA/products/connect/overview.md index b0fa3f7e..a2f79b2d 100644 --- a/web/site/content/en-CA/products/connect/overview.md +++ b/web/site/content/en-CA/products/connect/overview.md @@ -40,23 +40,128 @@ View the definition and select a path to try it out. To submit a request you wil ## API Quick Reference +### Common (passcode / magic link / delegation) + + + + + + + + +
Endpoint Path DescriptionNotes
GET /auth/api/v1/orgs/{account_id}/affiliations - Get Affiliations + Get affiliations + + Views all affiliation for an org. An affiliation is a relationship between an account (org) and an entity. It determines access to a business from an account (org).
GET /auth/api/v1/entities/{business_identifier}/authentication + Get authentication + + Check for authentication, hasValidPassCode (passcode) or contactEmail (magic link) to see if they are available. +
+ + +### By passcode + + + + + + + + +
Endpoint PathDescriptionNotes
POST /auth/api/v1/orgs/{account_id}/affiliations Create affiliation by passcode + For SP (Sole Proprieter) and GP (General Partnership) passcode is organization name or in the format of: last, first middleinitial (middle initial optional). + For other entity types, it should just be a code. +
+ +### By magic link + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Endpoint PathDescription
GET /auth/api/v1/orgs/{account_id}/affiliations + Get Affiliations +
GET /auth/api/v1/affiliationInvitations + Get Affiliation Invitations (delegation or magic link requests). +
PUT /auth/api/v1/entities/{business_identifier}/contacts + Update business contact email (can be used for magic link). +
POST /auth/api/v1/affiliationInvitations + Create Magic Link {"fromOrgId":520,"businessIdentifier":"BC1023203","toOrgId":null} +
GET /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} + Get fee details based on the type business type and filing type. +
PATCH /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} + Get fee details based on the type business type and filing type. +
DELETE /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} + Get fee details based on the type business type and filing type. +
PUT /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token} + Get fee details based on the type business type and filing type. +
PATCH /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action} + go +
+ + +### By delegation + + + + + + + + @@ -96,7 +201,7 @@ View the definition and select a path to try it out. To submit a request you wil - + From 1ca92fb2ef0a4ba6ad2506c720d22dc902881744 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 30 Apr 2025 12:44:29 -0700 Subject: [PATCH 10/21] small change --- web/site/content/en-CA/products/connect/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/site/content/en-CA/products/connect/overview.md b/web/site/content/en-CA/products/connect/overview.md index a2f79b2d..598d59f5 100644 --- a/web/site/content/en-CA/products/connect/overview.md +++ b/web/site/content/en-CA/products/connect/overview.md @@ -251,7 +251,7 @@ View the definition and select a path to try it out. To submit a request you wil ## Additional Resources -Postman collection WIP - Download a Demo Postman collection to view at least one example of each API path. Provide your own API key and account Id to submit requests and view the responses. +Postman collection of these calls is included in the [Business Registry](/products/br/overview) postman collection. ## Page History From 5229cd3f8ff7fe2f36331b0fca087d416329c4a1 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 30 Apr 2025 14:17:13 -0700 Subject: [PATCH 11/21] Fix for scalar locally, thank you Dietrich --- web/site/nuxt.config.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/web/site/nuxt.config.ts b/web/site/nuxt.config.ts index 7f66f24c..d21a9423 100644 --- a/web/site/nuxt.config.ts +++ b/web/site/nuxt.config.ts @@ -1,5 +1,6 @@ // https://nuxt.com/docs/api/configuration/nuxt-config import type { BreadcrumbLink } from '#ui/types' +const localScalarUrl = process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : '' export default defineNuxtConfig({ devtools: { enabled: false }, ssr: true, @@ -93,7 +94,7 @@ export default defineNuxtConfig({ configurations: [ { spec: { - url: '/strr/platform.yaml' + url: `${localScalarUrl}/strr/platform.yaml` }, pathRouting: { basePath: '/oas/strr' @@ -101,7 +102,7 @@ export default defineNuxtConfig({ }, { spec: { - url: '/connect/connect-spec.yaml' + url: `${localScalarUrl}/connect/connect-spec.yaml` }, pathRouting: { basePath: '/oas/connect' @@ -109,7 +110,7 @@ export default defineNuxtConfig({ }, { spec: { - url: '/br/business-spec.yaml' + url: `${localScalarUrl}/br/business-spec.yaml` }, pathRouting: { basePath: '/oas/br' @@ -117,7 +118,7 @@ export default defineNuxtConfig({ }, { spec: { - url: '/mhr/mhr-spec.yaml' + url: `${localScalarUrl}/mhr/mhr-spec.yaml` }, pathRouting: { basePath: '/oas/mhr' @@ -125,7 +126,7 @@ export default defineNuxtConfig({ }, { spec: { - url: '/pay/payment-spec.yaml' + url: `${localScalarUrl}/pay/payment-spec.yaml` }, pathRouting: { basePath: '/oas/pay' @@ -133,7 +134,7 @@ export default defineNuxtConfig({ }, { spec: { - url: '/ppr/ppr-spec.yaml' + url: `${localScalarUrl}/ppr/ppr-spec.yaml` }, pathRouting: { basePath: '/oas/ppr' @@ -141,7 +142,7 @@ export default defineNuxtConfig({ }, { spec: { - url: '/rs/regsearch-spec.yaml' + url: `${localScalarUrl}/rs/regsearch-spec.yaml` }, pathRouting: { basePath: '/oas/rs' From 0ce7f524c51914fc712d3b4c7fa1461a5fde7ff4 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 1 May 2025 10:54:19 -0700 Subject: [PATCH 12/21] Remove API quick reference --- .../en-CA/products/connect/overview.md | 172 ------------------ 1 file changed, 172 deletions(-) diff --git a/web/site/content/en-CA/products/connect/overview.md b/web/site/content/en-CA/products/connect/overview.md index 598d59f5..60f1eb1a 100644 --- a/web/site/content/en-CA/products/connect/overview.md +++ b/web/site/content/en-CA/products/connect/overview.md @@ -36,179 +36,7 @@ View the definition and select a path to try it out. To submit a request you wil View the API ---- - -## API Quick Reference -### Common (passcode / magic link / delegation) -
Endpoint PathDescription
GET /auth/api/v1/orgs/{account_id}/affiliations + Get Affiliations +
GET /auth/api/v1/affiliationInvitations
PATCH /affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action}PATCH /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action} go
- - - - - - - - - - - - - - - - -
Endpoint PathDescriptionNotes
GET /auth/api/v1/orgs/{account_id}/affiliations - Get affiliations - - Views all affiliation for an org. An affiliation is a relationship between an account (org) and an entity. It determines access to a business from an account (org). -
GET /auth/api/v1/entities/{business_identifier}/authentication - Get authentication - - Check for authentication, hasValidPassCode (passcode) or contactEmail (magic link) to see if they are available. -
- - -### By passcode - - - - - - - - - - - -
Endpoint PathDescriptionNotes
POST /auth/api/v1/orgs/{account_id}/affiliations - Create affiliation by passcode - - For SP (Sole Proprieter) and GP (General Partnership) passcode is organization name or in the format of: last, first middleinitial (middle initial optional). - For other entity types, it should just be a code. -
- -### By magic link - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Endpoint PathDescription
GET /auth/api/v1/orgs/{account_id}/affiliations - Get Affiliations -
GET /auth/api/v1/affiliationInvitations - Get Affiliation Invitations (delegation or magic link requests). -
PUT /auth/api/v1/entities/{business_identifier}/contacts - Update business contact email (can be used for magic link). -
POST /auth/api/v1/affiliationInvitations - Create Magic Link {"fromOrgId":520,"businessIdentifier":"BC1023203","toOrgId":null} -
GET /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} - Get fee details based on the type business type and filing type. -
PATCH /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} - Get fee details based on the type business type and filing type. -
DELETE /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} - Get fee details based on the type business type and filing type. -
PUT /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token} - Get fee details based on the type business type and filing type. -
PATCH /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action} - go -
- - -### By delegation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Endpoint PathDescription
GET /auth/api/v1/orgs/{account_id}/affiliations - Get Affiliations -
GET /auth/api/v1/affiliationInvitations - Get delegation or magic links. -
POST /auth/api/v1/affiliationInvitations - Get fee details based on the type business type and filing type. -
GET /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} - Get fee details based on the type business type and filing type. -
PATCH /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} - Get fee details based on the type business type and filing type. -
DELETE /auth/api/v1/affiliationInvitations/{affiliation_invitation_id} - Get fee details based on the type business type and filing type. -
PUT /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token} - Get fee details based on the type business type and filing type. -
PATCH /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action} - go -
- ---- ## Date and Date Time Formats From 57a864c3b78ab4408a34d759f8e4e155d5bb9fcb Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Fri, 2 May 2025 14:27:18 -0700 Subject: [PATCH 13/21] fix tag for statements --- web/site/public/pay/payment-spec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/site/public/pay/payment-spec.yaml b/web/site/public/pay/payment-spec.yaml index aa5f7214..750d2395 100644 --- a/web/site/public/pay/payment-spec.yaml +++ b/web/site/public/pay/payment-spec.yaml @@ -1051,7 +1051,7 @@ paths: required: true get: summary: "Get list of statements" - tags: [] + tags: ["Statements"] responses: "200": description: "OK" @@ -1255,7 +1255,7 @@ paths: required: true get: summary: "Get the statement" - tags: [] + tags: ["Statements"] responses: "200": description: "OK" From 528e0c91fc625abea20bb81f29702b70a75bb652 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Mon, 5 May 2025 16:30:10 -0700 Subject: [PATCH 14/21] Fill out the spec --- web/site/public/connect/connect-spec.yaml | 810 ++++++++++++++++++++-- web/site/public/pay/payment-spec.yaml | 4 +- 2 files changed, 757 insertions(+), 57 deletions(-) diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml index 74124ebe..d15eccbc 100644 --- a/web/site/public/connect/connect-spec.yaml +++ b/web/site/public/connect/connect-spec.yaml @@ -1,15 +1,326 @@ openapi: 3.0.1 info: title: SBC Connect API former Auth API - description:

SBC Connect API is used to manage the SBC Connect accounts. The system manages the authorizations related data and does integration with keycloak.

+ description: |- +

SBC Connect API is used to manage the SBC Connect accounts. The system manages the authorizations related data and does integration with keycloak. This specification focuses on documentating the relationship between an account and a entity (Name Request/Business). There are three different methods - Passcode, Magic Link, Delegation.

+
+ All API requests must include an issued API key. version: 1.0.2 contact: name: BC Registries license: name: Apache 2.0 paths: - /auth/api/v1/affiliationInvitations: + /auth/api/v1/orgs/affiliation/{business_identifer}: + parameters: + - name: business_identifier + in: path + description: Business identifier + required: true + schema: + type: string + get: + summary: Get accounts that have affiliations for business identifier + description: Used as part of the affiliation invitation toOrgUuid payload delegations only. + tags: + - Passcode / Magic link / Delegation prerequisites + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + orgsDetails: + type: array + items: + type: object + properties: + branchName: + type: string + example: "Downtown" + name: + type: string + example: "ICBC PROPERTIES LTD." + uuid: + type: string + format: uuid + example: "e50a83f6-606d-42b6-a7cf-54555af76037" + required: + - branchName + - name + - uuid + '401': + description: Not Authorized + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + '404': + description: Business not found + /auth/api/v1/entities/{business_identifier}/authentication: parameters: + - name: business_identifier + in: path + description: Business identifier + required: true + schema: + type: string + get: + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + contactEmail: + type: string + description: Masked contact email of entity + example: he***@me******** + hasValidPassCode: + type: boolean + description: If the entity has a valid passcode that isn't consumed + example: true + '401': + description: Not Authorized + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + '403': + description: Not Authorized + '404': + description: Business not found + + tags: + - Passcode / Magic link / Delegation prerequisites + operationId: get_entity_authentication + summary: Get entity authentication + description: Get entity authentication to see if the entity has passcode or magic link email available. + /auth/api/v1/orgs/{account_id}/affiliations/{business_identifier}: + get: + summary: Get affiliations for entity + tags: + - Affiliations + parameters: + - name: account_id + in: path + required: true + schema: + type: integer + - name: business_identifier + in: path + required: true + schema: + type: string + responses: + '200': + description: Successful response with affiliation details + content: + application/json: + schema: + $ref: '#/components/schemas/AffiliationResponse' + '400': + description: Bad Request + content: + application/json: + schema: + type: object + additionalProperties: true + properties: + code: + type: string + example: DATA_ALREADY_EXISTS + message: + type: string + example: The data you want to insert already exists. + '401': + description: Not Authorized + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + '403': + description: Not Authorized + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + '404': + description: Business not found + /auth/api/v1/entities/{business_identifier}/contacts: + put: + tags: + - Passcode / Magic link / Delegation prerequisites + summary: Update contact information for a business entity + description: For updating the contact information for a business entity so magic link will work (email needs to be present). An existing affiliation must be present for this to work. + parameters: + - name: business_identifier + in: path + description: Business identifier + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + email: + type: string + required: true + description: "email for entity contact" + format: email + example: hello@mellow.com + phone: + type: string + required: true + description: "phone for entity contact" + example: "(437) 887-5267" + phoneExtension: + type: string + required: true + example: "" + + responses: + '200': + description: Contact information updated successfully + '400': + description: Bad Request + '401': + description: Not Authorized + '403': + description: Not Authorized (missing affiliation) + '404': + description: Business not found + /auth/api/v1/orgs/{account_id}/affiliations: + parameters: + - name: account_id + in: path + description: account id + required: true + schema: + type: integer + tags: + - Passcode / Magic link / Delegation prerequisites + + summary: Get entity authentication + description: Get entity authentication to see if the entity has passcode or magic link email available. + get: + summary: Get affiliations for account + description: The Business Dashboard uses this. This will change in the near future to include pagination. Request Parameters and response likely to change. + tags: + - Affiliations + responses: + '200': + description: Successful + content: + application/json: + schema: + $ref: '#/components/schemas/AffiliationSearchResponse' + '401': + description: Not Authorized + '403': + description: Not Authorized (missing affiliation) + '404': + description: Business not found + post: + summary: Create a new business affiliation (via Passcode) + operationId: post-affiliation + tags: + - Affiliations + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AffiliationByPasscodeRequest' + examples: + bc-ben-passcode: + summary: Example for BC/BEN where the passcode is a phrase + value: + businessIdentifier: "BC1234567" + certifiedByName: "" + passcode: "passcode" + sp-gp-passcode: + summary: Example for SP/GP passcode is an officer of the company + value: + businessIdentifier: "FM1004308" + certifiedByName: "" + passcode: "Doug, Funny B" + sp-gp-passcode-organization: + summary: Example for SP/GP the passcode is organization of the company + value: + businessIdentifier: "FM1004308" + certifiedByName: "" + passcode: "Lawyers Organization" + responses: + '200': + description: Affiliation successfully created + '400': + description: Bad Request + content: + application/json: + schema: + type: object + additionalProperties: true + properties: + code: + type: string + example: DATA_ALREADY_EXISTS + message: + type: string + example: The data you want to insert already exists. + '401': + description: Not Authorized + '403': + description: Not Authorized + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: Identifier representing the type of error that occurred. + message: + type: string + description: Description of the error. + /auth/api/v1/affiliationInvitations: + get: + parameters: - name: businessDetails in: query schema: @@ -52,7 +363,6 @@ paths: type: string description: Invitation types to filter explode: true - get: responses: '200': description: Success @@ -64,7 +374,7 @@ paths: affiliationInvitations: type: array items: - $ref: '#/components/schemas/affiliation_invitation' + $ref: '#/components/schemas/AffiliationInvitationResponse' '401': description: Not Authorized content: @@ -78,11 +388,18 @@ paths: message: type: string description: Description of the error. + '403': + description: Not Authorized operationId: get_affiliation_invitations tags: - - affiliationInvitations - summary: Get affiliation invitations. - description: Get affiliation invitations. + - Affiliation Invitation (Magic Link / Delegation) + summary: Get affiliation invitations + description: |- + An example of the business dashboard fetching affiliation invitations for an account (outgoing requests Magic Link and Delegation, includes business details): + ?orgId=574&businessDetails=true + + An example of the business landing page fetching affiliation invitations (incoming delegation requests): + ?toOrgId=1923&businessIdentifier=FM1000334&statuses=PENDING post: responses: '201': @@ -90,7 +407,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/affiliation_invitation' + $ref: '#/components/schemas/AffiliationInvitationCreateResponse' '400': description: Bad Request content: @@ -101,19 +418,45 @@ paths: code: type: string description: Identifier representing the type of error that occurred. + example: INVALID_BUSINESS_EMAIL message: type: string description: Description of the error. + example: Business contact email not valid. + '401': + description: Unauthorized + '403': + description: Unauthorized operationId: post_affiliation_invitation requestBody: content: application/json: schema: - $ref: '#/components/schemas/affiliation_invitation_request' + $ref: '#/components/schemas/AffiliationInvitationRequest' + examples: + magic-link: + summary: magic link request + value: + fromOrgId: 574 + businessIdentifier: 'FM1004378' + delegation-request: + summary: delegation request + value: + fromOrgId: 2821 + toOrgUuid: 'e50a83f6-606d-42b6-a7cf-76206af76037' + businessIdentifier: 'FM1004377' + type: 'REQUEST' + additionalMessage: 'requesting delegation owner sees this' tags: - - affiliationInvitations - summary: Send a new affiliation invitation and save it. - description: Send a new affiliation invitation using the details in request and saves the affiliation invitation. + - Affiliation Invitation (Magic Link / Delegation) + summary: Create new affiliation invitation + description: |- + Can create two affiliation invitations using two methods: + - Magic Link + - Delegation +
+ They both have different payloads included in the examples. + Passcode is affiliated by directly creating an affiliation. /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}: parameters: - name: affiliation_invitation_id @@ -129,7 +472,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/affiliation_invitation' + $ref: '#/components/schemas/AffiliationInvitationResponse' + '400': + description: Bad Request + '401': + description: Not Authorized + '403': + description: Not Authorized '404': description: Not Found content: @@ -142,9 +491,9 @@ paths: description: Description of the error. operationId: get_affiliation_invitation tags: - - affiliationInvitations - summary: Get the affiliation invitation by id. - description: Get the affiliation invitation specified by the provided id. + - Affiliation Invitation (Magic Link / Delegation) + summary: Get affiliation invitation by id + description: Get a specific affiliation invitation by id. patch: responses: '200': @@ -152,7 +501,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/affiliation_invitation' + $ref: '#/components/schemas/AffiliationInvitationResponse' '404': description: Not Found content: @@ -163,20 +512,22 @@ paths: message: type: string description: Description of the error. - operationId: patch_affiliation_invitation + operationId: patch_AffiliationInvitation requestBody: content: application/json: - schema: - type: object tags: - - affiliationInvitations - summary: Update the affiliation invitation. - description: Update the affiliation invitation specified by the provided id. + - Affiliation Invitation (Magic Link / Delegation) + summary: Update the affiliation invitation (Magic Link only) + description: Update the affiliation invitation specified by the provided id. EG. resending the Magic Link if it expired. Only works on PENDING invitations. delete: responses: '200': description: Success + '401': + description: Not Authorized + '403': + description: Not Authorized '404': description: Not Found content: @@ -192,23 +543,25 @@ paths: description: Description of the error. operationId: delete_affiliation_invitation tags: - - affiliationInvitations - summary: Delete the affiliation invitation. - description: Delete the specified affiliation invitation. - /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/token/{affiliation_invitation_token}: + - Affiliation Invitation (Magic Link / Delegation) + summary: Delete the affiliation invitation + description: Delete the specified affiliation invitation. Soft delete if it's already accepted. + /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/token/{token}: parameters: - name: affiliation_invitation_id in: path description: Affiliation invitation identifier required: true schema: - type: string - - name: affiliation_invitation_token + type: integer + example: 234 + - name: token in: path - description: Affiliation invitation token + description: Invitation token from email or affiliationInvitation required: true schema: type: string + example: "eyJpZCI6MTU4LCJmcm9tT3.aBkYkw.wKI2wUtP6pSdiuqJ9UoI4CmOiD4.........." put: responses: '200': @@ -216,7 +569,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/affiliation_invitation' + $ref: '#/components/schemas/AffiliationInvitationResponse' '401': description: Not Authorized content: @@ -227,11 +580,15 @@ paths: message: type: string description: Description of the error. + '403': + description: Not Authorized operationId: accept_affiliation_invitation_token tags: - - affiliationInvitations - summary: Accept an affiliation invitation using a token. - description: Check whether the passed token is valid and add affiliation from the affiliation invitation. + - Affiliation Invitation (Magic Link / Delegation) + summary: Accept an affiliation invitation using a token (Magic Link only) + description: |- + Token can be either grabbed from the Magic Link Email, or grabbed by using GET on an affiliation invitation (with type EMAIL). + This route is used by the owner of the business to grant an affiliation to the requester via Magic Link. /auth/api/v1/affiliationInvitations/{affiliation_invitation_id}/authorization/{authorize_action}: parameters: - name: affiliation_invitation_id @@ -254,7 +611,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/affiliation_invitation' + $ref: '#/components/schemas/AffiliationInvitationResponse' '400': description: Bad Request content: @@ -268,51 +625,314 @@ paths: message: type: string description: Description of the error. + '401': + description: Not Authorized + '403': + description: Not Authorized operationId: patch_affiliation_invitation_authorization tags: - - affiliationInvitations - summary: Authorize or refuse an affiliation invitation. - description: Check if user is active part of the Org. Authorize/Refuse Authorization invite if he is. + - Affiliation Invitation (Magic Link / Delegation) + summary: Authorize or refuse an affiliation invitation (Delegation only) servers: + - url: "https://test.api.connect.gov.bc.ca" + description: "Internal Test" - url: "https://sandbox.api.connect.gov.bc.ca" description: "Test" - url: "https://api.connect.gov.bc.ca" description: "Production" -tags: - - name: affiliationInvitations components: schemas: - affiliation_invitation_request: - title: affiliation_invitation_request + AffiliationResponse: + type: object + properties: + business: + type: object + properties: + affiliations: + type: array + items: + type: object + properties: + created: + type: string + format: date-time + example: "2022-06-01T19:48:21+00:00" + id: + type: integer + example: 4496 + businessIdentifier: + type: string + example: "FM1000334" + contacts: + type: array + items: + type: object + properties: + email: + type: string + format: email + example: "hey@hah.com" + phone: + type: string + example: "(250) 567-5675" + phoneExtension: + type: string + example: "" + corpType: + type: object + properties: + code: + type: string + example: "SP" + default: + type: boolean + example: false + desc: + type: string + example: "Sole Proprietorship" + created: + type: string + format: date-time + example: "2022-06-01T19:48:21+00:00" + createdBy: + type: string + example: "None None" + modified: + type: string + format: date-time + example: "2022-06-01T21:39:26+00:00" + modifiedBy: + type: string + example: "None None" + name: + type: string + example: "fsdfsf" + passCodeClaimed: + type: boolean + example: true + status: + type: string + example: "HISTORICAL" + created: + type: string + format: date-time + example: "2025-05-05T18:00:48+00:00" + createdBy: + type: string + example: "User" + id: + type: integer + example: 33807 + modified: + type: string + format: date-time + example: "2025-05-05T18:00:48+00:00" + organization: + type: object + properties: + accessType: + type: string + example: "REGULAR" + branchName: + type: string + example: "" + contacts: + type: array + items: + type: object + properties: + city: + type: string + example: "Saskatoon" + country: + type: string + example: "CA" + postalCode: + type: string + example: "S7K 7Z4" + region: + type: string + example: "SK" + street: + type: string + example: "324-305 Pinehouse Dr" + streetAdditional: + type: string + example: "" + created: + type: string + format: date-time + example: "2025-05-05T14:06:31+00:00" + createdBy: + type: string + example: "BCREGTEST Bena THIRTEEN" + hasApiAccess: + type: boolean + example: true + id: + type: integer + example: 2821 + isBusinessAccount: + type: boolean + example: false + mailingAddress: + type: object + properties: + city: + type: string + example: "Victoria" + country: + type: string + example: "CA" + postalCode: + type: string + example: "S7K 7Z7" + region: + type: string + example: "SK" + street: + type: string + example: "3555 Hello Drive" + streetAdditional: + type: string + example: "" + modified: + type: string + format: date-time + example: "2025-05-05T14:07:05+00:00" + modifiedBy: + type: string + example: "None None" + name: + type: string + example: "API Testing" + orgStatus: + type: string + example: "ACTIVE" + orgType: + type: string + example: "PREMIUM" + statusCode: + type: string + example: "ACTIVE" + typeCode: + type: string + example: "PREMIUM" + uuid: + type: string + format: uuid + example: "0ebc402d-ed11-44ac-b833-3f46301326a5" + version: + type: integer + example: 2 + version: + type: integer + example: 1 + AffiliationByPasscodeRequest: + title: AffiliationByPasscodeRequest + type: object + required: + - businessIdentifier + - certifiedByName + - passCode + properties: + businessIdentifier: + type: string + example: BC0000001 + certifiedByName: + type: string + example: "" + passCode: + type: string + example: passcode + AffiliationInvitationRequest: + title: AffiliationInvitationRequest type: object properties: fromOrgId: type: string description: The ID of the organization sending the invitation - toOrgId: - type: string - description: The ID of the organization receiving the invitation toOrgUuid: type: string - description: The UUID of the organization receiving the invitation + description: The UUID of the organization receiving the invitation (may need to call /orgs/affiliation/{business_identifer}/ to get this info) businessIdentifier: type: string description: The business identifier for the entity - recipientEmail: - type: string - description: The email of the recipient type: type: string description: The type of affiliation invitation enum: [EMAIL, REQUEST] additionalMessage: type: string - description: Additional message for the invitation + description: Additional message for the delegation invitation required: - fromOrgId - businessIdentifier - affiliation_invitation: - title: affiliation_invitation + AffiliationInvitationCreateResponse: + title: AffiliationInvitationCreateResponse + type: object + properties: + additionalMessage: + type: string + example: "Hello trying to affiliate" + businessIdentifier: + type: string + example: "FM1000334" + expiresOn: + type: string + format: date-time + example: "2025-05-05T16:04:00+00:00" + fromOrg: + type: object + properties: + id: + type: integer + example: 2821 + name: + type: string + example: "API Testing" + orgType: + type: string + example: "PREMIUM" + toOrg: + type: object + properties: + id: + type: integer + example: 422 + name: + type: string + example: "API Testing" + orgType: + type: string + example: "PREMIUM" + id: + type: integer + example: 151 + isDeleted: + type: boolean + example: false + recipientEmail: + type: string + example: "tr***********@go*******" + sentDate: + type: string + format: date-time + example: "2025-05-05T15:49:00+00:00" + status: + type: string + enum: [PENDING, ACCEPTED, EXPIRED, FAILED] + example: "PENDING" + token: + type: string + description: invitation token + example: "eyJpZ..." + type: + type: string + enum: [EMAIL, REQUEST] + example: "EMAIL/REQUEST" + AffiliationInvitationResponse: + title: AffiliationInvitationResponse type: object properties: id: @@ -380,9 +1000,89 @@ components: type: string format: date-time description: The date the invitation expires + isDeleted: + type: bool + description: Soft delete flag + default: false + AffiliationSearchResponse: + type: object + additionalProperties: true + properties: + entities: + type: array + items: + type: object + properties: + adminFreeze: + type: boolean + description: Determine if business is frozen + alternateNames: + type: array + description: alternate names for SP/GP + items: + type: object + properties: + entityType: + type: string + example: "SP" + identifier: + type: string + example: "FM1004308" + name: + type: string + example: "SPSPSPSP" + registeredDate: + type: string + format: date-time + example: "2022-07-20T08:00:00+00:00" + startDate: + type: string + format: date-time + nullable: true + example: null + type: + type: string + example: "DBA" + foundingDate: + type: string + description: Date entity was founted + format: date-time + example: "2022-07-20T08:00:00+00:00" + goodStanding: + type: boolean + description: field to determine if business is in good standing + example: true + identifier: + type: string + description: business identifier + example: "FM1004308" + inDissolution: + type: boolean + example: false + lastModified: + type: string + format: date-time + example: "2022-07-20T23:31:09.839582+00:00" + legalName: + type: string + description: "Legal name" + example: "FSFS FSF" + legalType: + type: string + description: "Legal type" + example: "SP" + state: + type: string + description: "State of the business" + example: "ACTIVE" securitySchemes: JWT: - type: http - scheme: bearer + type: "http" + scheme: "bearer" + api_key: + name: "x-apikey" + type: "apiKey" + in: "header" security: - - JWT: [] +- api_key: [] +- JWT: [] diff --git a/web/site/public/pay/payment-spec.yaml b/web/site/public/pay/payment-spec.yaml index 750d2395..1b29d5d2 100644 --- a/web/site/public/pay/payment-spec.yaml +++ b/web/site/public/pay/payment-spec.yaml @@ -316,7 +316,7 @@ paths: get: tags: - "Invoice" - summary: "Get Invoice" + summary: "Get invoice" description: "Get invoice details by request identifier" operationId: "get_payment_request" responses: @@ -443,7 +443,7 @@ paths: delete: tags: - "Invoice" - summary: "" + summary: "Delete invoice" operationId: "delete_payment_request" responses: "202": From 7167e160be35f9c12f7a60480ec072eb9ed68959 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Mon, 5 May 2025 16:43:10 -0700 Subject: [PATCH 15/21] Small changes --- web/site/content/en-CA/products/connect/overview.md | 2 +- web/site/public/connect/connect-spec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/site/content/en-CA/products/connect/overview.md b/web/site/content/en-CA/products/connect/overview.md index 60f1eb1a..a6fb4853 100644 --- a/web/site/content/en-CA/products/connect/overview.md +++ b/web/site/content/en-CA/products/connect/overview.md @@ -32,7 +32,7 @@ More to be added in the future. ## View the API -View the definition and select a path to try it out. To submit a request you will need an API key and an account ID, which are obtained as part of completing an [access request](/products/get-started/api-access-request). To set your session API key, click on the top, right AUTHORIZE button and under API Key Auth enter your key value. Click on AUTHORIZE, then OK. +View the definition and select a path to try it out. To submit a request you will need an API key and an account ID, which are obtained as part of completing an access request. To set your session API key, click on the top, right AUTHORIZE button and under API Key Auth enter your key value. Click on AUTHORIZE, then OK. View the API diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml index d15eccbc..f601339e 100644 --- a/web/site/public/connect/connect-spec.yaml +++ b/web/site/public/connect/connect-spec.yaml @@ -241,7 +241,7 @@ paths: description: Get entity authentication to see if the entity has passcode or magic link email available. get: summary: Get affiliations for account - description: The Business Dashboard uses this. This will change in the near future to include pagination. Request Parameters and response likely to change. + description: The Business Dashboard calls get affiliations for account. This will change in the near future to include pagination. Request Parameters and response likely to change. tags: - Affiliations responses: From 5f0e57176875d87cacf7aca2db25d447abfee840 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Tue, 6 May 2025 06:08:33 -0700 Subject: [PATCH 16/21] Fix unit test, have products alphabetical (SBC Connect needs to be above STRR). Doesn't seem to impact Get Started etc. --- .../tests/unit/utils/createContentNav.test.ts | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/web/site/app/tests/unit/utils/createContentNav.test.ts b/web/site/app/tests/unit/utils/createContentNav.test.ts index f19d4192..4f2d049e 100644 --- a/web/site/app/tests/unit/utils/createContentNav.test.ts +++ b/web/site/app/tests/unit/utils/createContentNav.test.ts @@ -56,6 +56,16 @@ const initialNavItems = [ ] const formattedNavItems = [ + { + children: [ + { label: 'Overview', to: '/en-CA/products/br/overview' }, + { label: 'Api', to: '/en-CA/products/br/api' }, + { label: 'Examples', to: '/en-CA/products/br/examples' }, + { label: 'Contact', to: '/en-CA/products/br/contact' } + ], + defaultOpen: true, + label: 'Business Registry' + }, { children: [ { label: 'Account Setup', to: '/en-CA/products/get-started/account-setup' }, @@ -67,16 +77,7 @@ const formattedNavItems = [ ], defaultOpen: true, label: 'Get Started' - }, { - children: [ - { label: 'Overview', to: '/en-CA/products/br/overview' }, - { label: 'Api', to: '/en-CA/products/br/api' }, - { label: 'Examples', to: '/en-CA/products/br/examples' }, - { label: 'Contact', to: '/en-CA/products/br/contact' } - ], - defaultOpen: true, - label: 'Business Registry' - } + } ] describe('createContentNav', () => { From 13761deb099e16f205d1bf736fe8b49d050fa6cc Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Tue, 6 May 2025 06:10:05 -0700 Subject: [PATCH 17/21] lint --- web/site/app/tests/unit/utils/createContentNav.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/site/app/tests/unit/utils/createContentNav.test.ts b/web/site/app/tests/unit/utils/createContentNav.test.ts index 4f2d049e..12d7039b 100644 --- a/web/site/app/tests/unit/utils/createContentNav.test.ts +++ b/web/site/app/tests/unit/utils/createContentNav.test.ts @@ -77,7 +77,7 @@ const formattedNavItems = [ ], defaultOpen: true, label: 'Get Started' - } + } ] describe('createContentNav', () => { From 8ddea0f8e9799acdebf2cbb28846734c460a3191 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Tue, 6 May 2025 06:46:13 -0700 Subject: [PATCH 18/21] upgrade pnpm --- web/site/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/site/package.json b/web/site/package.json index 40e15f6d..bd80d8a3 100644 --- a/web/site/package.json +++ b/web/site/package.json @@ -50,5 +50,5 @@ "firebase-functions": "^4.9.0", "vuefire": "^3.1.24" }, - "packageManager": "pnpm@8.7.6+sha1.a428b12202bc4f23b17e6dffe730734dae5728e2" + "packageManager": "pnpm@10.10.0" } From a5894f7f1486d593e814083f8472034f689047ea Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Tue, 6 May 2025 09:27:18 -0700 Subject: [PATCH 19/21] Update spec --- web/site/public/connect/connect-spec.yaml | 107 +++++++++++++++++++++- 1 file changed, 104 insertions(+), 3 deletions(-) diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml index f601339e..efde17f1 100644 --- a/web/site/public/connect/connect-spec.yaml +++ b/web/site/public/connect/connect-spec.yaml @@ -226,6 +226,28 @@ paths: description: Not Authorized (missing affiliation) '404': description: Business not found + # Rajandeep please update this. + # /auth/api/v1/orgs/{account_id}/affiliations/search: + # tags: + # - Passcode / Magic link / Delegation prerequisites + # get: + # summary: Get affiliations for account (search endpoint, WIP) + # description: The Business Dashboard calls get affiliations via search for account. This will change in the near future to include pagination. Request Parameters and response likely to change. This is a WIP and is likely broken, it calls into NAMES and LEAR to build it's data. I wouldn't recommend using this route for now, use the /{account_id}/affiliations route instead. + # tags: + # - Affiliations + # responses: + # '200': + # description: Successful + # content: + # application/json: + # schema: + # $ref: '#/components/schemas/AffiliationSearchResponse' + # '401': + # description: Not Authorized + # '403': + # description: Not Authorized (missing affiliation) + # '404': + # description: Business not found /auth/api/v1/orgs/{account_id}/affiliations: parameters: - name: account_id @@ -236,12 +258,11 @@ paths: type: integer tags: - Passcode / Magic link / Delegation prerequisites - summary: Get entity authentication description: Get entity authentication to see if the entity has passcode or magic link email available. get: summary: Get affiliations for account - description: The Business Dashboard calls get affiliations for account. This will change in the near future to include pagination. Request Parameters and response likely to change. + description: This is an older version (doesn't call into Names / LEAR for business information like our search endpoint that is WIP) of the affiliation endpoint that should be working. tags: - Affiliations responses: @@ -250,7 +271,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AffiliationSearchResponse' + $ref: '#/components/schemas/AffiliationOrgResponse' '401': description: Not Authorized '403': @@ -1004,6 +1025,86 @@ components: type: bool description: Soft delete flag default: false + AffiliationOrgResponse: + type: object + properties: + entities: + type: array + items: + type: object + properties: + affiliations: + type: array + items: + type: object + properties: + id: + type: integer + created: + type: string + format: date-time + businessIdentifier: + type: string + contacts: + type: array + items: + type: object + properties: + email: + type: string + phone: + type: string + phoneExtension: + type: string + corpType: + type: object + properties: + code: + type: string + default: + type: boolean + desc: + type: string + corpSubType: + type: object + properties: + code: + type: string + default: + type: boolean + desc: + type: string + nullable: true + created: + type: string + format: date-time + createdBy: + type: string + nullable: true + modified: + type: string + format: date-time + modifiedBy: + type: string + nullable: true + lastModified: + type: string + format: date-time + nullable: true + name: + type: string + folioNumber: + type: string + nullable: true + nrNumber: + type: string + nullable: true + passCodeClaimed: + type: boolean + status: + type: string + nullable: true + additionalProperties: true AffiliationSearchResponse: type: object additionalProperties: true From 50dd4d2a27b9a17d9cc0530d95fc9b5bb5f30371 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Tue, 6 May 2025 12:32:58 -0700 Subject: [PATCH 20/21] fix typo --- web/site/public/connect/connect-spec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml index efde17f1..a52d6bc5 100644 --- a/web/site/public/connect/connect-spec.yaml +++ b/web/site/public/connect/connect-spec.yaml @@ -11,7 +11,7 @@ info: license: name: Apache 2.0 paths: - /auth/api/v1/orgs/affiliation/{business_identifer}: + /auth/api/v1/orgs/affiliation/{business_identifier}: parameters: - name: business_identifier in: path @@ -875,7 +875,7 @@ components: description: The ID of the organization sending the invitation toOrgUuid: type: string - description: The UUID of the organization receiving the invitation (may need to call /orgs/affiliation/{business_identifer}/ to get this info) + description: The UUID of the organization receiving the invitation (may need to call /orgs/affiliation/{business_identifier}/ to get this info) businessIdentifier: type: string description: The business identifier for the entity From 479a477b188326ef23cc75ca4d8717e7d1986a94 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 7 May 2025 09:11:56 -0700 Subject: [PATCH 21/21] Fix in the internal test --- web/site/public/connect/connect-spec.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/web/site/public/connect/connect-spec.yaml b/web/site/public/connect/connect-spec.yaml index a52d6bc5..d8da6fde 100644 --- a/web/site/public/connect/connect-spec.yaml +++ b/web/site/public/connect/connect-spec.yaml @@ -655,8 +655,6 @@ paths: - Affiliation Invitation (Magic Link / Delegation) summary: Authorize or refuse an affiliation invitation (Delegation only) servers: - - url: "https://test.api.connect.gov.bc.ca" - description: "Internal Test" - url: "https://sandbox.api.connect.gov.bc.ca" description: "Test" - url: "https://api.connect.gov.bc.ca"