Get Session Results

View as Markdown
Retrieve the decrypted portal records and results of the session. **Key Technical Details:** - **Concurrency Lock (504)**: Acquires an exclusive database lock on the session. If the lock cannot be acquired within a reasonable time, it returns `504 Gateway Timeout`. - **Rate Limit (429)**: Access is strictly limited to 1 request every 5 seconds per session to prevent abuse and reduce infrastructure load during heavy decryption and result compiling processes. - **Data Schema**: Returns the decrypted portal records inside the `data` field (conforming to `PublicGlobalPositionSchema`) and the list of successfully retrieved features inside `retrieved_features`. - **Consent Compliance**: Contains the structured consent audit trail in the `consent` field for compliance tracking. - **Result Finality (`is_closed`)**: Results are final only when the convenience field `is_closed` is `true`. While `is_closed` is `false`, the results are partial, not final, and subject to changes, modifications, deletions, or new records appearing as background processing continues. **Preconditions:** - **Session Started (412)**: The flow session must have been opened/started by the customer at least once (generating the `started` event). If the session has not started yet, the request is rejected with `412 Precondition Failed`. - **Attachment References**: If official documents (e.g. PDF reports) were retrieved, they are referenced as IDs within the results payload and must be downloaded via [Download Attachments](api:GET/attachments/{session_id}/{attachment_id}). > This endpoint needs to be executed with an app secret, so should always be used in server side without exposing the secret to customers.

Authentication

X-APP-SECRETstring
Application Secret

Path parameters

session_idstringRequiredformat: "ObjectId"
Session ID to fetch

Response

200 OK
State of the session

is_closedboolean
Indicates if the flow session has been finalized.
status_codeenum
The final execution status code of the session.
cursorenum
The last screen of the widget experience where the user interacted.
connectionsmap from strings to strings
A mapping of internal connection identifiers to the engine references executed.
consentobject
The structured consent audit trail and accepted document versions signed by the user.
retrieved_featureslist of enums
The list of features successfully extracted from the official portals during the session.
dataobject
The retrieved public administration records, conforming to the PublicGlobalPositionSchema.

Errors

404
Not Found Error
412
Precondition Failed Error
422
Unprocessable Entity Error
429
Too Many Requests Error
504
Gateway Timeout Error