We have following response in JSON:API format for GET
GET api/v1//book/123
{ "data": { "type": "book", "id": "123", "attributes": { "name": "Origin" }, "relationships": { "author": { "type" : "person", "id": "123" } }, "included": [{ "type" : "person", "id": "123", "attributes": { "name": "Dan Brown" } }] } }
for POST input body how should we place the attributes for author
One possible way I could think of is the following
POST api/v1/book
{ "data": { "type": "book", "attributes": { "name": "Origin" }, "relationships": { "author": { "type" : "person", "attributes": { "name": "Dan Brown" } } } } }