Skip to navigation

Labor check

View as Markdown

Your customer’s working life with the Spanish Social Security (TGSS).

Who they have worked for and when, what they have contributed month by month, and what that means today: whether they are currently employed, under which régimes, and a guaranteed minimum net income floor derived from their contribution bases. It is the strongest employment and income signal available without a payslip. Field by field in Labor Check.

The official reports travel with it. The TGSS documents the figures were read from are kept with the execution and listed in the documents — the evidence, next to the data.

Requires the labor_check feature

Features are chosen when the execution starts, not here. An execution that did not ask for labor_check answers 204, and the only way to get the data is to run another one.

StatusMeaning
200The labor check.
202feature_not_ready — labor_check is still running. Only this family waits: the ones that already closed answer now.
204The execution never asked for labor_check, or it did and the source had nothing to give. No body either way.
404No execution with that id for your application, or it has been deleted.

Server to server only. This call is authorised with your application secret: it belongs in your backend, never in a browser, a mobile app or anything your customer can read.

Authentication

X-APP-SECRETstring
Application Secret

Path parameters

execution_idstringRequiredformat: "object-id"
The execution, as the acceptance response returned it.

Response

200 OK
Who your customer has worked for and when, what they have contributed month by month, the minimum net income their bases support, and the work statuses they hold today. The official report the figures come from is in attachments.

product"social_security"

The product type identifier. Always social_security for this product.

sub_family"social_security:spain_labor_check"

The sub-family identifier: social_security:spain_labor_check, the Spanish Social Security (TGSS) labor life check.

fetch_datestringformat: "datetime"
Date this product was fetched.
work_relations_historylist of objects

Work relation history: ongoing relations first, then the finished ones from the most recently ended backwards — including situations assimilated to registration such as benefit periods.

contribution_base_historylist of objectsRead-onlyDeprecated

Flat monthly contribution-base history, most recent first. Months only — company attribution lives in contribution_base_by_company, which groups these same months per employer account.

holder_namestringOptional

The holder’s full name, as printed on the official Social Security reports (the PDFs). ⚠️ When it is not reported, review this product carefully before you rely on it: the two reports print different names for the same holder, or no report could be used.

identifierobjectOptional

The holder’s identity document (DNI or NIE), as printed on the official reports; when both are read, they must agree on it. Not reported when no report could be used (not available, not readable, or disagreeing on the identity numbers). When the labor check is retrieved by connecting to the Social Security, both reports are read whether or not you ask for them as attachments, and without a usable one the rest of the data may come from its web pages instead.

currently_activebooleanOptional

True when the person is actually WORKING right now: at least one entry in current_work_types is real work (employee, self_employed or public_employee). Receiving an unemployment benefit is not active employment. Neither is a hire scheduled for a future date: Social Security reports such a person as registered (“alta programada”), but this field stays false until the job actually starts. false means the person’s current situation is known and includes no active job; null means the work history could not be recovered, so nothing is claimed either way. The value is deliberately cautious — it is designed for risk decisions — so only clearly identified work counts: in the rare case where an ongoing relation cannot be classified you get false plus a current_work_type_unknown warning, never an optimistic true.

current_work_typeslist of enumsOptional

The person’s current work statuses: one entry per ongoing relation, so repeated values reveal simultaneous jobs (two employee entries = two concurrent employments). An ongoing benefit shows as unemployment_benefits. An empty list means nothing ongoing — no job and no benefit.

social_security_daysintegerOptional

Total days effectively counted by Social Security over the whole career. Simultaneous employments are counted once, so this is NOT the sum of the per-relation day counts.

contribution_base_by_companylist of objectsOptionalDefaults to []

Contribution-base history grouped per employer account, most recent first. Join each group to its work relation through the ccc code.

income_floorobjectOptional

Guaranteed minimum NET income derived from the certified contribution bases (the certified gross lower bound travels alongside it). A floor for risk assessment, never a salary estimate.

attachmentslist of objectsOptionalDefaults to []

List of attached supporting documents (e.g. the original TGSS PDF reports this product was extracted from).

Errors

404
Not Found Error
422
Unprocessable Entity Error