On Partial Results (Experience Closed)
Triggered when the user is done and the widget closes, but one or more sources are still working. Some administrations do not answer in real time — the CIRBE report from the Banco de España is the usual case — so the session keeps running in the background instead of holding your user in front of a spinner.
This event hands you everything retrieved so far.
The payload of this event always carries is_closed: false at the top, with an aes_key or without one — that field is how you tell partial from final, wherever you read it. Sources that had not answered yet are simply absent from the data: not empty, not null — absent.
The session is still open. Do not treat this as the outcome of the verification and do not close the case on it.
The complete data arrives afterwards in On Flow Ended, whose payload carries is_closed: true. That is the only event that means the session is finished.
The payload
It is the same schema as the end event — FlowResultsSchema — so you parse it with the same code you already wrote. The only difference is what is in it: the sources that finished, and nothing else.
What data carries, and what actually travels
The schema below describes data decrypted — on purpose, so this reference has a model you can read and code against. What arrives at your endpoint depends on how the session was created:
- With an
aes_key:datais a single string,aes::Base64(IV + Ciphertext + Tag). Decrypt it and you get exactly the object documented below. The walkthrough and the code are in Payload Encryption. - Without an
aes_key:datais not in the body at all — absent, notnull. Somebody’s records are never put on the wire unencrypted, so the event tells you what happened and you read the content from Get Session Results when it arrives.
What it is for
Use it to move early: show your user what you already have, or start the work that does not depend on the slow source. Then wait for es-public-administration:ended before treating the verification as complete.
You receive this event once per session, even though the flow may move in and out of the waiting state several times while the remaining sources finish.
As with every webhook, make your endpoint idempotent: a network-level retry must never create the record twice on your side.
messages: what the session found, beside what it read. The payload carries a messages list — situations the session detected while it ran; most sessions carry none. The one to route is flag: it never means something failed on our side, it means the session found something about the person or the data that deserves a decision on yours. location is a loc list (["data", "customer", "profile"]) pointing at the part of this document the message is about, and message_id is the stable name of the situation — automate on that, never on the wording.
Expand messages in the response explorer to see the object, and Get Session Results for what each type means and what to do with them.
Answer 2xx as soon as the payload reaches you, whatever your processing does with it afterwards: any other status is recorded as a failed delivery even though the event arrived. Answering a delivery has the handler to copy.
Payload
Payload class discriminator — always this value for Spain Public Administration events.
The event type: partial.
Always false: the experience is over and the sources are still working, so the results are
partial — whether data travels or not. ended brings them complete.
Partial results: everything retrieved at the moment the user closed the experience.
- It is the same payload as the
endedevent,FlowResultsSchema, with the sources that had not answered yet simply absent. Parse it with the same code; do not expect every field to be present. - Documented decrypted, delivered encrypted. With an
aes_keyon the session this field is theaes::Base64(IV + Ciphertext + Tag)string of the object described here; without one it is not in the body at all, and the partial results are read from the session results endpoint instead. - This is not the end of the session. The pending sources keep working and the complete
results arrive later, in
ended. Treat this as an early view, not as a final answer, and do not close the case on it.