Built by owners, for owners.

Change a booking tag's value

Replies: 7 - Pages: 1 - Last Reply: Jun 25, 2021 2:10 PM by: SBF VR
SBF VR
Registered: 7/17/18
Change a booking tag's value

I have the booking ID, I can figure out the tag ID # from the UI... I can't figure out what call to do in the API to change the value of a booking's tag from false to true. Because the tag is being used to fire a trigger, it's important that I find a way to set it's value based on external conditions (via the API). Thanks.

Chris Hynes
Registered: 10/19/12
Re: Change a booking tag's value

Currently, there's no way to set tags on bookings via API. You can set them on guests though, via PUT (to replace existing tags for the guest with the new set you pass) or PATCH (to add) like this:

PATCH https://secure.ownerreservations.com/guests/12345
{
"Tags" : [ "7890", "foo" ]
}

You can pass either a tag id or a tag name.

SBF VR
Registered: 7/17/18
Re: Change a booking tag's value

How would adding the tag to the guest work with triggers (if at all), which appear to look at tags on bookings and not on guests...? If it doesn't, then adding the tag to the guest doesn't get me where I'm trying to get.

Chris Hynes
Registered: 10/19/12
Re: Change a booking tag's value

The Trigger tag criteria includes tags set on the booking itself as well as on the property or guest.

SBF VR
Registered: 7/17/18
Re: Change a booking tag's value

In the above example, is "foo" a tag name or some kind of value (I thought tags were boolean, either they existed or they didn't, so "foo" seems like a tag name, but want to be sure I'm not making a mistake)? Thanks.

Ken T
Registered: 8/7/19
Re: Change a booking tag's value

Yes, that's correct - "foo" represents a generic meaningless example tag name.

SBF VR
Registered: 7/17/18
Re: Change a booking tag's value

I have the code working, thanks!

Pages: 1