4xx Client Error
I can't give you the data in the format you want. I have the data, but not in XML/JSON/etc. that you asked for.
Use 406 when the client's proactive negotiation constraints leave no representation you are willing to serve.
GET https://api.example.test/api/data
# Headers
Accept: application/xml406 Not Acceptable
# Headers
Content-Type: application/json
# Body
{
"available": [
"application/json"
]
}API only supports JSON responses, not XML