Retrieve price matrix for product
Use the GetPriceMatrix API call to retrieve details that are used to add or update a special price promotion.
Request parameters
sessionID
Required (string)
The unique identifier of the session.
PriceMatrixRequest
Required (array of objects)
Contains details that are used to add or update a special price promotion.
PriceMatrixRequestObject
Required (object)
ProductCode
Required (string) Product code for the price matrix.
PricingConfigurationCode
Required (string)
Pricing configuration code for the price matrix, must be related to the product.
Request sample
<?php
require('PATH_TO_AUTH');
$priceMatrixRequestObject1 = new stdClass;
$priceMatrixRequestObject1->productCode = "474FF7C0FD"
$priceMatrixRequestObject1->pricingConfigurationCode = "514EE48419"
$requestBody = [\
$priceMatrixRequestObject1\
]
$promotionObject->PriceMatrix = [$priceMatrixDefinition1];
$jsonRpcRequest = array (
'jsonrpc' => '2.0',
'id' => $i++,
'method' => 'getPriceMatrix',
'params' => array($sessionID, $requestBody),
);
$result = callRPC((object)$jsonRpcRequest, $host);
var_dump($result);Response parameters
PriceMatrix
Array of objects
Only for this type of promotion. It is generated by getPriceMatrix and used to set promotion special prices.
ProductCode
String
Product code for the price matrix.
PricingConfigurationCode
String
Pricing configuration code for the price matrix, must be related to the product.
OptionHash
String
Unique identifier of one combination of price configuration options.
Options
Array of objects
Describes price configuration options identified by OptionHash.
GroupName
String
OptionText
String
Prices
Array of objects Promotion prices by currency, price for default currency is required.
Value
Int
Decimal.
Currency
String
SO currency code.
Last updated
Was this helpful?