Toggle a checklist step on an intake item
curl --request POST \
--url https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist \
--header 'Content-Type: application/json' \
--header 'X-WP-Nonce: <api-key>' \
--data '
{
"item_id": 4821,
"step": "reviewed"
}
'import requests
url = "https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist"
payload = {
"item_id": 4821,
"step": "reviewed"
}
headers = {
"X-WP-Nonce": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-WP-Nonce': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({item_id: 4821, step: 'reviewed'})
};
fetch('https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist', 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://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'item_id' => 4821,
'step' => 'reviewed'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-WP-Nonce: <api-key>"
],
]);
$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://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist"
payload := strings.NewReader("{\n \"item_id\": 4821,\n \"step\": \"reviewed\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-WP-Nonce", "<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.post("https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist")
.header("X-WP-Nonce", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"item_id\": 4821,\n \"step\": \"reviewed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-WP-Nonce"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"item_id\": 4821,\n \"step\": \"reviewed\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"step": "reviewed",
"done": true,
"done_at": "Feb 19, 2:30 PM"
}
}
Intake
Toggle a checklist step on an intake item
Flips a checklist boolean (reviewed, priced, approved,
responded) and records the timestamp. The item must be in
intake_open status. Caller must be the item owner or an admin.
POST
/
intake
/
toggle-checklist
Toggle a checklist step on an intake item
curl --request POST \
--url https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist \
--header 'Content-Type: application/json' \
--header 'X-WP-Nonce: <api-key>' \
--data '
{
"item_id": 4821,
"step": "reviewed"
}
'import requests
url = "https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist"
payload = {
"item_id": 4821,
"step": "reviewed"
}
headers = {
"X-WP-Nonce": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-WP-Nonce': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({item_id: 4821, step: 'reviewed'})
};
fetch('https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist', 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://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'item_id' => 4821,
'step' => 'reviewed'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-WP-Nonce: <api-key>"
],
]);
$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://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist"
payload := strings.NewReader("{\n \"item_id\": 4821,\n \"step\": \"reviewed\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-WP-Nonce", "<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.post("https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist")
.header("X-WP-Nonce", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"item_id\": 4821,\n \"step\": \"reviewed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/intake/toggle-checklist")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-WP-Nonce"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"item_id\": 4821,\n \"step\": \"reviewed\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"step": "reviewed",
"done": true,
"done_at": "Feb 19, 2:30 PM"
}
}
Authorizations
WordPress REST nonce (wp_rest action)
Body
application/json
⌘I