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.
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://app.ownerrez.com/guests/12345
{
"Tags" : [ "7890", "foo" ]
}
You can pass either a tag id or a tag name.
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.
The Trigger tag criteria includes tags set on the booking itself as well as on the property or guest.
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.
Yes, that's correct - "foo" represents a generic meaningless example tag name.
I have the code working, thanks!