I’m not sure on the best way to structure the response from our API.
Should every response have a ‘result’ or ‘success’ node?
I’m thinking of the following template:
-result (true/false)
-data (only if result is true)
-errors (only if result is false)
Is this accepted practice, or is there a more standard way of doing things?
I think you should look at RESTful APIs implimentations.
For errors you can use HTTP status.
If status is 200 than everything is ok.
You can read about it here http://www.infoq.com/articles/designing-restful-http-apps-roth