Support Forum [ All Topics | New Topic ]

Thread: Price Api not giving Output with Shape Asscher

I am not getting api response of Price list when shape is other that Round and Pear, pleae help with below issue and resaon for same

my current sample code as below

$rap_soapUrl = "";
$soap_Client = new nusoap_client($rap_soapUrl, 'wsdl');
$rap_credentials['Username'] = "xxxxx";
$rap_credentials['Password'] = "xxx";
//do login, and save authentication ticket for further use:
$result = $soap_Client->call('Login', $rap_credentials);
$rap_auth_ticket = $soap_Client->getHeaders();
//get complete price sheet, and save as a file (call this both for Round and Pear):
$paramsB["shape"] = "Asscher";
$result = $soap_Client->call('GetPriceSheet', $paramsB);
echo "Xxxx".count($result['GetPriceSheetResult']['Prices']['diffgram']['NewDataSet']['Table']);
echo "<pre>";
echo "</pre>";
$file=fopen("round_prices.csv","w+") or exit("Unable to open file!");
for ($i=0; $i<count($result['GetPriceSheetResult']['Prices']['diffgram']['NewDataSet']['Table']);$i++ ){
$curLine = "";
$curLine .= $result['GetPriceSheetResult']['!Date'];
$curLine .= "," . $result['GetPriceSheetResult']['!Shape'];
$curLine .= "," . $result['GetPriceSheetResult']['Prices']['diffgram']['NewDataSet']['Table'][$i]['LowSize'];
$curLine .= "," . $result['GetPriceSheetResult']['Prices']['diffgram']['NewDataSet']['Table'][$i]['LowSize'];
$curLine .= "," . $result['GetPriceSheetResult']['Prices']['diffgram']['NewDataSet']['Table'][$i]['Color'];
$curLine .= "," . $result['GetPriceSheetResult']['Prices']['diffgram']['NewDataSet']['Table'][$i]['Clarity'];
$curLine .= "," . $result['GetPriceSheetResult']['Prices']['diffgram']['NewDataSet']['Table'][$i]['Price'];
fwrite($file, $curLine.PHP_EOL);

>> add a comment
01/13/2019 08:44

1 Replies:

Thank you for contacting TechNet support forum.

The only valid shape values are Round or  Pear, as there are two price lists..
This is explained here in TechNet

"What diamonds are the price lists for and based on?
Round shaped diamonds Pear shaped diamonds. The 'pear shape price list' is often used as a price guideline for other fancy shapes. Well-shaped, fine-cut diamonds. Not for fancy colored diamonds. Diamonds of 1-10 carat size. For 6+ carat diamonds, dealers generally base prices on 10 carat price listings. The Rapaport Price List for round diamonds is the most widely used list. This list is used for round shaped diamonds as well as old European cuts."

>> add a comment
Tech customer support - Zalman
1/14/2019 12:07:00 PM