I have a service which returns students, by locker number. Depending on the query, my service may return:
I've seen some APIs leverage the HTTP status codes to communicate resource state. Eg:
20x for 'one student'
30x for 'multiple students'
40x for 'no student'
50x for 'error'
Do modern developers expect this? Or.. should status codes speak only to the HTTP response state, rather than hinting at payload? I'm looking for some pros/cons, based on what you've seen work for other successful API programs.