Procountor
Complete Procountor onboarding from your client backend.
Preview · What this means for your integration
Your customer selects the company in Procountor. Your backend sends the unused authorization code and callback URL. Zwapgrid exchanges the code and manages token refresh.
First, complete the shared prerequisites and example setup.
What you need
Your own Procountor application and access to a supported company in Sweden, Denmark or Finland. See the Procountor setup guide.
A Published Procountor System Setting containing that application's client ID and secret, belonging to your Zwapgrid client.
A backend callback registered for that application, without a query string. Procountor registers one callback per application: use a separate application if your existing one is used for guided onboarding.
Confirmation from Zwapgrid of which Procountor host to use:
https://pts-api.procountor.comfor test orhttps://api.procountor.comfor live. Authorization, code exchange and refresh must use the same host.
OAuth scopes
This Procountor authorization request does not send a scope parameter.
1. Prepare the connection
Use the Consent created in the shared workflow. Make sure
systemsSettings.procountorcontains your published setting ID.Start authorization at the selected provider host's
/loginroute withresponse_type=code, yourclient_id, registeredredirect_uriand random, expiring session/Consent-boundstate.The customer logs in, selects the company and approves access in Procountor. Validate callback state on your backend; do not exchange the returned code.
Submit the unused code and exact redirect URI promptly, within its five-minute lifetime. Zwapgrid exchanges it and verifies company access and a supported company country (SE, DK or FI). No additional company selection is needed.
This flow requires a user who can sign in and select a company. Procountor API-login-only users need its separate machine-to-machine (M2M) flow. See Procountor authentication.
2. Send the request
Both fields are required, at most 2048 characters each. Redirects must be HTTPS (HTTP loopback is accepted locally), with no query, fragment or user information. Do not send tokens, tenant/company/environment fields or a PKCE verifier.
Replace the placeholders and save this body as a protected connection.json on your backend. Set the example variables, including a new UUID in CORRELATION_ID, then send the request once:
3. Check the result
Expect HTTP 201 with source: procountor and state: completed. Optionally verify the connection. Zwapgrid uses the selected application for token refresh.
Submit once. A GET 404 does not mean the code is safe to reuse. If you cannot confirm the result, authorize again; never automatically replay the code.
Last updated
Was this helpful?
