Auto Actions: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 733: | Line 733: | ||
You need two keys to use our API JSON functions - one for the API itself and one for the property. The keys have to consist of 16 characters of your choosing.<br> | You need two keys to use our API JSON functions - one for the API itself and one for the property. The keys have to consist of 16 characters of your choosing.<br> | ||
'''API key:''' | '''API key:''' | ||
* | *SETTINGS -> ACCOUNT -> ACCOUNT->ACCESS "API Key 1" | ||
*API Key = my_very_secret_api_key | *API Key = my_very_secret_api_key | ||
*API Key Access = allow any IP | *API Key Access = allow any IP | ||
*IP Whitelist = [leave empty] | *IP Whitelist = [leave empty] | ||
*Allow Writes = Yes | *Allow Writes = Yes | ||
*Property Access = Owned by this account only | *Property Access = Owned by this account only | ||
*'''Property key:''' | *'''Property key:''' | ||
*Settings > Properties > Access > propKey = secret_key_for_prop_XXXXXX | *Settings > Properties > Access > propKey = secret_key_for_prop_XXXXXX | ||
Set the triggers you need, for example: | Set the triggers you need, for example: | ||
Booking Field Contains: Message = XXX | |||
Set the webhook like this: | Set the webhook like this: | ||
* URL = <nowiki>https://api.beds24.com/json/setBooking</nowiki> | * URL = <nowiki>https://api.beds24.com/json/setBooking</nowiki> | ||
* Custom Header = [leave empty] | * Custom Header = [leave empty] | ||
Body Data: | |||
:{ | :{ | ||
::"authentication": | ::"authentication": | ||
| Line 764: | Line 763: | ||
===Use API/Webhook to write the value of the 'commission' field to a new invoice item=== | ===Use API/Webhook to write the value of the 'commission' field to a new invoice item=== | ||
You can create a new invoice item that contains the price of the channel's commission as a negative value to subtract it from the room price. You use the API JSON function '''setBooking''' for this. First you need to configure access to the API: | You can create a new invoice item that contains the price of the channel's commission as a negative value to subtract it from the room price. You use the API JSON function '''setBooking''' for this. First you need to configure access to the API: | ||
You need two keys to use our API JSON functions - one for the API itself and one for the property. The keys have to consist of 16 characters of your choosing.<br> | You need two keys to use our API JSON functions - one for the API itself and one for the property. The keys have to consist of 16 characters of your choosing.<br> | ||
'''API key:''' | '''API key:''' | ||
*SETTINGS -> ACCOUNT -> ACCOUNT->ACCESS "API Key 1" | |||
*SETTINGS -> ACCOUNT -> ACCOUNT->ACCESS "API Key 1" | |||
*API Key = my_very_secret_api_key | *API Key = my_very_secret_api_key | ||
*API Key Access = allow any IP | *API Key Access = allow any IP | ||
| Line 781: | Line 778: | ||
Set the triggers you need, for example: | Set the triggers you need, for example: | ||
Booking Source = Booking.com | |||
Set the webhook like this: | Set the webhook like this: | ||