Update proposal
Request parameters
Parameter
Type / Description
Request sample
<?php
require ('PATH_TO_AUTH');
$proposalID = "0573e71d-38bb-4d61-88ca-b3c557517c68";
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'getProposalById';
$jsonRpcRequest->params = array($sessionID, $proposalID);
$jsonRpcRequest->id = $i++;
try {
$result = callRPC($jsonRpcRequest, $host);
}
catch (SoapFault $e) {
echo "Could not fetch proposal: " . $e->getMessage();
exit;
}
$result->Name = "Updated proposal name";
$result->UserId = "myuser";
$result->BillTo->FirstName = "Billing Contact first name";
$result->BillTo->LastName = "Billing Contact last name";
$result->BillTo->Email = "[email protected]";
$result->BillTo->Country = "US";
$result->BillTo->State = "California";
$result->BillTo->City = "San Francisco";
$result->BillTo->Address = "Street name No. 9 San Francisco, California";
$result->SellTo->FirstName = "Contact first name";
$result->SellTo->LastName = "Contact last name";
$result->SellTo->Email = "[email protected]";
$result->SellTo->Country = "US";
$result->SellTo->State = "California";
$result->SellTo->vatCode = "85421564";
$result->SellTo->City = "San Francisco";
$result->SellTo->Address = "Street name No. 5 San Francisco, California";
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'updateProposal';
$jsonRpcRequest->params = array($sessionID, $result);
$jsonRpcRequest->id = $i++;
try {
$result = callRPC($jsonRpcRequest, $host);
echo "Proposal: </br>",
var_dump($result);
}
catch (SoapFault $e) {
echo "Could not fetch proposal: " . $e->getMessage();
exit;
}Request sample with prorationDate
Request sample with vatCode
Request sample with TaxExemptionId
Response
Last updated
Was this helpful?