Add API for GET, POST, and PATCH of codes