Search proposals
Use the searchProposals method via JSON-RPC APIv6 to find a specific proposal or quote.
Request parameters
sessionId
Required (string)
Unique 2Checkout session ID code.
Name
Optional (string)
Proposal name.
Email
Optional (string)
The bill to or sell to email.
CreatedBy
Optional (string)
The unique external system user identifier.
ModifiedBy
Optional (string)
The unique external system user identifier.
Source
Optional (string)
The source from where the proposal was created.
CreatedAfter
Optional (string)
The UTC date and time in ISO 8601 format.
CreatedBefore
Optional (string)
The UTC date and time in ISO 8601 format.
ModifiedAfter
Optional (string)
The UTC date and time in ISO 8601 format.
ModifiedBefore
Optional (string)
The UTC date and time in ISO 8601 format.
Locked
Optional (boolean)
Retrieve proposals that are locked or not. Possible values:
True
False
Offset
Required (integer)
The offset at which the proposals should be returned. Default value: 0.
Limit
Required (integer)
The maximum number of proposals to return. Default value: 10.
LinkId
Optional (string)
The link id for any status.
Request sample
<?php
require ('PATH_TO_AUTH');
$searchParameters = new stdClass();
$searchParameters->Name = "My Proposal Name";
$searchParameters->Email = "example@email.com";
$searchParameters->CreatedBy = "createUser";
$searchParameters->ModifiedBy = "modifyUser";
$searchParameters->Source = "MERCHANT_API";
$searchParameters->CreatedAfter = "2020-01-01T00:00:00+00:00";
$searchParameters->CreatedBefore = "2020-12-31T23:59:59+00:00";
$searchParameters->ModifiedAfter = "2020-01-01T00:00:00+00:00";
$searchParameters->ModifiedBefore = "2020-12-31T23:59:59+00:00";
$searchParameters->Locked = false;
$searchParameters->Offset = 0;
$searchParameters->Limit = 10;
$jsonRpcRequest = new stdClass();
$jsonRpcRequest->jsonrpc = '2.0';
$jsonRpcRequest->method = 'searchProposals';
$jsonRpcRequest->params = array($sessionID, $searchParameters);
$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;
}Response
The searchProposals call via JSON-RPC APIv6 returns a list of Proposal objects.
Last updated
Was this helpful?