Is it allowed to have the relationships in the 'included' attribute for the 201 (POST) response?

Is it allowed POST a data without relationships and the API determines the relationships based on the given data and respond back with 201 Created response, data and its relationships in included attributes?
Is it allowed to use ‘include’ query parameter with POST request?

A POST need only contain information that’s required to create the desired resource. If the relationships are derived by the service, there’s no reason to include them. This is true of any field, not just relationships.

There’s nothing that says it’s not allowed.

-Fred

1 Like