Update Transaction
Partially updates an existing transaction. Only supplied fields are applied; omitted fields remain unchanged. transactionStatus is writable: supply the stage’s display name exactly as it appears in the team’s transaction pipeline for the given transactionType (case-insensitive, e.g. “Under Contract”). A status name that matches no stage in that pipeline is rejected (200125); omit the field to keep the current status.
curl --request PUT \
--url https://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"transactionName": "123 Main St",
"leadName": "Bob",
"assignedAgent": 100001,
"transactionType": "Purchase",
"homePrice": 1000000,
"transactionStatus": "Pre-contract",
"expectedCloseDate": 1508580010000,
"closeDate": 1508580010000,
"commissionRate": 3,
"gci": 5000,
"teamRevenue": 1000,
"agentRevenue": 4000,
"appointmentDate": 1508580010000,
"agreementSignedDate": 1508580010000,
"offerDate": 1508580010000,
"contractDate": 1508580010000,
"appraisalDate": 1508580010000,
"homeInspectionDate": 1508580010000,
"escrowDate": 1508580010000,
"expiration": 1508580010000,
"customFields": [
{
"id": 123,
"value": "<string>"
}
],
"commissions": {
"preSplit": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
],
"split": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
],
"postSplit": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
]
}
}
'import requests
url = "https://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}"
payload = {
"transactionName": "123 Main St",
"leadName": "Bob",
"assignedAgent": 100001,
"transactionType": "Purchase",
"homePrice": 1000000,
"transactionStatus": "Pre-contract",
"expectedCloseDate": 1508580010000,
"closeDate": 1508580010000,
"commissionRate": 3,
"gci": 5000,
"teamRevenue": 1000,
"agentRevenue": 4000,
"appointmentDate": 1508580010000,
"agreementSignedDate": 1508580010000,
"offerDate": 1508580010000,
"contractDate": 1508580010000,
"appraisalDate": 1508580010000,
"homeInspectionDate": 1508580010000,
"escrowDate": 1508580010000,
"expiration": 1508580010000,
"customFields": [
{
"id": 123,
"value": "<string>"
}
],
"commissions": {
"preSplit": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
],
"split": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
],
"postSplit": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
]
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
transactionName: '123 Main St',
leadName: 'Bob',
assignedAgent: 100001,
transactionType: 'Purchase',
homePrice: 1000000,
transactionStatus: 'Pre-contract',
expectedCloseDate: 1508580010000,
closeDate: 1508580010000,
commissionRate: 3,
gci: 5000,
teamRevenue: 1000,
agentRevenue: 4000,
appointmentDate: 1508580010000,
agreementSignedDate: 1508580010000,
offerDate: 1508580010000,
contractDate: 1508580010000,
appraisalDate: 1508580010000,
homeInspectionDate: 1508580010000,
escrowDate: 1508580010000,
expiration: 1508580010000,
customFields: [{id: 123, value: '<string>'}],
commissions: {
preSplit: [
{
id: 123,
splitPayTo: 123,
splitPayToName: '<string>',
payTo: 123,
payToName: '<string>',
value: 123,
desc: '<string>'
}
],
split: [
{
id: 123,
splitPayTo: 123,
splitPayToName: '<string>',
payTo: 123,
payToName: '<string>',
value: 123,
desc: '<string>'
}
],
postSplit: [
{
id: 123,
splitPayTo: 123,
splitPayToName: '<string>',
payTo: 123,
payToName: '<string>',
value: 123,
desc: '<string>'
}
]
}
})
};
fetch('https://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}', 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://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}",
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([
'transactionName' => '123 Main St',
'leadName' => 'Bob',
'assignedAgent' => 100001,
'transactionType' => 'Purchase',
'homePrice' => 1000000,
'transactionStatus' => 'Pre-contract',
'expectedCloseDate' => 1508580010000,
'closeDate' => 1508580010000,
'commissionRate' => 3,
'gci' => 5000,
'teamRevenue' => 1000,
'agentRevenue' => 4000,
'appointmentDate' => 1508580010000,
'agreementSignedDate' => 1508580010000,
'offerDate' => 1508580010000,
'contractDate' => 1508580010000,
'appraisalDate' => 1508580010000,
'homeInspectionDate' => 1508580010000,
'escrowDate' => 1508580010000,
'expiration' => 1508580010000,
'customFields' => [
[
'id' => 123,
'value' => '<string>'
]
],
'commissions' => [
'preSplit' => [
[
'id' => 123,
'splitPayTo' => 123,
'splitPayToName' => '<string>',
'payTo' => 123,
'payToName' => '<string>',
'value' => 123,
'desc' => '<string>'
]
],
'split' => [
[
'id' => 123,
'splitPayTo' => 123,
'splitPayToName' => '<string>',
'payTo' => 123,
'payToName' => '<string>',
'value' => 123,
'desc' => '<string>'
]
],
'postSplit' => [
[
'id' => 123,
'splitPayTo' => 123,
'splitPayToName' => '<string>',
'payTo' => 123,
'payToName' => '<string>',
'value' => 123,
'desc' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}"
payload := strings.NewReader("{\n \"transactionName\": \"123 Main St\",\n \"leadName\": \"Bob\",\n \"assignedAgent\": 100001,\n \"transactionType\": \"Purchase\",\n \"homePrice\": 1000000,\n \"transactionStatus\": \"Pre-contract\",\n \"expectedCloseDate\": 1508580010000,\n \"closeDate\": 1508580010000,\n \"commissionRate\": 3,\n \"gci\": 5000,\n \"teamRevenue\": 1000,\n \"agentRevenue\": 4000,\n \"appointmentDate\": 1508580010000,\n \"agreementSignedDate\": 1508580010000,\n \"offerDate\": 1508580010000,\n \"contractDate\": 1508580010000,\n \"appraisalDate\": 1508580010000,\n \"homeInspectionDate\": 1508580010000,\n \"escrowDate\": 1508580010000,\n \"expiration\": 1508580010000,\n \"customFields\": [\n {\n \"id\": 123,\n \"value\": \"<string>\"\n }\n ],\n \"commissions\": {\n \"preSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"split\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"postSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"transactionName\": \"123 Main St\",\n \"leadName\": \"Bob\",\n \"assignedAgent\": 100001,\n \"transactionType\": \"Purchase\",\n \"homePrice\": 1000000,\n \"transactionStatus\": \"Pre-contract\",\n \"expectedCloseDate\": 1508580010000,\n \"closeDate\": 1508580010000,\n \"commissionRate\": 3,\n \"gci\": 5000,\n \"teamRevenue\": 1000,\n \"agentRevenue\": 4000,\n \"appointmentDate\": 1508580010000,\n \"agreementSignedDate\": 1508580010000,\n \"offerDate\": 1508580010000,\n \"contractDate\": 1508580010000,\n \"appraisalDate\": 1508580010000,\n \"homeInspectionDate\": 1508580010000,\n \"escrowDate\": 1508580010000,\n \"expiration\": 1508580010000,\n \"customFields\": [\n {\n \"id\": 123,\n \"value\": \"<string>\"\n }\n ],\n \"commissions\": {\n \"preSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"split\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"postSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"transactionName\": \"123 Main St\",\n \"leadName\": \"Bob\",\n \"assignedAgent\": 100001,\n \"transactionType\": \"Purchase\",\n \"homePrice\": 1000000,\n \"transactionStatus\": \"Pre-contract\",\n \"expectedCloseDate\": 1508580010000,\n \"closeDate\": 1508580010000,\n \"commissionRate\": 3,\n \"gci\": 5000,\n \"teamRevenue\": 1000,\n \"agentRevenue\": 4000,\n \"appointmentDate\": 1508580010000,\n \"agreementSignedDate\": 1508580010000,\n \"offerDate\": 1508580010000,\n \"contractDate\": 1508580010000,\n \"appraisalDate\": 1508580010000,\n \"homeInspectionDate\": 1508580010000,\n \"escrowDate\": 1508580010000,\n \"expiration\": 1508580010000,\n \"customFields\": [\n {\n \"id\": 123,\n \"value\": \"<string>\"\n }\n ],\n \"commissions\": {\n \"preSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"split\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"postSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"transactionName": "123 Main St",
"created": 1518078026000,
"updated": 1518078026000,
"transactionId": 10001,
"leadName": "Bob",
"assignedAgent": 100001,
"transactionType": "Purchase",
"homePrice": 1000000,
"transactionStatus": "Pre-contract",
"expectedCloseDate": 1508580010000,
"closeDate": 1508580010000,
"commissionRate": 3,
"gci": 5000,
"teamRevenue": 1000,
"agentRevenue": 4000,
"appointmentDate": 1508580010000,
"agreementSignedDate": 1508580010000,
"offerDate": 1508580010000,
"contractDate": 1508580010000,
"appraisalDate": 1508580010000,
"homeInspectionDate": 1508580010000,
"escrowDate": 1508580010000,
"expiration": 1508580010000,
"customFields": [
{
"id": 123,
"value": "<string>"
}
],
"commissions": {
"preSplit": [
{
"id": 123,
"splitPayType": "TEAM",
"splitPayTo": 123,
"splitPayToName": "<string>",
"payType": "TEAM",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"calculateType": "PERCENT",
"desc": "<string>"
}
],
"split": [
{
"id": 123,
"splitPayType": "TEAM",
"splitPayTo": 123,
"splitPayToName": "<string>",
"payType": "TEAM",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"calculateType": "PERCENT",
"desc": "<string>"
}
],
"postSplit": [
{
"id": 123,
"splitPayType": "TEAM",
"splitPayTo": 123,
"splitPayToName": "<string>",
"payType": "TEAM",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"calculateType": "PERCENT",
"desc": "<string>"
}
]
}
}"<string>""<string>""<string>""<string>"Path Parameters
Body
Transaction type. Case-sensitive; must be one of the supported values. Values not matching the team's configured pipeline types fall back silently to the first pipeline (typically 'Purchase / Pre-contract'); always pass a valid type to avoid this silent behavior.
Purchase, Listing, Lease, Other "Purchase"
Response
Transaction updated. The response is the merged transaction.
Transaction type. Case-sensitive; must be one of the supported values. Values not matching the team's configured pipeline types fall back silently to the first pipeline (typically 'Purchase / Pre-contract'); always pass a valid type to avoid this silent behavior.
Purchase, Listing, Lease, Other "Purchase"
curl --request PUT \
--url https://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"transactionName": "123 Main St",
"leadName": "Bob",
"assignedAgent": 100001,
"transactionType": "Purchase",
"homePrice": 1000000,
"transactionStatus": "Pre-contract",
"expectedCloseDate": 1508580010000,
"closeDate": 1508580010000,
"commissionRate": 3,
"gci": 5000,
"teamRevenue": 1000,
"agentRevenue": 4000,
"appointmentDate": 1508580010000,
"agreementSignedDate": 1508580010000,
"offerDate": 1508580010000,
"contractDate": 1508580010000,
"appraisalDate": 1508580010000,
"homeInspectionDate": 1508580010000,
"escrowDate": 1508580010000,
"expiration": 1508580010000,
"customFields": [
{
"id": 123,
"value": "<string>"
}
],
"commissions": {
"preSplit": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
],
"split": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
],
"postSplit": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
]
}
}
'import requests
url = "https://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}"
payload = {
"transactionName": "123 Main St",
"leadName": "Bob",
"assignedAgent": 100001,
"transactionType": "Purchase",
"homePrice": 1000000,
"transactionStatus": "Pre-contract",
"expectedCloseDate": 1508580010000,
"closeDate": 1508580010000,
"commissionRate": 3,
"gci": 5000,
"teamRevenue": 1000,
"agentRevenue": 4000,
"appointmentDate": 1508580010000,
"agreementSignedDate": 1508580010000,
"offerDate": 1508580010000,
"contractDate": 1508580010000,
"appraisalDate": 1508580010000,
"homeInspectionDate": 1508580010000,
"escrowDate": 1508580010000,
"expiration": 1508580010000,
"customFields": [
{
"id": 123,
"value": "<string>"
}
],
"commissions": {
"preSplit": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
],
"split": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
],
"postSplit": [
{
"id": 123,
"splitPayTo": 123,
"splitPayToName": "<string>",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"desc": "<string>"
}
]
}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
transactionName: '123 Main St',
leadName: 'Bob',
assignedAgent: 100001,
transactionType: 'Purchase',
homePrice: 1000000,
transactionStatus: 'Pre-contract',
expectedCloseDate: 1508580010000,
closeDate: 1508580010000,
commissionRate: 3,
gci: 5000,
teamRevenue: 1000,
agentRevenue: 4000,
appointmentDate: 1508580010000,
agreementSignedDate: 1508580010000,
offerDate: 1508580010000,
contractDate: 1508580010000,
appraisalDate: 1508580010000,
homeInspectionDate: 1508580010000,
escrowDate: 1508580010000,
expiration: 1508580010000,
customFields: [{id: 123, value: '<string>'}],
commissions: {
preSplit: [
{
id: 123,
splitPayTo: 123,
splitPayToName: '<string>',
payTo: 123,
payToName: '<string>',
value: 123,
desc: '<string>'
}
],
split: [
{
id: 123,
splitPayTo: 123,
splitPayToName: '<string>',
payTo: 123,
payToName: '<string>',
value: 123,
desc: '<string>'
}
],
postSplit: [
{
id: 123,
splitPayTo: 123,
splitPayToName: '<string>',
payTo: 123,
payToName: '<string>',
value: 123,
desc: '<string>'
}
]
}
})
};
fetch('https://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}', 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://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}",
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([
'transactionName' => '123 Main St',
'leadName' => 'Bob',
'assignedAgent' => 100001,
'transactionType' => 'Purchase',
'homePrice' => 1000000,
'transactionStatus' => 'Pre-contract',
'expectedCloseDate' => 1508580010000,
'closeDate' => 1508580010000,
'commissionRate' => 3,
'gci' => 5000,
'teamRevenue' => 1000,
'agentRevenue' => 4000,
'appointmentDate' => 1508580010000,
'agreementSignedDate' => 1508580010000,
'offerDate' => 1508580010000,
'contractDate' => 1508580010000,
'appraisalDate' => 1508580010000,
'homeInspectionDate' => 1508580010000,
'escrowDate' => 1508580010000,
'expiration' => 1508580010000,
'customFields' => [
[
'id' => 123,
'value' => '<string>'
]
],
'commissions' => [
'preSplit' => [
[
'id' => 123,
'splitPayTo' => 123,
'splitPayToName' => '<string>',
'payTo' => 123,
'payToName' => '<string>',
'value' => 123,
'desc' => '<string>'
]
],
'split' => [
[
'id' => 123,
'splitPayTo' => 123,
'splitPayToName' => '<string>',
'payTo' => 123,
'payToName' => '<string>',
'value' => 123,
'desc' => '<string>'
]
],
'postSplit' => [
[
'id' => 123,
'splitPayTo' => 123,
'splitPayToName' => '<string>',
'payTo' => 123,
'payToName' => '<string>',
'value' => 123,
'desc' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}"
payload := strings.NewReader("{\n \"transactionName\": \"123 Main St\",\n \"leadName\": \"Bob\",\n \"assignedAgent\": 100001,\n \"transactionType\": \"Purchase\",\n \"homePrice\": 1000000,\n \"transactionStatus\": \"Pre-contract\",\n \"expectedCloseDate\": 1508580010000,\n \"closeDate\": 1508580010000,\n \"commissionRate\": 3,\n \"gci\": 5000,\n \"teamRevenue\": 1000,\n \"agentRevenue\": 4000,\n \"appointmentDate\": 1508580010000,\n \"agreementSignedDate\": 1508580010000,\n \"offerDate\": 1508580010000,\n \"contractDate\": 1508580010000,\n \"appraisalDate\": 1508580010000,\n \"homeInspectionDate\": 1508580010000,\n \"escrowDate\": 1508580010000,\n \"expiration\": 1508580010000,\n \"customFields\": [\n {\n \"id\": 123,\n \"value\": \"<string>\"\n }\n ],\n \"commissions\": {\n \"preSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"split\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"postSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
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.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"transactionName\": \"123 Main St\",\n \"leadName\": \"Bob\",\n \"assignedAgent\": 100001,\n \"transactionType\": \"Purchase\",\n \"homePrice\": 1000000,\n \"transactionStatus\": \"Pre-contract\",\n \"expectedCloseDate\": 1508580010000,\n \"closeDate\": 1508580010000,\n \"commissionRate\": 3,\n \"gci\": 5000,\n \"teamRevenue\": 1000,\n \"agentRevenue\": 4000,\n \"appointmentDate\": 1508580010000,\n \"agreementSignedDate\": 1508580010000,\n \"offerDate\": 1508580010000,\n \"contractDate\": 1508580010000,\n \"appraisalDate\": 1508580010000,\n \"homeInspectionDate\": 1508580010000,\n \"escrowDate\": 1508580010000,\n \"expiration\": 1508580010000,\n \"customFields\": [\n {\n \"id\": 123,\n \"value\": \"<string>\"\n }\n ],\n \"commissions\": {\n \"preSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"split\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"postSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v1.0/leads/{leadId}/transaction/{transactionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"transactionName\": \"123 Main St\",\n \"leadName\": \"Bob\",\n \"assignedAgent\": 100001,\n \"transactionType\": \"Purchase\",\n \"homePrice\": 1000000,\n \"transactionStatus\": \"Pre-contract\",\n \"expectedCloseDate\": 1508580010000,\n \"closeDate\": 1508580010000,\n \"commissionRate\": 3,\n \"gci\": 5000,\n \"teamRevenue\": 1000,\n \"agentRevenue\": 4000,\n \"appointmentDate\": 1508580010000,\n \"agreementSignedDate\": 1508580010000,\n \"offerDate\": 1508580010000,\n \"contractDate\": 1508580010000,\n \"appraisalDate\": 1508580010000,\n \"homeInspectionDate\": 1508580010000,\n \"escrowDate\": 1508580010000,\n \"expiration\": 1508580010000,\n \"customFields\": [\n {\n \"id\": 123,\n \"value\": \"<string>\"\n }\n ],\n \"commissions\": {\n \"preSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"split\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ],\n \"postSplit\": [\n {\n \"id\": 123,\n \"splitPayTo\": 123,\n \"splitPayToName\": \"<string>\",\n \"payTo\": 123,\n \"payToName\": \"<string>\",\n \"value\": 123,\n \"desc\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"transactionName": "123 Main St",
"created": 1518078026000,
"updated": 1518078026000,
"transactionId": 10001,
"leadName": "Bob",
"assignedAgent": 100001,
"transactionType": "Purchase",
"homePrice": 1000000,
"transactionStatus": "Pre-contract",
"expectedCloseDate": 1508580010000,
"closeDate": 1508580010000,
"commissionRate": 3,
"gci": 5000,
"teamRevenue": 1000,
"agentRevenue": 4000,
"appointmentDate": 1508580010000,
"agreementSignedDate": 1508580010000,
"offerDate": 1508580010000,
"contractDate": 1508580010000,
"appraisalDate": 1508580010000,
"homeInspectionDate": 1508580010000,
"escrowDate": 1508580010000,
"expiration": 1508580010000,
"customFields": [
{
"id": 123,
"value": "<string>"
}
],
"commissions": {
"preSplit": [
{
"id": 123,
"splitPayType": "TEAM",
"splitPayTo": 123,
"splitPayToName": "<string>",
"payType": "TEAM",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"calculateType": "PERCENT",
"desc": "<string>"
}
],
"split": [
{
"id": 123,
"splitPayType": "TEAM",
"splitPayTo": 123,
"splitPayToName": "<string>",
"payType": "TEAM",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"calculateType": "PERCENT",
"desc": "<string>"
}
],
"postSplit": [
{
"id": 123,
"splitPayType": "TEAM",
"splitPayTo": 123,
"splitPayToName": "<string>",
"payType": "TEAM",
"payTo": 123,
"payToName": "<string>",
"value": 123,
"calculateType": "PERCENT",
"desc": "<string>"
}
]
}
}"<string>""<string>""<string>""<string>"