‘Best’ practice for restful POST response

Returning the new object fits with the REST principle of “Uniform Interface – Manipulation of resources through representations.” The complete object is the representation of the new state of the object that was created.

There is a really excellent reference for API design, here: Best Practices for Designing a Pragmatic RESTful API

It includes an answer to your question here: Updates & creation should return a resource representation

It says:

To prevent an API consumer from having to hit the API again for an
updated representation, have the API return the updated (or created)
representation as part of the response.

Seems nicely pragmatic to me and it fits in with that REST principle I mentioned above.

Leave a Comment