- Responses should be standardized. Consumer should expect always that will get same response structure whether was for successful or error responses.
- Consumer should expect that HTTP Status codes will be used correctly, and our defined statuses should be documented.
- There are lot of status codes to go through each of them so here is a link where each of them is listed and described: http://www.restapitutorial.com/httpstatuscodes.html
- Known issues with status codes and responses:
- Reverse proxy server can change the response if status is 4xx
Response structure for INSERTING, UPDATING single record
For Success response
…//fields and updated values
For Error response
…//sent fields and values
Response structure for RETRIEVING records
Example: Probably we should use same structure like SOLR or something similar