Document API error JSON objects

[ci skip]
Spec API JSON error bodies
Implement API JSON errors