The response object 201 (the body of the response itself) does not have to be or is considered by some http client as the resource you just created.
This is a view that describes the result.
If you want people to access the newly created resource, they can do this by sending a request to the URI in the Location header, which returns from 201.
If you return the body of the object to 201, it is not considered by HTTP as the resource you just created, so you can return whatever you want.
The important thing is the type of media object that you are returning. If this object is known to the client, whether it is a smaller or full version of the object, they will know what to do with it. If you expect the client to βknowβ that the type of media being returned to 201 is the minimum version, you provide strong interaction with your own protocol, which violates the principles of ReST.
source share