How to update array parameter by using PATCH request

My question:

I’m testing the update of an entity. Its body has a next structure (I can’t use real data):

“name”: “Kate”,
“number”: “3”,
“FavoriteBook”: [
{
“id”: 1,
“BookName”: “Dog&Cat”
},
{
“id”: 2,
“BookName”: “Rose”
},
]

How can I update “BookName” value in any “FavoriteBook” array by using PATCH request (I can’t use any other)?

Hi @lissiamsn,

It seems like favourite book api has values coming from actual book api. To update the name of a book you may need to call patch request for parent api. I believe, you may need to go through documentation for the APIs to find a way to achieve this.

3 Likes

Thank you! We had a bug in the documentation, so this moment was not clear.