Get council admin users
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'nonce=<string>' \
--data action=sagescreen_get_council_contacts \
--data council_post_id=123import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts"
payload = {
"nonce": "<string>",
"action": "sagescreen_get_council_contacts",
"council_post_id": "123"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
nonce: '<string>',
action: 'sagescreen_get_council_contacts',
council_post_id: '123'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts', 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/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "nonce=%3Cstring%3E&action=sagescreen_get_council_contacts&council_post_id=123",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts"
payload := strings.NewReader("nonce=%3Cstring%3E&action=sagescreen_get_council_contacts&council_post_id=123")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("nonce=%3Cstring%3E&action=sagescreen_get_council_contacts&council_post_id=123")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "nonce=%3Cstring%3E&action=sagescreen_get_council_contacts&council_post_id=123"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"value": "42",
"text": "Bob Johnson",
"email": "bob@greenville.gov",
"first_name": "Bob",
"last_name": "Johnson",
"phone": "+1-555-123-4567",
"title": "IT Director"
}
]
}{
"success": false,
"data": {
"message": "Missing council ID"
}
}{
"success": false,
"data": {
"message": "You do not have permission to perform this action"
}
}Deal AJAX
Get council admin users
Returns all users assigned to a council (council_admin, council_power_user, council_member roles) sorted by display name. Used to populate the “Primary Contact” dropdown in the sales calculator.
Nonce: sagescreen_sales_calc
Capability: ss_sales or ss_sales_admin or ss_admin_all
POST
/
wp-admin
/
admin-ajax.php?action=sagescreen_get_council_contacts
Get council admin users
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'nonce=<string>' \
--data action=sagescreen_get_council_contacts \
--data council_post_id=123import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts"
payload = {
"nonce": "<string>",
"action": "sagescreen_get_council_contacts",
"council_post_id": "123"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
nonce: '<string>',
action: 'sagescreen_get_council_contacts',
council_post_id: '123'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts', 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/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "nonce=%3Cstring%3E&action=sagescreen_get_council_contacts&council_post_id=123",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts"
payload := strings.NewReader("nonce=%3Cstring%3E&action=sagescreen_get_council_contacts&council_post_id=123")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("nonce=%3Cstring%3E&action=sagescreen_get_council_contacts&council_post_id=123")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_get_council_contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "nonce=%3Cstring%3E&action=sagescreen_get_council_contacts&council_post_id=123"
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"value": "42",
"text": "Bob Johnson",
"email": "bob@greenville.gov",
"first_name": "Bob",
"last_name": "Johnson",
"phone": "+1-555-123-4567",
"title": "IT Director"
}
]
}{
"success": false,
"data": {
"message": "Missing council ID"
}
}{
"success": false,
"data": {
"message": "You do not have permission to perform this action"
}
}Authorizations
WordPress AJAX nonce — either sagescreen_frontend_nonce or
sagescreen_sales_calc depending on the endpoint (see each endpoint
description). Sent as a form field in the POST body.
Body
application/x-www-form-urlencoded
⌘I