# Invalid Payload When Update / Patch Bookings

**URL:** <https://forum.youcanbook.me/t/invalid-payload-when-update-patch-bookings/2445>\
**Category:** API\
**Created:** [October 11, 2023, 7:48am UTC](https://forum.youcanbook.me/t/invalid-payload-when-update-patch-bookings/2445 "2023-10-11T07:48:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![val](https://avatars.discourse-cdn.com/v4/letter/v/e56c9b/32.png) [@val](https://forum.youcanbook.me/u/val)\
**Post date:** [October 11, 2023, 7:48am UTC](https://forum.youcanbook.me/t/invalid-payload-when-update-patch-bookings/2445/1 "2023-10-11T07:48:34Z")

</div>

I have this error :  
{  
“code”: “ycbm\_api\_http\_invalid\_payload”,  
“errors”: [  
{  
“code”: “ycbm\_api\_http\_invalid\_payload”,  
“field”: “actions[0].id”,  
“message”: “Expected value not provided”,  
“object”: “Booking”  
},  
{  
“code”: “ycbm\_api\_http\_invalid\_payload”,  
“field”: “actions[0].anchor”,  
“message”: “Read only”,  
“object”: “Booking”  
}  
],  
“httpCode”: 400,  
“httpStatusCode”: 400,  
“message”: “Invalid payload”,  
“status”: “BAD\_REQUEST”,  
“type”: “YcbmApiException”  
}

PATCH [https://api.youcanbook.me/v1/bookings/868a757b-c2d1-464d-9444-436983a8ccec](https://api.youcanbook.me/v1/bookings/868a757b-c2d1-464d-9444-436983a8ccec)

I tried executed this at postman, and this is the payload :  
{  
“actions”: [  
{  
“accountId”: “af6a6c3b-9b1a-4782-aa16-99fe2aa6f2c2”,  
“anchor”: “cancelled”,  
“timeZone”: “Asia/Jakarta”  
}  
],  
“cancellationReason”: “Go to other city”,  
“cancelled”: true,  
“cancelledAt”: “2023-10-11T14:45:00.00Z”,  
“cancelledBy”: “BOOKER”  
}

I assumed this is minimum payload but maybe something still missing. Please help

---

<div class="post-metadata">

**Author:** ![Ben](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.youcanbook.me/ben/32/772_2.png) [@Ben](https://forum.youcanbook.me/u/Ben)\
**Post date:** [October 17, 2023, 4:05pm UTC](https://forum.youcanbook.me/t/invalid-payload-when-update-patch-bookings/2445/2 "2023-10-17T16:05:42Z")

</div>

@val sorry you hit an error. Actions are going to be more for notifications that are sent out and are only adjusted at the booking page level not at the bookings endpoint.

Are you looking to cancel a booking on behalf of your booker? Or have them trigger things from a different app?

You should be able to PATCH in the following to the endpoint:  
{“cancelled” : true,  
“cancellationReason”: “Go to other city”,  
“cancelledBy” : “BOOKER”}
