Variable Hydration Webhook
Path
/api/hook?command=hydrate:vars
Method
POST
Parameters
event (string)
Event ID of the record
lang_id (number)
Language ID
selected (string | array[string, string])
Optional Event Product ID(s) to use as reference for variables. Either a single string or an array with up to 2 elements for dual fuel.
text (string | array[string*])
The text (or an array of strings) to hydrate
Return Value (json)
{
"error": boolean|string,
"text": string|array
}
error
field will be false if there were no errors hydrating or an error message string.
text
will mirror the text
parameter's format (string | array)
Example
// PHP Example (uses global helper)
$ret = SendWebHook('hydrate:vars', [
'event' => '0000-0000-00-000000',
'lang_id' => 1,
'text' => 'Text to hydrate',
]);