Badges API

Essentially a clone of the issuers API. Ready for review and merge.