Retrieve product price
Get the price for a product in a new purchase scenario, based on the product ID, the pricing list it's assigned to and specific pricing options.
Request parameters
sessionID
Required (string) Session identifier, which is the output of the Login method. An exception will be thrown if the values are incorrect.
productId
Required (string) The unique identifier of the product from your system.
pricingListCode
Required (string) The unique identifier of the pricing list.
priceOptions
Optional (stringArray) Array of pricing option codes. These identifiers mark the individual options inside pricing options configuration groups. Can be NULL.
Request sample
<?php
require('PATH_TO_AUTH'); // Authentication example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/02Authentication
require('PATH_TO_setPartner'); // setPartner example: https://knowledgecenter.avangate.com/Integration/Channel_Manager_API/SOAP/06Reference/Partner/00Set_partner
$productId = 'YOUR_PRODUCT_ID';
$pricingListCode = 'YOUR_PRICING_LIST_CODE';
$priceOptions = array(
'Pricing_options_group_code1',
'Pricing_options_group_code2'
);
try {
$ProdPrice= $client->getProductPrice($sessionID, $productId, $pricingListCode, $priceOptions);
} catch (SoapFault $e) {
echo "ProductUnitPrice: " . $e->getMessage();
exit;
}Response parameters
UnitPrice
Object
Errors
INVALID_PARTNER
No partner is set.
PRODUCT_ERROR
Invalid product ID.
PARTNER_PRICING_LISTS_NOT_FOUND
There are no pricing lists with the provided code.
PRODUCT_NOT_FOUND
There is no active product with the provided ID in the given pricing list.
Last updated
Was this helpful?