Deleting an existing JSON API Resource is done by calling the delete
action of your API with:
HTTP DELETE
request typeAccept
header set to application/vnd.api+json
Content-Type
header set to application/vnd.api+json
id
of the resource to deleteA successful request will return HTTP response code 204
(No Content)
and empty response body. Failed requests will return HTTP response
code 400
with empty response body.
An valid JSON API document structure for deleting a Country
with id
10 would look similar to:
{
"data": {
"type": "countries",
"id": "10"
}
}
}