Query bank details
To test without real effects, send the X-Saltra-Mode: test header: nothing is sent to the authority and the response carries sample data. In production, without the header, the request is real. Details in Environments and test mode.
Returns the bank details TGSS has on record for a contribution account (Sistema RED SLD service «Comunicación de datos bancarios») and the holder of each account: the credit balance account and the direct debit account. Read-only: nothing is changed. To change them, use Report bank details.
Parameters
- regimen (integer) : Scheme, 4 digits. Possible values:
- 0111: General Scheme
- Table of scheme codes
- ccc (integer) : Contribution account code, 11 digits.
- authorized_num optional (integer) : RED authorised number. Mandatory when the certificate has more than one RED authorisation; if you don’t know it, send the request without it and read
data.authorized_listfrom the 422 response. Then send it again.
GET /datos-bancarios
{
"regimen": "0111",
"ccc": "28123456789"
}OK response
- saldo_acreedor / cargo_en_cuenta (object or null) : Each account, normalised.
nullif the contribution account has none on record; at least one of them is always present (if it has neither, the response is a 404).- iban (string) : Full IBAN (24 characters).
- pais_dc, entidad, sucursal, dc, cuenta (string) : The IBAN parts (country + check digits, bank, branch, check digits, account number).
- titular (object) : Account holder.
- tipo (string) : Document type (1 DNI, 2 Passport, 3 EU Resident Card, 4 Residence and Work Permit, 6 NIE, 9 No document / company NIF, L, M, T).
- identificacion (string) : Holder’s document, as returned by TGSS.
- nombre (string) : Holder’s name or company name.
- datos_bancarios (object) : The full TGSS screen, with its original field names (authorised party and company names, the
CrtrTbSaldoAcreedorandCrtrTbCargoEnCuentatables,S/Nflags…).
Respuesta
{
"success": true,
"message": "",
"status": 200,
"data": {
"saldo_acreedor": {
"iban": "ES9121000418450200051332",
"pais_dc": "ES91",
"entidad": "2100",
"sucursal": "0418",
"dc": "45",
"cuenta": "0200051332",
"titular": {
"tipo": "9",
"identificacion": "0B12345678",
"nombre": "EMPRESA DE PRUEBA SL"
}
},
"cargo_en_cuenta": {
"iban": "ES9121000418450200051332",
"pais_dc": "ES91",
"entidad": "2100",
"sucursal": "0418",
"dc": "45",
"cuenta": "0200051332",
"titular": {
"tipo": "9",
"identificacion": "0B12345678",
"nombre": "EMPRESA DE PRUEBA SL"
}
},
"datos_bancarios": {
"nombreAutorizado": "AUTORIZADO DE PRUEBA",
"razonSocialAut": "DESPACHO DE PRUEBA SL",
"razonSocialEmp": "EMPRESA DE PRUEBA SL",
"ipfEmp": "90B123456780100",
"CrtrTbSaldoAcreedor": {
"codPaisDcAcreedor": "ES91",
"codSucursalAcreedor": "0418",
"codEntidadAcreedor": "2100",
"digControlCuentaAcreedor": "45",
"numCuentaAcreedor": "0200051332",
"tipoAcreedor": "9",
"titularCuentaAcreedor": "0B12345678",
"nombreTitularAcreedor": "EMPRESA DE PRUEBA SL"
},
"CrtrTbCargoEnCuenta": {
"codPaisDcCargoEnCuenta": "ES91",
"codSucursalCargoEnCuenta": "0418",
"codEntidadCargoEnCuenta": "2100",
"digControlCuentaCargoEnCuenta": "45",
"numCuentaCargoEnCuenta": "0200051332",
"tipoCargoEnCuenta": "9",
"titularCuentaCargoEnCuenta": "0B12345678",
"nombreTitularCargoEnCuenta": "EMPRESA DE PRUEBA SL"
},
"indicadorSaldoAcreedor": "S",
"indicadorCargoCuenta": "S"
}
}
}Status 422 response (several authorisations)
Respuesta
{
"success": false,
"message": "Es obligatorio introducir el autorizado {authorized_num}",
"status": 422,
"data": {
"authorized_list": [
{ "numero": "1020", "razSoc": "EMPRESA SL" },
{ "numero": "1021", "razSoc": "OTRA EMPRESA SL" }
]
}
}Status 404 response (no bank details)
The contribution account has neither a credit balance account nor a direct debit account on record. It is a final answer, not a TGSS failure: do not retry it.
Respuesta
{
"success": false,
"message": "SISTEMA RED: No hay datos bancarios comunicados para esta cuenta de cotización.",
"status": 404,
"data": [],
"errors": {
"tgss": [
"SISTEMA RED: No hay datos bancarios comunicados para esta cuenta de cotización."
]
}
}Last updated on