{"openapi":"3.1.0","info":{"title":"Canada Business Number Tools API","version":"0.1.0","description":"Works with the Canada Revenue Agency Business Number (BN): a 9-digit number, and the 15-character program account number built from it (BN9 + a 2-letter program identifier such as RT for GST/HST or RP for payroll + a 4-digit reference number). It splits and re-formats the number, checks its SHAPE only (no check-digit algorithm is published in the sources read, so it never says a number is genuine...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://ca-bn-validator.connectorbay.com/mcp.\n\nDisclaimer: General information only, not legal, tax, accounting or payment advice. Canada Business Number Tools is an independent tool: it is not affiliated with, endorsed by or operated by any government body, central bank, standards body or scheme operator. Rates, thresholds and rules change; check the cited official source and confirm with a qualified professional before you rely on a result.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/ca-bn-validator/docs"},"termsOfService":"https://connectorbay.com/ca-bn-validator/terms"},"servers":[{"url":"https://ca-bn-validator.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/ca-bn-validator/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/parse_bn":{"post":{"operationId":"parse_bn","summary":"Split a 15-character program account number (BN15) or a 9-digit BN into business number, program code and reference numb","description":"Split a 15-character program account number (BN15) or a 9-digit BN into business number, program code and reference number, with the program name. Use for \"Split 123456789 RP 0001 into the business number, program code and reference number.\". Shape only, no checksum.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bn":{"description":"A BN9 (9 digits) or BN15 (9 digits, 2-letter program code, 4-digit reference number), with or without spaces or a single hyphen between the groups","title":"Bn","type":"string"}},"required":["bn"],"title":"parse_bnArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/format_bn":{"post":{"operationId":"format_bn","summary":"Rewrite a BN9 or BN15 in the usual '123456789 RT 0001' layout (or compact '123456789RT0001'), upper-casing the program c","description":"Rewrite a BN9 or BN15 in the usual '123456789 RT 0001' layout (or compact '123456789RT0001'), upper-casing the program code. Use for \"Write 123456789rt0001 the standard way with spaces.\". A pure formatting step: it does not say whether the number exists.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bn":{"description":"A BN9 (9 digits) or BN15 (9 digits, 2-letter program code, 4-digit reference number), with or without spaces or a single hyphen between the groups","title":"Bn","type":"string"},"style":{"default":"spaced","description":"'spaced' (default, 123456789 RT 0001) or 'compact' (123456789RT0001)","title":"Style","type":"string"}},"required":["bn"],"title":"format_bnArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/validate_bn_shape":{"post":{"operationId":"validate_bn_shape","summary":"Check that a value has the shape of a BN9 or BN15 (9 digits, 2-letter program code, 4-digit reference), listing each che","description":"Check that a value has the shape of a BN9 or BN15 (9 digits, 2-letter program code, 4-digit reference), listing each check; shape only, never a claim that the number is genuine or registered. Use for \"Is 123456789RT0001 a correctly shaped GST/HST account number?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bn":{"description":"The value to check, at most 40 characters","title":"Bn","type":"string"}},"required":["bn"],"title":"validate_bn_shapeArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/explain_program_code":{"post":{"operationId":"explain_program_code","summary":"Meaning of a CRA program identifier (RT, RP, RC, RZ, RR, RG, RD, RE, RM, RN, LT, RU, PT) with the CRA wording of who nee","description":"Meaning of a CRA program identifier (RT, RP, RC, RZ, RR, RG, RD, RE, RM, RN, LT, RU, PT) with the CRA wording of who needs it; without a code, list all 13. Use for \"What does the RP in 123456789 RP 0001 mean?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter program identifier, for example RT; leave out to list every code on the CRA page","title":"Code"}},"title":"explain_program_codeArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/accounts_needed":{"post":{"operationId":"accounts_needed","summary":"List the CRA program accounts that the CRA page ties to each activity you say applies (collects GST/HST, pays employment","description":"List the CRA program accounts that the CRA page ties to each activity you say applies (collects GST/HST, pays employment amounts, is incorporated, files information returns, is a charity or non-profit, imports or exports); unanswered activities are reported, not guessed. Use for \"We are an incorporated company with two employees selling products online: which CRA program accounts does CRA associate with that?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"collects_gst_hst":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True if the business needs to collect GST/HST (for example sells goods or services); leave out if unknown","title":"Collects Gst Hst"},"pays_employment_amounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True if the business is an employer, trustee or other payer of amounts related to employment; leave out if unknown","title":"Pays Employment Amounts"},"is_incorporated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True if the business is incorporated; leave out if unknown","title":"Is Incorporated"},"files_information_returns":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True if the business files information returns such as T5018, T5, T5013 or TFSA returns; leave out if unknown","title":"Files Information Returns"},"is_charity_or_non_profit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True if the business is a charity or non-profit organization; leave out if unknown","title":"Is Charity Or Non Profit"},"imports_or_exports":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True if the business imports or exports goods; leave out if unknown","title":"Imports Or Exports"}},"title":"accounts_neededArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/mask_bn":{"post":{"operationId":"mask_bn","summary":"Mask a BN9 or BN15 for logs and chat, keeping only the last few digits of the business number and the program code and r","description":"Mask a BN9 or BN15 for logs and chat, keeping only the last few digits of the business number and the program code and reference. Use for \"Mask 123456789 RT 0001 for a support ticket.\". A display helper: it does not check the number is genuine.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bn":{"description":"A BN9 (9 digits) or BN15 (9 digits, 2-letter program code, 4-digit reference number), with or without spaces or a single hyphen between the groups","title":"Bn","type":"string"},"visible_digits":{"default":3,"description":"How many trailing digits of the 9-digit business number stay visible, 0 to 4 (default 3)","title":"Visible Digits","type":"integer"}},"required":["bn"],"title":"mask_bnArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/gst_hst_check_steps":{"post":{"operationId":"gst_hst_check_steps","summary":"How CRA says a supplier's GST/HST account number is confirmed on its web form (which digits, what else to enter, QST els","description":"How CRA says a supplier's GST/HST account number is confirmed on its web form (which digits, what else to enter, QST elsewhere); a manual form, nothing is looked up here. Use for \"How do I confirm my supplier's GST/HST number and which digits do I enter?\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"bn":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Optional supplier account number (BN15 or BN9): the tool returns the first nine digits CRA says to enter","title":"Bn"}},"title":"gst_hst_check_stepsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}