I am designing the API where all the following three cases are possible
All the inputs in the array are correct, so this API will return the 200 status code
Sample output: 200 Status code
[{ "status" : "success", "value" : "some response" }, { "status" : "success", "value" : "some response" }]
Few inputs in the array are correct, so this API will return the 207 Multi-Status code
Sample output: 207 Multi-Status code
[{ "status" : "success", "value" : "some response" }, { "status" : "fail", "value" : "reason for failure" }, { "status" : "success", "value" : "some response" }]
All the inputs are wrong in the array. In this case do I need to send the 400 Bad Request (OR) 207 status code ?
Because if I send the 400 Bad Request then the response format will not be consistent like below
Sample Output: 400 Status code
{"errorcode" : "XXXXXX", "message" : "It is failed due to invalid inputs. Input must contain XXXX"}
In Case 3, do I need to send the 400 status code response or 207 status code response with all the status as 'FAIL'. Which is correct and consistent?