API documentation.
Implementation guidance for authorised surveying software integrations. Start with the Developers overview for the commercial proposition.
Partner access is scoped and consented. Hosted applications require approval. This guide describes the implemented partner route, not unrestricted public API access.
Integration guide
- Register a developer application with its exact OAuth callback URL. Save the client secret when displayed. Local development applications may be activated; hosted integrations require approval.
- Configure a supported external AI provider key, workflow models and application drafting preferences in SurvBlaze. The provider key is distinct from the OAuth client secret.
- Connect each surveyor through OAuth authorisation code with PKCE S256. The surveyor signs in or registers with SurvBlaze and consents to the requested scopes.
- From your backend, link the surveyor’s partner case using a stable opaque external ID, reference and survey type or active service path.
- Submit
notes_summaryornotes_to_paragraphexchanges, handle the returned state, and retrieve the exchange if processing continues. - Keep professional review in your interface. Record exact accepted wording for report drafts when applicable, and provide the available PDF evidence exports.
Developer application registration will open with the Pilot Programme. Keep client secrets and provider keys server-side.
Authentication and scopes
Use GET /oauth/authorize for interactive sign-in and consent with the authorisation-code flow, PKCE S256 and a validated state parameter. Use POST /oauth/token from the confidential backend with HTTP Basic client authentication to exchange the code or rotate a refresh token. POST /oauth/revoke disconnects a grant.
Partner resource calls use a bearer access token. Tokens and provider keys must stay out of browser storage and frontend code. Access tokens are short-lived; the current implementation returns expires_in: 900 seconds and rotating refresh tokens.
| Scope | Purpose |
|---|---|
cases:link | Create or resolve a linked case |
exchanges:write | Submit governed exchanges |
exchanges:read | Retrieve exchange state and outcome |
exchanges:accept | Record accepted report wording |
privacy:review | Read and submit inline privacy decisions |
privacy:remember | Remember selected privacy allowances where permitted |
audit:exchange | Download exchange PDF |
audit:case | Download linked-case PDF |
The application accepts defined scope bundles, not arbitrary combinations. Request the smallest supported bundle for the integration. Each grant is bound to a SurvBlaze user and tenant, and case access is checked against the linked surveyor and client.
API operations
| Method and path | Purpose |
|---|---|
PUT /api/v1/case-links/{external_case_id} | Create or resolve a stable partner case. Body: reference and exactly one of survey_type or service_path_id. Returns case_id. |
POST /api/v1/cases/{case_id}/exchanges | Submit notes and mode with a UUID Idempotency-Key. Supported modes: notes_summary and notes_to_paragraph. Optional trigger applies only to Notes Summary. |
GET /api/v1/cases/{case_id}/exchanges/{exchange_id} | Retrieve state and available outcome fields. |
GET /api/v1/cases/{case_id}/exchanges/{exchange_id}/privacy-review | Read prepared text and selectable sensitive occurrences when review is required. |
POST /api/v1/cases/{case_id}/exchanges/{exchange_id}/privacy-review | Submit an explicit privacy decision and selected choices. |
POST /api/v1/cases/{case_id}/exchanges/{exchange_id}/acceptance | Record exact wording and base_sequence with a UUID idempotency key for a delivered draft. |
GET /api/v1/cases/{case_id}/exchanges/{exchange_id}/audit.pdf | Download a PDF for an exchange with recorded evidence. |
GET /api/v1/cases/{case_id}/audit.pdf | Download a linked-case PDF. |
PUT /api/v1/case-links/sample-case-001
Authorization: Bearer <access_token>
Content-Type: application/json
{
"reference": "Sample survey 001",
"survey_type": "Home Survey Level 2"
}{
"case_id": "11111111-1111-4111-8111-111111111111"
}The exchange response fields are exchange_id, mode and state, with audit_id, wording, notice, warnings and review_sequence when applicable. The overview page shows a fictional delivered example. Never treat omitted optional fields as empty evidence.
Notes Summary does not require acceptance. The Partner API does not currently expose the Workspace Improve wording workflow as a partner exchange mode.
Exchange states
processing Persist the exchange ID and poll the retrieval endpoint with backoff.
privacy_review Show proposed replacements and ask the surveyor for a decision before continuing.
needs_clarification Show the question; use a new governed submission for additional information.
delivered Present the returned working notes or draft. Report wording can be edited and explicitly accepted.
withheld Show the safe notice and do not silently bypass the decision.
failed Show the failure notice and allow an appropriate recovery path.
A successful HTTP response does not necessarily include wording. Requests may be stopped or interrupted before external AI processing.
Integration responsibilities
Your application remains responsible for its own login, case ownership checks, report editor, local report storage, secure token and key handling, and correct display of all returned states. Explain when SurvBlaze is active. Keep privacy review visible and obtain an explicit decision; do not infer approval. Keep AI-generated report wording editable and distinguish delivery from professional acceptance.
SurvBlaze handles the consented linked-case route, relevant governance controls, permitted provider dispatch and recorded evidence. Sensitive-identifier detection has limitations. AI output still requires professional review, and neither a delivered result nor an audit PDF certifies factual accuracy, professional approval or regulatory compliance. The complete partner report need not be submitted.
Recovery and errors
Persist an idempotency key before a mutation and replay the same key with the same body after a timeout. For processing, retrieve the exchange with backoff. Resolve 409 idempotency, case-link or review-sequence conflicts deliberately; do not silently create another exchange. Respect Retry-After on 429.
On 401, refresh or reconnect the surveyor. On 403, check scope and access coverage. Treat 404 as unavailable without revealing inaccessible case details. Retain the X-Request-ID for support. Do not log tokens, provider keys or raw case notes.
Discuss a partner integration
Tell us about your product, supported surveying workflow and intended integration.
Discuss an integration