You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AUTH API - review endpoints and make any required changes to present the table of affiliations #33327
Existing endpoints:
GET /api/v1/entities/{businessIdentifier}/authorizations
GET /api/v1/entities/{businessIdentifier} - (current business info like name , email, phone)
New Add:
GET /api/v1/entities/{businessIdentifier}/authorized-accounts
return: {name, uuid, dateAdded}
A note from review:
existing but not used, list here to avoid confusing: GET /api/v1/orgs/affiliation/{businessIdentifier} :
it serves a different workflow — the business-ui ManageBusiness.vue “Request authorization from an account managing this business” dropdown.
By definition, its callers are users who don’t have authorization yet, and it intentionally returns empty when the business hasn’t been loaded into LEAR. The semantics are the opposite, so we can’t reuse it. GET /api/v1/orgs/{orgId}/affiliations
The direction is reversed — it looks up businesses by account, and it’s used for the My Business Registry list.
Ticket: AUTH API - review endpoints and make any required changes to present the table of affiliations Environment: TEST Date: August 20, 2026 Tested by: QA Team Status: ✅ Verified
Endpoints Under Test
Endpoint
Type
Purpose
GET /api/v1/entities/{businessIdentifier}
Existing
Business info including embedded affiliations
GET /api/v1/entities/{businessIdentifier}/authorizations
Existing
Current user's roles/permissions for a business
GET /api/v1/entities/{businessIdentifier}/authorized-accounts
NEW
List of all accounts authorized to manage a business
Step 1 — Find Test Businesses
Used the existing affiliations endpoint to find businesses linked to account 2198:
Request:
GET https://test.api.connect.gov.bc.ca/auth/api/v1/orgs/2198/affiliations
Authorization: Bearer <staff_token>
x-apikey: ***masked-api-key***
✅ Existing endpoint working — returns current user's permission roles for this business.
✅ Note: This endpoint returns who can do what (user roles), not which accounts manage the business.
Step 4 — Test NEW Endpoint: GET /entities/{id}/authorized-accounts (Business 1)
Request:
GET https://test.api.connect.gov.bc.ca/auth/api/v1/entities/BC1199869/authorized-accounts
Authorization: Bearer <staff_token>
x-apikey: ***masked-api-key***
✅ New endpoint working — returns clean list of authorized accounts.
✅ Returns required fields: name, uuid, dateAdded as specified in ticket.
✅ Additional fields present: branchName, isBusinessAccount.
Step 5 — Cross Verify Data Consistency (Business 1)
Compared data between GET /entities/BC1199869 and GET /entities/BC1199869/authorized-accounts:
Account
UUID (from /entities)
UUID (from /authorized-accounts)
Match
Ody Test 1
66af3072-d294-4609-8684-9d8c7e11a433
66af3072-d294-4609-8684-9d8c7e11a433
✅
Test Acc 18.1
82e6387c-c6d9-428d-a27b-4fcf2fc8827b
82e6387c-c6d9-428d-a27b-4fcf2fc8827b
✅
Account
dateAdded (from /entities created)
dateAdded (from /authorized-accounts)
Match
Ody Test 1
2026-01-28T02:51:01+00:00
2026-01-28T02:51:01+00:00
✅
Test Acc 18.1
2025-07-09T22:12:46+00:00
2025-07-09T22:12:46+00:00
✅
✅ Data fully consistent between existing and new endpoints.
Step 6 — Test NEW Endpoint: GET /entities/{id}/authorized-accounts (Business 2)
Verified the endpoint works for a second business to confirm it's not hardcoded.
Request:
GET https://test.api.connect.gov.bc.ca/auth/api/v1/entities/BC0879688/authorized-accounts
Authorization: Bearer <staff_token>
x-apikey: ***masked-api-key***
✅ Endpoint works for multiple businesses.
✅ branchName field returns actual value "6456" when present.
✅ Ody Test 1 (uuid: 66af3072) correctly appears in both businesses — confirms one account can manage multiple businesses.
Test Results Summary
Test
Endpoint
Business
Result
Existing business info
GET /entities/BC1199869
BC1199869
✅
Existing authorizations
GET /entities/BC1199869/authorizations
BC1199869
✅
NEW authorized accounts
GET /entities/BC1199869/authorized-accounts
BC1199869
✅
NEW authorized accounts
GET /entities/BC0879688/authorized-accounts
BC0879688
✅
Data consistency check
Cross-verify UUIDs and dates
BC1199869
✅
Response Fields Verification
Field
Required per Ticket
Present in Response
Correct
name
✅ Yes
✅ Yes
✅
uuid
✅ Yes
✅ Yes
✅
dateAdded
✅ Yes
✅ Yes
✅
branchName
Not specified
✅ Present (bonus)
✅
isBusinessAccount
Not specified
✅ Present (bonus)
✅
Observations
branchName can be null, "" (empty string) or an actual value like "6456" — three different states observed across test data.
isBusinessAccount is always false in current test data — worth confirming if there are business account types to test against.
Data is consistent — UUIDs and dateAdded values match exactly between the existing /entities endpoint and the new /authorized-accounts endpoint.
One account, multiple businesses — Ody Test 1 (uuid: 66af3072) correctly appears as an authorized account for both BC1199869 and BC0879688.
Activity
JohnamLane commentedon May 5, 2026
Hey team! Please add your planning poker estimate with Zenhub @Jxio @ochiu @sumesh85
Jxio commentedon Aug 12, 2026
Existing endpoints:
GET /api/v1/entities/{businessIdentifier}/authorizations
GET /api/v1/entities/{businessIdentifier} - (current business info like name , email, phone)
New Add:
GET /api/v1/entities/{businessIdentifier}/authorized-accounts
return: {name, uuid, dateAdded}
A note from review:
existing but not used, list here to avoid confusing:
GET /api/v1/orgs/affiliation/{businessIdentifier} :
it serves a different workflow — the business-ui ManageBusiness.vue “Request authorization from an account managing this business” dropdown.
By definition, its callers are users who don’t have authorization yet, and it intentionally returns empty when the business hasn’t been loaded into LEAR. The semantics are the opposite, so we can’t reuse it.
GET /api/v1/orgs/{orgId}/affiliations
The direction is reversed — it looks up businesses by account, and it’s used for the My Business Registry list.
anisshhbatrra commentedon Aug 20, 2026
Tested in Test .working as expected
Tested in Test .
AUTH API — Authorized Accounts Endpoint
QA Verification Report
Ticket: AUTH API - review endpoints and make any required changes to present the table of affiliations
Environment: TEST
Date: August 20, 2026
Tested by: QA Team
Status: ✅ Verified
Endpoints Under Test
GET /api/v1/entities/{businessIdentifier}GET /api/v1/entities/{businessIdentifier}/authorizationsGET /api/v1/entities/{businessIdentifier}/authorized-accountsStep 1 — Find Test Businesses
Used the existing affiliations endpoint to find businesses linked to account 2198:
Request:
Response:
{ "entities": [ { "businessIdentifier": "BC1199869", "name": "1199869 B.C. LTD." }, { "businessIdentifier": "BC0879688", "name": "ARGUS BENEFITS INC." } ] }✅ Found 2 businesses to use for testing.
Step 2 — Test Existing Endpoint: GET /entities/{id}
Verified the existing business info endpoint returns affiliations embedded in the response.
Request:
Response:
{ "affiliations": [ { "created": "2025-07-09T22:12:46+00:00", "id": 35370, "organization": { "name": "Test Acc 18.1", "uuid": "82e6387c-c6d9-428d-a27b-4fcf2fc8827b" } }, { "created": "2026-01-28T02:51:01+00:00", "id": 41405, "organization": { "branchName": "", "name": "Ody Test 1", "uuid": "66af3072-d294-4609-8684-9d8c7e11a433" } } ], "businessIdentifier": "BC1199869", "contacts": [ { "email": "ketaki.deodhar@gov.bc.ca", "phone": "(123) 456-7890", "phoneExtension": "" } ], "corpType": { "code": "BC", "desc": "BC Companies" }, "name": "1199869 B.C. LTD.", "passCodeClaimed": true, "isLoadedLear": true }✅ Existing endpoint working — returns business info with affiliations embedded.
✅ Used as baseline to cross-verify new endpoint data.
Step 3 — Test Existing Endpoint: GET /entities/{id}/authorizations
Verified the existing authorizations endpoint returns current user's roles.
Request:
Response (truncated):
{ "roles": [ "manage_business", "staff", "edit", "view", "admin_edit", "admin_view", "view_accounts", "..." ] }✅ Existing endpoint working — returns current user's permission roles for this business.
✅ Note: This endpoint returns who can do what (user roles), not which accounts manage the business.
Step 4 — Test NEW Endpoint: GET /entities/{id}/authorized-accounts (Business 1)
Request:
Response:
{ "authorizedAccounts": [ { "branchName": "", "dateAdded": "2026-01-28T02:51:01+00:00", "isBusinessAccount": false, "name": "Ody Test 1", "uuid": "66af3072-d294-4609-8684-9d8c7e11a433" }, { "branchName": null, "dateAdded": "2025-07-09T22:12:46+00:00", "isBusinessAccount": false, "name": "Test Acc 18.1", "uuid": "82e6387c-c6d9-428d-a27b-4fcf2fc8827b" } ] }✅ New endpoint working — returns clean list of authorized accounts.
✅ Returns required fields:
name,uuid,dateAddedas specified in ticket.✅ Additional fields present:
branchName,isBusinessAccount.Step 5 — Cross Verify Data Consistency (Business 1)
Compared data between
GET /entities/BC1199869andGET /entities/BC1199869/authorized-accounts:✅ Data fully consistent between existing and new endpoints.
Step 6 — Test NEW Endpoint: GET /entities/{id}/authorized-accounts (Business 2)
Verified the endpoint works for a second business to confirm it's not hardcoded.
Request:
Response:
{ "authorizedAccounts": [ { "branchName": "6456", "dateAdded": "2023-03-01T21:33:46+00:00", "isBusinessAccount": false, "name": "AUTH/PAY Performance Testing", "uuid": "46be519b-bccb-4734-837b-bca030890ceb" }, { "branchName": "", "dateAdded": "2025-05-12T17:58:25+00:00", "isBusinessAccount": false, "name": "Ody Test 1", "uuid": "66af3072-d294-4609-8684-9d8c7e11a433" } ] }✅ Endpoint works for multiple businesses.
✅
branchNamefield returns actual value"6456"when present.✅
Ody Test 1(uuid: 66af3072) correctly appears in both businesses — confirms one account can manage multiple businesses.Test Results Summary
Response Fields Verification
nameuuiddateAddedbranchNameisBusinessAccountObservations
branchNamecan benull,""(empty string) or an actual value like"6456"— three different states observed across test data.isBusinessAccountis alwaysfalsein current test data — worth confirming if there are business account types to test against.dateAddedvalues match exactly between the existing/entitiesendpoint and the new/authorized-accountsendpoint.Ody Test 1(uuid: 66af3072) correctly appears as an authorized account for both BC1199869 and BC0879688.