curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_save_deal' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data nonce=abc123def456 \
--data dealId=1042 \
--data 'customerName=Greenville City Council' \
--data councilId=312 \
--data contactFirstName=Bob \
--data contactLastName=Johnson \
--data 'contactTitle=IT Director' \
--data contactEmail=bob@greenville.gov \
--data 'contactPhone=+1-555-123-4567' \
--data customerUrl=https://greenville.gov \
--data customerIndustry=Government \
--data companySize=51-200 \
--data 'companyRevenue=$1M-$10M' \
--data 'customerAddress=100 Main Street' \
--data 'customerAddress2=Suite 200' \
--data customerCity=Greenville \
--data customerState=SC \
--data customerZip=29601 \
--data customerCountry=US \
--data numSages=5 \
--data creditInputMode=direct \
--data numCredits=500 \
--data screensPerRole=100 \
--data extraCredits=0 \
--data creditsFloor=100 \
--data creditsCeiling=1000 \
--data tierLite=20 \
--data tierCore=60 \
--data tierAdvanced=20 \
--data whiteGlovePrice=5000 \
--data addonCustomBranding=true \
--data addonCustomUrl=false \
--data addonPrioritySupport=true \
--data 'compliance=["hipaa","soc2"]' \
--data 'integrations=["salesforce","workday"]' \
--data pricePerCredit=2.5 \
--data pricePerSage=125 \
--data growthRate=15 \
--data priceIncreaseRate=3 \
--data discountPercent=10 \
--data discountDollar=0 \
--data hasReferral=false \
--data expenseMonthly=0 \
--data expenseAnnual=0 \
--data expenseOnetime=0 \
--data 'customerNotes=Includes complimentary onboarding session.' \
--data quoteExpirationDays=5import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_save_deal"
payload = {
"nonce": "abc123def456",
"dealId": "1042",
"customerName": "Greenville City Council",
"councilId": "312",
"contactFirstName": "Bob",
"contactLastName": "Johnson",
"contactTitle": "IT Director",
"contactEmail": "bob@greenville.gov",
"contactPhone": "+1-555-123-4567",
"customerUrl": "https://greenville.gov",
"customerIndustry": "Government",
"companySize": "51-200",
"companyRevenue": "$1M-$10M",
"customerAddress": "100 Main Street",
"customerAddress2": "Suite 200",
"customerCity": "Greenville",
"customerState": "SC",
"customerZip": "29601",
"customerCountry": "US",
"numSages": "5",
"creditInputMode": "direct",
"numCredits": "500",
"screensPerRole": "100",
"extraCredits": "0",
"creditsFloor": "100",
"creditsCeiling": "1000",
"tierLite": "20",
"tierCore": "60",
"tierAdvanced": "20",
"whiteGlovePrice": "5000",
"addonCustomBranding": "true",
"addonCustomUrl": "false",
"addonPrioritySupport": "true",
"compliance": "[\"hipaa\",\"soc2\"]",
"integrations": "[\"salesforce\",\"workday\"]",
"pricePerCredit": "2.5",
"pricePerSage": "125",
"growthRate": "15",
"priceIncreaseRate": "3",
"discountPercent": "10",
"discountDollar": "0",
"hasReferral": "false",
"expenseMonthly": "0",
"expenseAnnual": "0",
"expenseOnetime": "0",
"customerNotes": "Includes complimentary onboarding session.",
"quoteExpirationDays": "5"
}
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: 'abc123def456',
dealId: '1042',
customerName: 'Greenville City Council',
councilId: '312',
contactFirstName: 'Bob',
contactLastName: 'Johnson',
contactTitle: 'IT Director',
contactEmail: 'bob@greenville.gov',
contactPhone: '+1-555-123-4567',
customerUrl: 'https://greenville.gov',
customerIndustry: 'Government',
companySize: '51-200',
companyRevenue: '$1M-$10M',
customerAddress: '100 Main Street',
customerAddress2: 'Suite 200',
customerCity: 'Greenville',
customerState: 'SC',
customerZip: '29601',
customerCountry: 'US',
numSages: '5',
creditInputMode: 'direct',
numCredits: '500',
screensPerRole: '100',
extraCredits: '0',
creditsFloor: '100',
creditsCeiling: '1000',
tierLite: '20',
tierCore: '60',
tierAdvanced: '20',
whiteGlovePrice: '5000',
addonCustomBranding: 'true',
addonCustomUrl: 'false',
addonPrioritySupport: 'true',
compliance: '["hipaa","soc2"]',
integrations: '["salesforce","workday"]',
pricePerCredit: '2.5',
pricePerSage: '125',
growthRate: '15',
priceIncreaseRate: '3',
discountPercent: '10',
discountDollar: '0',
hasReferral: 'false',
expenseMonthly: '0',
expenseAnnual: '0',
expenseOnetime: '0',
customerNotes: 'Includes complimentary onboarding session.',
quoteExpirationDays: '5'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_save_deal', 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_save_deal",
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=abc123def456&dealId=1042&customerName=Greenville%20City%20Council&councilId=312&contactFirstName=Bob&contactLastName=Johnson&contactTitle=IT%20Director&contactEmail=bob%40greenville.gov&contactPhone=%2B1-555-123-4567&customerUrl=https%3A%2F%2Fgreenville.gov&customerIndustry=Government&companySize=51-200&companyRevenue=%241M-%2410M&customerAddress=100%20Main%20Street&customerAddress2=Suite%20200&customerCity=Greenville&customerState=SC&customerZip=29601&customerCountry=US&numSages=5&creditInputMode=direct&numCredits=500&screensPerRole=100&extraCredits=0&creditsFloor=100&creditsCeiling=1000&tierLite=20&tierCore=60&tierAdvanced=20&whiteGlovePrice=5000&addonCustomBranding=true&addonCustomUrl=false&addonPrioritySupport=true&compliance=%5B%22hipaa%22%2C%22soc2%22%5D&integrations=%5B%22salesforce%22%2C%22workday%22%5D&pricePerCredit=2.5&pricePerSage=125&growthRate=15&priceIncreaseRate=3&discountPercent=10&discountDollar=0&hasReferral=false&expenseMonthly=0&expenseAnnual=0&expenseOnetime=0&customerNotes=Includes%20complimentary%20onboarding%20session."eExpirationDays=5",
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_save_deal"
payload := strings.NewReader("nonce=abc123def456&dealId=1042&customerName=Greenville%20City%20Council&councilId=312&contactFirstName=Bob&contactLastName=Johnson&contactTitle=IT%20Director&contactEmail=bob%40greenville.gov&contactPhone=%2B1-555-123-4567&customerUrl=https%3A%2F%2Fgreenville.gov&customerIndustry=Government&companySize=51-200&companyRevenue=%241M-%2410M&customerAddress=100%20Main%20Street&customerAddress2=Suite%20200&customerCity=Greenville&customerState=SC&customerZip=29601&customerCountry=US&numSages=5&creditInputMode=direct&numCredits=500&screensPerRole=100&extraCredits=0&creditsFloor=100&creditsCeiling=1000&tierLite=20&tierCore=60&tierAdvanced=20&whiteGlovePrice=5000&addonCustomBranding=true&addonCustomUrl=false&addonPrioritySupport=true&compliance=%5B%22hipaa%22%2C%22soc2%22%5D&integrations=%5B%22salesforce%22%2C%22workday%22%5D&pricePerCredit=2.5&pricePerSage=125&growthRate=15&priceIncreaseRate=3&discountPercent=10&discountDollar=0&hasReferral=false&expenseMonthly=0&expenseAnnual=0&expenseOnetime=0&customerNotes=Includes%20complimentary%20onboarding%20session."eExpirationDays=5")
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_save_deal")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("nonce=abc123def456&dealId=1042&customerName=Greenville%20City%20Council&councilId=312&contactFirstName=Bob&contactLastName=Johnson&contactTitle=IT%20Director&contactEmail=bob%40greenville.gov&contactPhone=%2B1-555-123-4567&customerUrl=https%3A%2F%2Fgreenville.gov&customerIndustry=Government&companySize=51-200&companyRevenue=%241M-%2410M&customerAddress=100%20Main%20Street&customerAddress2=Suite%20200&customerCity=Greenville&customerState=SC&customerZip=29601&customerCountry=US&numSages=5&creditInputMode=direct&numCredits=500&screensPerRole=100&extraCredits=0&creditsFloor=100&creditsCeiling=1000&tierLite=20&tierCore=60&tierAdvanced=20&whiteGlovePrice=5000&addonCustomBranding=true&addonCustomUrl=false&addonPrioritySupport=true&compliance=%5B%22hipaa%22%2C%22soc2%22%5D&integrations=%5B%22salesforce%22%2C%22workday%22%5D&pricePerCredit=2.5&pricePerSage=125&growthRate=15&priceIncreaseRate=3&discountPercent=10&discountDollar=0&hasReferral=false&expenseMonthly=0&expenseAnnual=0&expenseOnetime=0&customerNotes=Includes%20complimentary%20onboarding%20session."eExpirationDays=5")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_save_deal")
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=abc123def456&dealId=1042&customerName=Greenville%20City%20Council&councilId=312&contactFirstName=Bob&contactLastName=Johnson&contactTitle=IT%20Director&contactEmail=bob%40greenville.gov&contactPhone=%2B1-555-123-4567&customerUrl=https%3A%2F%2Fgreenville.gov&customerIndustry=Government&companySize=51-200&companyRevenue=%241M-%2410M&customerAddress=100%20Main%20Street&customerAddress2=Suite%20200&customerCity=Greenville&customerState=SC&customerZip=29601&customerCountry=US&numSages=5&creditInputMode=direct&numCredits=500&screensPerRole=100&extraCredits=0&creditsFloor=100&creditsCeiling=1000&tierLite=20&tierCore=60&tierAdvanced=20&whiteGlovePrice=5000&addonCustomBranding=true&addonCustomUrl=false&addonPrioritySupport=true&compliance=%5B%22hipaa%22%2C%22soc2%22%5D&integrations=%5B%22salesforce%22%2C%22workday%22%5D&pricePerCredit=2.5&pricePerSage=125&growthRate=15&priceIncreaseRate=3&discountPercent=10&discountDollar=0&hasReferral=false&expenseMonthly=0&expenseAnnual=0&expenseOnetime=0&customerNotes=Includes%20complimentary%20onboarding%20session."eExpirationDays=5"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "Deal saved successfully",
"deal_id": 1042
}
}{
"success": false,
"data": {
"message": "Invalid deal ID"
}
}{
"success": false,
"data": {
"message": "You do not have permission to perform this action"
}
}Save deal as draft
Creates a new ss_deal post in draft status, or updates an existing
draft. On first save generates deal_uuid, deal_lookup_code, and
quote_number. Accepts all deal form fields. Calculates and stores
computed financial values (year totals, commission, margin deduction).
Nonce: sagescreen_sales_calc
Capability: ss_sales or ss_sales_admin or ss_admin_all
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_save_deal' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data nonce=abc123def456 \
--data dealId=1042 \
--data 'customerName=Greenville City Council' \
--data councilId=312 \
--data contactFirstName=Bob \
--data contactLastName=Johnson \
--data 'contactTitle=IT Director' \
--data contactEmail=bob@greenville.gov \
--data 'contactPhone=+1-555-123-4567' \
--data customerUrl=https://greenville.gov \
--data customerIndustry=Government \
--data companySize=51-200 \
--data 'companyRevenue=$1M-$10M' \
--data 'customerAddress=100 Main Street' \
--data 'customerAddress2=Suite 200' \
--data customerCity=Greenville \
--data customerState=SC \
--data customerZip=29601 \
--data customerCountry=US \
--data numSages=5 \
--data creditInputMode=direct \
--data numCredits=500 \
--data screensPerRole=100 \
--data extraCredits=0 \
--data creditsFloor=100 \
--data creditsCeiling=1000 \
--data tierLite=20 \
--data tierCore=60 \
--data tierAdvanced=20 \
--data whiteGlovePrice=5000 \
--data addonCustomBranding=true \
--data addonCustomUrl=false \
--data addonPrioritySupport=true \
--data 'compliance=["hipaa","soc2"]' \
--data 'integrations=["salesforce","workday"]' \
--data pricePerCredit=2.5 \
--data pricePerSage=125 \
--data growthRate=15 \
--data priceIncreaseRate=3 \
--data discountPercent=10 \
--data discountDollar=0 \
--data hasReferral=false \
--data expenseMonthly=0 \
--data expenseAnnual=0 \
--data expenseOnetime=0 \
--data 'customerNotes=Includes complimentary onboarding session.' \
--data quoteExpirationDays=5import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_save_deal"
payload = {
"nonce": "abc123def456",
"dealId": "1042",
"customerName": "Greenville City Council",
"councilId": "312",
"contactFirstName": "Bob",
"contactLastName": "Johnson",
"contactTitle": "IT Director",
"contactEmail": "bob@greenville.gov",
"contactPhone": "+1-555-123-4567",
"customerUrl": "https://greenville.gov",
"customerIndustry": "Government",
"companySize": "51-200",
"companyRevenue": "$1M-$10M",
"customerAddress": "100 Main Street",
"customerAddress2": "Suite 200",
"customerCity": "Greenville",
"customerState": "SC",
"customerZip": "29601",
"customerCountry": "US",
"numSages": "5",
"creditInputMode": "direct",
"numCredits": "500",
"screensPerRole": "100",
"extraCredits": "0",
"creditsFloor": "100",
"creditsCeiling": "1000",
"tierLite": "20",
"tierCore": "60",
"tierAdvanced": "20",
"whiteGlovePrice": "5000",
"addonCustomBranding": "true",
"addonCustomUrl": "false",
"addonPrioritySupport": "true",
"compliance": "[\"hipaa\",\"soc2\"]",
"integrations": "[\"salesforce\",\"workday\"]",
"pricePerCredit": "2.5",
"pricePerSage": "125",
"growthRate": "15",
"priceIncreaseRate": "3",
"discountPercent": "10",
"discountDollar": "0",
"hasReferral": "false",
"expenseMonthly": "0",
"expenseAnnual": "0",
"expenseOnetime": "0",
"customerNotes": "Includes complimentary onboarding session.",
"quoteExpirationDays": "5"
}
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: 'abc123def456',
dealId: '1042',
customerName: 'Greenville City Council',
councilId: '312',
contactFirstName: 'Bob',
contactLastName: 'Johnson',
contactTitle: 'IT Director',
contactEmail: 'bob@greenville.gov',
contactPhone: '+1-555-123-4567',
customerUrl: 'https://greenville.gov',
customerIndustry: 'Government',
companySize: '51-200',
companyRevenue: '$1M-$10M',
customerAddress: '100 Main Street',
customerAddress2: 'Suite 200',
customerCity: 'Greenville',
customerState: 'SC',
customerZip: '29601',
customerCountry: 'US',
numSages: '5',
creditInputMode: 'direct',
numCredits: '500',
screensPerRole: '100',
extraCredits: '0',
creditsFloor: '100',
creditsCeiling: '1000',
tierLite: '20',
tierCore: '60',
tierAdvanced: '20',
whiteGlovePrice: '5000',
addonCustomBranding: 'true',
addonCustomUrl: 'false',
addonPrioritySupport: 'true',
compliance: '["hipaa","soc2"]',
integrations: '["salesforce","workday"]',
pricePerCredit: '2.5',
pricePerSage: '125',
growthRate: '15',
priceIncreaseRate: '3',
discountPercent: '10',
discountDollar: '0',
hasReferral: 'false',
expenseMonthly: '0',
expenseAnnual: '0',
expenseOnetime: '0',
customerNotes: 'Includes complimentary onboarding session.',
quoteExpirationDays: '5'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_save_deal', 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_save_deal",
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=abc123def456&dealId=1042&customerName=Greenville%20City%20Council&councilId=312&contactFirstName=Bob&contactLastName=Johnson&contactTitle=IT%20Director&contactEmail=bob%40greenville.gov&contactPhone=%2B1-555-123-4567&customerUrl=https%3A%2F%2Fgreenville.gov&customerIndustry=Government&companySize=51-200&companyRevenue=%241M-%2410M&customerAddress=100%20Main%20Street&customerAddress2=Suite%20200&customerCity=Greenville&customerState=SC&customerZip=29601&customerCountry=US&numSages=5&creditInputMode=direct&numCredits=500&screensPerRole=100&extraCredits=0&creditsFloor=100&creditsCeiling=1000&tierLite=20&tierCore=60&tierAdvanced=20&whiteGlovePrice=5000&addonCustomBranding=true&addonCustomUrl=false&addonPrioritySupport=true&compliance=%5B%22hipaa%22%2C%22soc2%22%5D&integrations=%5B%22salesforce%22%2C%22workday%22%5D&pricePerCredit=2.5&pricePerSage=125&growthRate=15&priceIncreaseRate=3&discountPercent=10&discountDollar=0&hasReferral=false&expenseMonthly=0&expenseAnnual=0&expenseOnetime=0&customerNotes=Includes%20complimentary%20onboarding%20session."eExpirationDays=5",
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_save_deal"
payload := strings.NewReader("nonce=abc123def456&dealId=1042&customerName=Greenville%20City%20Council&councilId=312&contactFirstName=Bob&contactLastName=Johnson&contactTitle=IT%20Director&contactEmail=bob%40greenville.gov&contactPhone=%2B1-555-123-4567&customerUrl=https%3A%2F%2Fgreenville.gov&customerIndustry=Government&companySize=51-200&companyRevenue=%241M-%2410M&customerAddress=100%20Main%20Street&customerAddress2=Suite%20200&customerCity=Greenville&customerState=SC&customerZip=29601&customerCountry=US&numSages=5&creditInputMode=direct&numCredits=500&screensPerRole=100&extraCredits=0&creditsFloor=100&creditsCeiling=1000&tierLite=20&tierCore=60&tierAdvanced=20&whiteGlovePrice=5000&addonCustomBranding=true&addonCustomUrl=false&addonPrioritySupport=true&compliance=%5B%22hipaa%22%2C%22soc2%22%5D&integrations=%5B%22salesforce%22%2C%22workday%22%5D&pricePerCredit=2.5&pricePerSage=125&growthRate=15&priceIncreaseRate=3&discountPercent=10&discountDollar=0&hasReferral=false&expenseMonthly=0&expenseAnnual=0&expenseOnetime=0&customerNotes=Includes%20complimentary%20onboarding%20session."eExpirationDays=5")
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_save_deal")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("nonce=abc123def456&dealId=1042&customerName=Greenville%20City%20Council&councilId=312&contactFirstName=Bob&contactLastName=Johnson&contactTitle=IT%20Director&contactEmail=bob%40greenville.gov&contactPhone=%2B1-555-123-4567&customerUrl=https%3A%2F%2Fgreenville.gov&customerIndustry=Government&companySize=51-200&companyRevenue=%241M-%2410M&customerAddress=100%20Main%20Street&customerAddress2=Suite%20200&customerCity=Greenville&customerState=SC&customerZip=29601&customerCountry=US&numSages=5&creditInputMode=direct&numCredits=500&screensPerRole=100&extraCredits=0&creditsFloor=100&creditsCeiling=1000&tierLite=20&tierCore=60&tierAdvanced=20&whiteGlovePrice=5000&addonCustomBranding=true&addonCustomUrl=false&addonPrioritySupport=true&compliance=%5B%22hipaa%22%2C%22soc2%22%5D&integrations=%5B%22salesforce%22%2C%22workday%22%5D&pricePerCredit=2.5&pricePerSage=125&growthRate=15&priceIncreaseRate=3&discountPercent=10&discountDollar=0&hasReferral=false&expenseMonthly=0&expenseAnnual=0&expenseOnetime=0&customerNotes=Includes%20complimentary%20onboarding%20session."eExpirationDays=5")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=sagescreen_save_deal")
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=abc123def456&dealId=1042&customerName=Greenville%20City%20Council&councilId=312&contactFirstName=Bob&contactLastName=Johnson&contactTitle=IT%20Director&contactEmail=bob%40greenville.gov&contactPhone=%2B1-555-123-4567&customerUrl=https%3A%2F%2Fgreenville.gov&customerIndustry=Government&companySize=51-200&companyRevenue=%241M-%2410M&customerAddress=100%20Main%20Street&customerAddress2=Suite%20200&customerCity=Greenville&customerState=SC&customerZip=29601&customerCountry=US&numSages=5&creditInputMode=direct&numCredits=500&screensPerRole=100&extraCredits=0&creditsFloor=100&creditsCeiling=1000&tierLite=20&tierCore=60&tierAdvanced=20&whiteGlovePrice=5000&addonCustomBranding=true&addonCustomUrl=false&addonPrioritySupport=true&compliance=%5B%22hipaa%22%2C%22soc2%22%5D&integrations=%5B%22salesforce%22%2C%22workday%22%5D&pricePerCredit=2.5&pricePerSage=125&growthRate=15&priceIncreaseRate=3&discountPercent=10&discountDollar=0&hasReferral=false&expenseMonthly=0&expenseAnnual=0&expenseOnetime=0&customerNotes=Includes%20complimentary%20onboarding%20session."eExpirationDays=5"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "Deal saved successfully",
"deal_id": 1042
}
}{
"success": false,
"data": {
"message": "Invalid deal 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
All deal form fields. Accepts both snake_case and camelCase keys
(e.g. customer_name or customerName). Only nonce and action
are strictly required; all other fields are optional on save.
"abc123def456"
sagescreen_save_deal, sagescreen_create_quote Existing deal post ID (omit for new deal)
1042
"Greenville City Council"
Linked council post ID (for existing customers)
312
"Bob"
"Johnson"
"IT Director"
"bob@greenville.gov"
"+1-555-123-4567"
"https://greenville.gov"
"Government"
"51-200"
"$1M-$10M"
"100 Main Street"
"Suite 200"
"Greenville"
"SC"
"29601"
"US"
5
"direct"
500
100
0
100
1000
Percentage (0-100)
20
60
20
Onboarding tier selection
self_serve, white_glove 5000
true
false
true
JSON-encoded array of compliance tags
"[\"hipaa\",\"soc2\"]"
JSON-encoded array of integration tags
"[\"salesforce\",\"workday\"]"
2.5
125
Annual growth percentage
15
Annual price increase percentage
3
How the discount is expressed
percent, dollar, 10
0
false
0
0
0
"Includes complimentary onboarding session."
5