I am writing api that expects a List of customer Id's and then proces that List by iterating each and every request, and then the response body will contains response of each and every ID as if it was an individual request.
Sample request = [1,2,3]
Sample response =
{
"1" :{
"responseCode":"200"
}
"2":{
"responseCode":"404"
"errorMessage":"Id not found"
}
"3":{
"responseCode":"200"
}
}
Now what can be response code of this API itself, what are different response code in following cases:
- Partial success as above example?
- What if some other error comes while executing this api?
- All request retuned error because of some problem, the response will have all id and corresponding error codes, but what can be response code of the api itself?will it be 200?
I think there can be only 2 response status for this api(apart from auth/throttling etc.)? 200,500