Send request POST: https://jsonapiplayground.reyesoft.com/v2/chapters
Body: {
"type": "chapters",
"id": "111",
"attributes": {
"title": "Chapter 2777",
"ordering": 7167677
}
}
Expected response (according to JSON API specification): A document MUST contain at least one of the following top-level members:
data: the document’s “primary data”
errors: an array of error objects
meta: a meta object that contains non-standard meta-information.
The members data and errors MUST NOT coexist in the same document.
Received response: A JSON object MUST be at the root of every JSON API request and response containing data
{
"errors": [
{
"code": "wrong_data",
"title": "Wrong data received.",
"detail": "A JSON object MUST be at the root of every JSON API request and response containing data"
}
]
}
There is an object at the root of the JSON, but it does not have the required members - data, error or meta.
Send request POST: https://jsonapiplayground.reyesoft.com/v2/chapters
Body: {
"type": "chapters",
"id": "111",
"attributes": {
"title": "Chapter 2777",
"ordering": 7167677
}
}
Expected response (according to JSON API specification): A document MUST contain at least one of the following top-level members:
data: the document’s “primary data”
errors: an array of error objects
meta: a meta object that contains non-standard meta-information.
The members data and errors MUST NOT coexist in the same document.
Received response: A JSON object MUST be at the root of every JSON API request and response containing data
{
"errors": [
{
"code": "wrong_data",
"title": "Wrong data received.",
"detail": "A JSON object MUST be at the root of every JSON API request and response containing data"
}
]
}
There is an object at the root of the JSON, but it does not have the required members - data, error or meta.