Rejected replacement reason: 422 with the valid codes
28/09/2026
When sending a contract to SEPE, the codes accepted for CAUSA_SUSTITUCION depend on the contract: Contrat@ offers different ones in its form. Until today, if the code you sent was not among them, the API answered 502 with the message "SEPE: Sustitución no permitida por el SEPE", without saying which ones were valid. It could not be reproduced in test mode either, because the SEPE form is never opened there.
From now on it answers 422, because it is the data that needs fixing, and returns the codes SEPE accepts for that contract in data.accepted:
Now
{
"success": false,
"message": "SEPE: Causa de sustitución «19» no admitida por el SEPE para este contrato. Los códigos admitidos van en data.accepted",
"status": 422,
"data": {
"field": "CAUSA_SUSTITUCION",
"value": "19",
"accepted": [
{ "code": "A", "description": "..." },
{ "code": "B", "description": "..." }
]
}
}What to check in your integration: do not retry this error with the same code. Fix CAUSA_SUSTITUCION using one from data.accepted, which is a single letter (TEIINTER table), not a number.