Tax and Revenue Connect API

Reference for the Data 360 endpoint used by the self-service Taxpayer Portal to retrieve a taxpayer's own records from the Tax and Revenue data model objects.

Endpoint

The taxpayer portal queries Data 360 by using this REST endpoint:

1POST /services/data/vXX.0/ssot/query-sql

This endpoint accepts a SOQL-like SQL query against Data 360 DMOs and returns the matching records. For general reference, see Query Data in Data 360.

Authentication and Authorization

Requests to the endpoint are made on behalf of the authenticated portal user. These conditions must all be true for a taxpayer query to succeed:

Layer Requirement
1 User has AccessPubSecTaxRevenueExternal permission.
2 The portal-user query gate is open for your org.
3 Sensitive fields are blocked by the API field denylist (hard-coded; always active).
4 The user's permission set is mapped to the Tax and Revenue Data Space (dataspace scope).
5 A WHERE clause scopes the query to the resolved taxpayer identity.
6 A data governance policy at the Authenticated external user level explicitly allows access to the queried DMOs.

Row Isolation

The portal enforces row-level isolation so each taxpayer can retrieve only their own records. This isolation is implemented through a WHERE clause injected by the Connect API, it isn't enforced by the user's permission set. Escalating a portal user's permissions doesn't grant access to other taxpayers' data.

The resolution path that the API uses is:

  • ContactId from the authenticated session
  • CRM-synced Account
  • AccountIdentityLink → UnifiedRecordId
  • All source party IDs linked to that Unified profile
  • TaxAccountDmo WHERE AccountId IN (...) → child records

If Identity Resolution hasn't yet run for a newly registered taxpayer, the AccountIdentityLink join returns no rows, and the query correctly returns an empty result not an error.

DMO API Name Format

The DMO API names that you use in SQL queries depend on which data space your org uses.

Data Space DMO API Name Pattern Example
Default _std__dlm TaxFiling_std__dlm
Non-default (dedicated) __std__dlm ds1_TaxFiling_std__dlm

Use the Data Space prefix consistently across all DMO names in a query—mixing prefixed and unprefixed names in the same query isn't supported.

Field Access Restrictions

Two separate mechanisms restrict which fields portal users can retrieve.

  • Hard-coded API field denylist: The Connect API always blocks known-sensitive fields for portal users. This denylist is shipped with the platform and is always active.
  • Admin-configured data governance policies: Admins create DENY and MASK policies at the Authenticated external user authorization level. See Data Governance Policies for Tax Data

Example Query

This example retrieves all tax filings linked to the authenticated taxpayer in a default Data Space.

1POST /services/data/v62.0/ssot/query-sql
2Content-Type: application/json
3{
4 "sql": "SELECT f.Id, f.FilingStatus, f.FilingDate, f.TaxableIncome
5         FROM TaxFiling_std__dlm f
6         JOIN TaxFilingTaxAccount_std__dlm fta ON fta.TaxFilingId = f.Id
7         JOIN TaxAccount_std__dlm ta ON ta.Id = fta.TaxAccountId
8         WHERE ta.AccountId IN (
9           SELECT ail.SourceRecordId
10           FROM UnifiedAccountLink_std__dlm ail
11           WHERE ail.UnifiedRecordId = (
12             SELECT ail2.UnifiedRecordId
13             FROM UnifiedAccountLink_std__dlm ail2
14             WHERE ail2.SourceRecordId = :accountId
15             LIMIT 1
16           )
17         )"
18}