HTTP response status codes are numerous, and only a few apply to API interactions. This section details relevant HTTP status codes to API consumers and the Profiles that specify their use. The status codes are broken into two sections—Processing and Success Codes and Client Failure Codes.
| ||The client can send a full request given the headers provided in the first, headers-only request. Used in “look before you leap” operations with large, expensive client payloads.||Preflight||RFC 7231, section 6.2.1|
| ||The request was processed successfully, and the body contains content for the client. A typical response for ||Content, Data, Form, Info, Nexus, Representation||RFC 7231, section 6.3.1|
| ||Creation request was processed successfully. ||Form, Upload||RFC 7231, section 6.3.2|
| ||A state modification/creation operation ( ||Async||RFC 7231, section 6.3.3|
| ||The request was processed successfully, but the body contains no content. A resource may offer the Representation profile to give the client the ability to return content with the response.||Action, Form, Home, Representation||RFC 7231, section 6.3.5|
| ||The request contains a portion of the full content of the resource. It is used in content download responses.||Content||RFC 7233, section 4.1|
| ||The client should retry their request at the URL found in the ||Alias||RFC 7231, section 6.4.7|
| ||The client should retry their request at the URL found in the ||Alias||RFC 7538|
Client requests are rejected for various reasons, and the client may be able to attempt their operation again with a corrected request.
| ||Incorrect message formatting.||Content, Data, Form, Upload||RFC 7231, section 6.5.1|
| ||Message format is correct, but the data presents unknown or incorrect semantics. The resource does not understand the message.||Data, Form||RFC 4918, section 11.2|
| ||Business rule failure. For instance, in a hotel API, a client cannot book a room that is not available.||Action, Data, Form||RFC 7231, section 6.5.8|