5

I have a rest API to upload multiple files. It returns an ID per file uploaded and a message, per file as well, which tells which error has occurred, if any.

Should I always return 200 with the json?

what if all files failed? and what if some files only have failed?

4
  • 1
    Possible duplicate of HTTP status code for a partial successful request Commented Aug 27, 2017 at 10:44
  • 1
    here is the quick lookout httpstatuses.com i think of 202 and 207 as to choose from as suggested by previous link Commented Aug 27, 2017 at 10:48
  • The other link was useful; I'll use a 207. Thanks! Commented Aug 27, 2017 at 11:58
  • This link is also useful for people that see this question after long time like me Commented Aug 7, 2019 at 11:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.