Food selling licence for daily market

Can someone tell me what licence i need to sell food in the daily markets in spain and is this easy te get..
I like some more information about this one because i dont know were to start

I think you first stop is the local Ayuntamiento, I know our local stall holders pay someone the town hall sends around.