When you go to a Spanish embassy or consulate, you have certain rights that you may demand from these offices:
Embassies: Their function is to maintain contain between governments. The ambassador may sign or ratify agreements, records, treaties, etc and must spread and protect the interest of his country of origin in the country where he has been appointed. Apart from this, the ambassador may exercise consular functions.
Consulates: Their objective is both to take care of the needs of the nationals of the represented country (civil registry for marriages, births, deaths, granting of powers, etc.) and to authenticate documents and grant visas.
Consulates and vice-consulate fees: They are appendixes of the General Consulate to which they are ascribed and they are entities in charge of receiving and delivering documents but they are not able to process them in most cases. They cannot grant visas or issue Spanish passports on their own and are only authorised to authenticate local documents.