Skip to navigation

Data models

What a Spain Public Administration session returns, field by field
View as Markdown

A Spain Public Administration session reads what the administrations hold about your customer, and what it returns is their public position: the customer profile and one family per source you asked for — Social Security, the Banco de España, the DGT, the tax agency, the Cadastre, the education registries. A family you did not ask for is absent. These pages lay each model out flat, field by field, rendered from the live API specification.

Where the data arrives

The same models reach you by two routes:

  • Get Session Results — whenever you ask, behind your application secret.
  • The webhooks — es-public-administration:ended when the session ends, and es-public-administration:partial with what has arrived so far if your customer leaves while a source is still answering. Both are encrypted with the session’s aes_key; without one, they carry no data and tell you to fetch it. Webhooks has the details.

The public position

customerobjectOptional
Customer family
academicobjectOptional
Academic family
driverobjectOptional

Driver & vehicles family

employmentobjectOptional
Employment family
taxobjectOptional
Tax family
propertiesobjectOptional
Properties family
creditobjectOptional
Credit registry family

The session envelope

The position travels as data inside the session results — the same object the partial and ended webhooks deliver — beside the consent your customer gave and the messages the session raised:

is_closedbooleanRequired
Indicates if the flow session has been finalized.
status_codeenumRequired
The final execution status code of the session.
cursorenumRequired
The last screen of the widget experience where the user interacted.
connectionsmap from strings to stringsRequired
A mapping of internal connection identifiers to the engine references executed.
consentobjectOptional
The structured consent audit trail and accepted document versions signed by the user.
retrieved_featureslist of enumsOptional
The list of features successfully extracted from the official portals during the session.
dataobjectOptional
The retrieved public administration records, conforming to the PublicGlobalPositionSchema.
messageslist of objectsOptionalDefaults to []

What the session has to say about itself and about the data it read, oldest first.

Most sessions say nothing and the list is empty. When it is not, each entry is a situation that was detected while the session ran: an error or a warning about a read, an info note, or a flag — the type raised for you. A flag never means something of ours failed; it means the session found something worth a decision on your side, and location points at the part of this document it is about.

A situation is reported ONCE however many times it occurred, so this list is a set of facts and not a log: automate on message_id, which is stable, and treat message as text for a person.