update api docs around codes, update validation from JSON API request.