cURL
curl --request PUT \
--url 'https://api.minimo.it/public/v1/tenants/restaurant_4812/automations' \
--header 'Authorization: Bearer YOUR_MINIMO_KEY' \
--header 'Content-Type: application/json' \
--data '{"rules": [{"key": "review", "enabled": false}]}'const res = await fetch('https://api.minimo.it/public/v1/tenants/restaurant_4812/automations', {
method: 'PUT',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"rules": [{"key": "review", "enabled": false}]}),
});
const { data } = await res.json();
console.log(data);import requests
res = requests.put(
'https://api.minimo.it/public/v1/tenants/restaurant_4812/automations',
headers={'Authorization': 'Bearer YOUR_MINIMO_KEY'},
json={"rules": [{"key": "review", "enabled": False}]},
)
print(res.status_code, res.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/tenants/{tenant}/automations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'rules' => [
[
'key' => 'reminder',
'offset' => '-P1D'
],
[
'key' => 'review',
'enabled' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.minimo.it/public/v1/tenants/{tenant}/automations"
payload := strings.NewReader("{\n \"rules\": [\n {\n \"key\": \"reminder\",\n \"offset\": \"-P1D\"\n },\n {\n \"key\": \"review\",\n \"enabled\": false\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.minimo.it/public/v1/tenants/{tenant}/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rules\": [\n {\n \"key\": \"reminder\",\n \"offset\": \"-P1D\"\n },\n {\n \"key\": \"review\",\n \"enabled\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/tenants/{tenant}/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": [\n {\n \"key\": \"reminder\",\n \"offset\": \"-P1D\"\n },\n {\n \"key\": \"review\",\n \"enabled\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"key": "confirmation",
"name": "Booking confirmation",
"event": "booking.created",
"template": 1201,
"templateUid": "TRF4MS9",
"offset": null,
"dateField": null,
"timing": "Immediately",
"enabled": true,
"cancelOn": [
"booking.cancelled"
],
"rescheduleOn": [],
"source": "default"
},
{
"key": "reminder",
"name": "Reminder 2 hours before",
"event": "booking.created",
"template": 1202,
"templateUid": "RMD2HRS",
"offset": "-P1D",
"dateField": "booking_at",
"timing": "1 day before",
"enabled": true,
"cancelOn": [
"booking.cancelled"
],
"rescheduleOn": [
"booking.updated"
],
"source": "override"
}
]
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}Rules
Save Tenant Rules
Change or switch off a rule for one restaurant, or add its own rule
PUT
/
public
/
v1
/
tenants
/
{tenant}
/
automations
cURL
curl --request PUT \
--url 'https://api.minimo.it/public/v1/tenants/restaurant_4812/automations' \
--header 'Authorization: Bearer YOUR_MINIMO_KEY' \
--header 'Content-Type: application/json' \
--data '{"rules": [{"key": "review", "enabled": false}]}'const res = await fetch('https://api.minimo.it/public/v1/tenants/restaurant_4812/automations', {
method: 'PUT',
headers: {
Authorization: 'Bearer YOUR_MINIMO_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"rules": [{"key": "review", "enabled": false}]}),
});
const { data } = await res.json();
console.log(data);import requests
res = requests.put(
'https://api.minimo.it/public/v1/tenants/restaurant_4812/automations',
headers={'Authorization': 'Bearer YOUR_MINIMO_KEY'},
json={"rules": [{"key": "review", "enabled": False}]},
)
print(res.status_code, res.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.minimo.it/public/v1/tenants/{tenant}/automations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'rules' => [
[
'key' => 'reminder',
'offset' => '-P1D'
],
[
'key' => 'review',
'enabled' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.minimo.it/public/v1/tenants/{tenant}/automations"
payload := strings.NewReader("{\n \"rules\": [\n {\n \"key\": \"reminder\",\n \"offset\": \"-P1D\"\n },\n {\n \"key\": \"review\",\n \"enabled\": false\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.minimo.it/public/v1/tenants/{tenant}/automations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"rules\": [\n {\n \"key\": \"reminder\",\n \"offset\": \"-P1D\"\n },\n {\n \"key\": \"review\",\n \"enabled\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.minimo.it/public/v1/tenants/{tenant}/automations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": [\n {\n \"key\": \"reminder\",\n \"offset\": \"-P1D\"\n },\n {\n \"key\": \"review\",\n \"enabled\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"key": "confirmation",
"name": "Booking confirmation",
"event": "booking.created",
"template": 1201,
"templateUid": "TRF4MS9",
"offset": null,
"dateField": null,
"timing": "Immediately",
"enabled": true,
"cancelOn": [
"booking.cancelled"
],
"rescheduleOn": [],
"source": "default"
},
{
"key": "reminder",
"name": "Reminder 2 hours before",
"event": "booking.created",
"template": 1202,
"templateUid": "RMD2HRS",
"offset": "-P1D",
"dateField": "booking_at",
"timing": "1 day before",
"enabled": true,
"cancelOn": [
"booking.cancelled"
],
"rescheduleOn": [
"booking.updated"
],
"source": "override"
}
]
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}{
"status": "FAIL",
"message": "INVALID_PARAMETERS",
"userMessage": "Set the origins allowed to embed the widgets first."
}Guide: Rules. Errors: Errors and limits.