Authentication and scopes
Send a JWT from the PVC identity provider: Authorization: Bearer <token>, audience pvc-connect-integrations.
How the token is checked is described in Security.
| Scope | Endpoints |
|---|---|
tax:estimate | POST /api/v1/tax/estimates |
tax:write | POST /api/v1/tax/documents · POST .../{id}/void · POST .../{id}/credits · POST .../{id}/recalculate |
tax:commit | POST /api/v1/tax/documents/{id}/commit |
tax:read | GET /api/v1/tax/documents/{id} · GET /api/v1/tax/documents?entityId&sourceSystem&sourceDocumentId |
addresses:validate | POST /api/v1/addresses/validate |
parties:write | PUT /api/v1/entities/{entityId}/customers/{code} · PUT .../vendors/{code} |
parties:read | GET .../customers/{code} · GET .../vendors/{code} (also allowed with parties:write, and with certs:read until callers move over) |
certs:read | GET .../customers/{code}/certificates · GET .../vendors/{code}/certificates · GET .../certificates/{id}/document · GET .../resale-certificates/outstanding |
certs:write | POST .../customers/{code}/certificate-invites · POST /api/v1/certificate-requests/resale · POST /api/v1/certificate-requests/{id}/cancel |
fx:read / fx:lock | GET /api/v1/fx/rates · POST /api/v1/fx/convert · GET /api/v1/fx/locks/{id} / POST /api/v1/fx/locks |
fx:import | POST /api/v1/fx/import |
reports:read | GET /api/v1/reports/sales-tax · .../by-jurisdiction · .../vendor-tax · .../reconciliation-issues |
reports:resolve | POST /api/v1/reports/reconciliation-issues/{id}/resolve |
jobs:run | GET /api/v1/admin/jobs · POST /api/v1/admin/jobs/{name}/run |
integrations:admin | /api/v1/admin/entities... · /api/v1/admin/tax-code-mappings... (and every scope above) |
entities:all | Not an operation: lifts the per-entity restriction |
Entity access is separate from scopes. A caller acts only on the entities in its entity claims (space or comma
separated, exact match) unless it holds entities:all. integrations:admin does not imply entities:all: an admin
token without entity claims can configure entities and mappings but cannot read or change their documents.
Scopes are read from scope / scp claims and from roles (Entra ID app-only tokens carry application permissions
there). The caller recorded in audit columns is the first of azp, client_id, cid, appid, sub.
The scope of every endpoint is checked by a test that calls each endpoint without its scope (403) and with only its scope (not 403), reading the scopes from the endpoints themselves.
Local development token (Development accepts the HS256 tokens dotnet user-jwts issues; other environments accept
only RS, PS and ES signatures):
dotnet user-jwts create --project src/Integrations.Api --audience pvc-connect-integrations \
--scope "integrations:admin entities:all"