A single resource is unwrapped
data envelope, but always an object discriminator.
A list
object, so an item lifted out of data still says what it is. See
Pagination.
A deletion receipt
deletedis alwaystrue. A failed deletion is an error status with an error body, never a receipt withdeleted: false, so a branch onif (!res.deleted)will never run.messageis for humans. Show it, log it, but do not parse or compare it — the wording may change, and that is not a breaking change.
An error
A bulk result
The only body where successes and failures sit together, and therefore the only one where the HTTP status does not describe the outcome. See Bulk operations.null and omission in a PATCH
PATCH accepts the same fields as POST, all optional. Leaving a field out and sending it as
null mean different things:
So an update that should only rename a link carries
name and nothing else — sending the full
object back with unchanged fields works too, but any field you set to null along the way will be
cleared.
On a link, two of those nulls move the link rather than empty it: