If your property was registered with a certificate from the architect solely you should seek to obtain one from the Town Hall stating that in the last 4 years (in Andalucia) they have not taken any action against it. The reason for this is that the architect´s certificate is not enough to avoid legal action as an action could well be underway, just now, without you knowing (although unlikely).

So I suggest that you apply, from the Town Hall, for a certificate stating the approximate date of conclusion of the works on your property, which has to be at least 4 years ago, that there are no legal actions taken against it and the statutory limitation to bring an action.

This will protect you against administrative action and although it will not legalize your property immediately as far as planning permission is concerned it will impede the Government from bringing an action against you.