Decide a Home Action
curl --request PATCH \
--url https://earthcare.network/api/v1/home/actions/{id}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {},
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_slug": "<string>"
}
'import requests
url = "https://earthcare.network/api/v1/home/actions/{id}/"
payload = {
"payload": {},
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_slug": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payload: {},
organization_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
business_slug: '<string>'
})
};
fetch('https://earthcare.network/api/v1/home/actions/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://earthcare.network/api/v1/home/actions/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'payload' => [
],
'organization_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'business_slug' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://earthcare.network/api/v1/home/actions/{id}/"
payload := strings.NewReader("{\n \"payload\": {},\n \"organization_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"business_slug\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.patch("https://earthcare.network/api/v1/home/actions/{id}/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {},\n \"organization_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"business_slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://earthcare.network/api/v1/home/actions/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payload\": {},\n \"organization_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"business_slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"why": "<string>",
"summary": "<string>",
"effect": "suggest_accept",
"action_label": "<string>",
"effect_note": "<string>",
"is_external": true,
"status": "pending",
"payload": {},
"related_type": "<string>",
"related_id": "<string>",
"source_mode": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"type": "<string>",
"actions": [
{}
],
"editable": true,
"opportunity": {},
"artifacts": [
{}
]
}Home
Decide a Home Action
Maps {status: accepted|dismissed|acted, payload?} onto the existing Recommendation PATCH (approve / dismiss / edit). accepted and acted both record status=acted (the Home Accept verb). Optional payload is merged first (edit is not approve).
PATCH
/
home
/
actions
/
{id}
/
Decide a Home Action
curl --request PATCH \
--url https://earthcare.network/api/v1/home/actions/{id}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"payload": {},
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_slug": "<string>"
}
'import requests
url = "https://earthcare.network/api/v1/home/actions/{id}/"
payload = {
"payload": {},
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"business_slug": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payload: {},
organization_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
business_slug: '<string>'
})
};
fetch('https://earthcare.network/api/v1/home/actions/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://earthcare.network/api/v1/home/actions/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'payload' => [
],
'organization_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'business_slug' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://earthcare.network/api/v1/home/actions/{id}/"
payload := strings.NewReader("{\n \"payload\": {},\n \"organization_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"business_slug\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.patch("https://earthcare.network/api/v1/home/actions/{id}/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payload\": {},\n \"organization_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"business_slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://earthcare.network/api/v1/home/actions/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payload\": {},\n \"organization_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"business_slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"why": "<string>",
"summary": "<string>",
"effect": "suggest_accept",
"action_label": "<string>",
"effect_note": "<string>",
"is_external": true,
"status": "pending",
"payload": {},
"related_type": "<string>",
"related_id": "<string>",
"source_mode": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"type": "<string>",
"actions": [
{}
],
"editable": true,
"opportunity": {},
"artifacts": [
{}
]
}Authorizations
DRF user token. Format: Token <token>
Path Parameters
Query Parameters
Your organization UUID. Workspace endpoints are org-scoped — supply this as a query param (writes also accept it in the body). Find it via GET /auth/me/ → organizations[].id.
Body
application/json
Response
The updated Action
One Home Action. Identical item shape to GET /automation/recommendations/. summary is an alias of why. First-run rows have opportunity=null.
Available options:
suggest_accept, approve_only, send, publish, schedule Available options:
pending, viewed, acted, dismissed