Skip to main content

Search proposals

Last updated: 08-Jul-2020
Rate this article:

Overview

Use the searchProposals method via JSON-RPC APIv6 to find a specific proposal or quote.

Request parameters

Request parameters for the searchProposal method via JSON-RPC APIv6
Parameters Type Required/Optional Description
sessionId String Required Unique 2Checkout session ID code.
Name String Optional Proposal name.
Email String Optional The bill to or sell to email.
CreatedBy String Optional The unique external system user identifier.
ModifiedBy String Optional The unique external system user identifier.
Source String Optional The source from where the proposal was created.
CreatedAfter String Optional The UTC date and time in ISO 8601 format.
CreatedBefore String Optional The UTC date and time in ISO 8601 format.
ModifiedAfter String Optional The UTC date and time in ISO 8601 format.
ModifiedBefore String Optional The UTC date and time in ISO 8601 format.
Locked Boolean Optional

Retrieve proposals that are locked or not.

Possible values:

  • True
  • False
Offset Integer Required The offset at which the proposals should be returned. Default value: 0.
Limit Integer Required The maximum number of proposals to return. Default value: 10.
LinkId String Optional 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.

Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo