
The main response structure have 4 keys which are 1) error_code code to indicate if there was an error 2) Success always returning true or false if the response is success will returning true otherwise will get false 3) Message it’s better to return the response message from back-end 4) data which is the main key and will have the data that should be displayed There are 2 kind of responses in each API request which are Success response and Error response i will explain briefly some of our API’s responses how it looks So i decided to explain what the standard we are following in our company, we are writing API’s in rails framework and returning response as JSON to front-end applications I started searching about standard JSON format but unfortunately there is no standard Not only within JSON itself, but in terms of how to use it for RESTful applications or anything else of the sort. I found myself wondering if there is any standard over there. I was really interested by this question as I have to design a JSON API everyday. Recently one of my friend asked me if there is any standard response we follow for API response, this question asked too much from beginner developers especially those are new in term of API
