Retrieve price matrix for product
Last updated: 12-Nov-2020
Rate this article:
Overview
Use the GetPriceMatrix API call to retrieve details that are used to add or update a special price promotion.
Request parameters
| Paremeters | Type | Required | Description |
|---|---|---|---|
| sessionID | String | Required | The unique identifier of the session. |
| PriceMatrixRequest | Array of Objects | Required | Contains details that are used to add or update a special price promotion. |
|
PriceMatrixRequestObject |
Object | Required | |
|
ProductCode |
String | Required | Product code for the price matrix. |
|
PricingConfigurationCode |
String | Required | Pricing configuration code for the price matrix, must be related to the product. |
Response
| Parameters | Type | Description |
|---|---|---|
| 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 | ISO currency code. |
Request sample
<?php
require('PATH_TO_AUTH');
$priceMatrixRequestObject1 = new stdClass;
$priceMatrixRequestObject1->productCode = "474FF7C0FD"
$priceMatrixRequestObject1->pricingConfigurationCode = "514EE48419"
$requestBody = [
$priceMatrixRequestObject1
]
try {
$priceMatrix = $client->addPromotion($sessionID, $requestBody);
} catch (SoapFault $e) {
echo "NewPromotion: " . $e->getMessage();
exit;
}
var_dump("Promotion", $priceMatrix);
Rate this article: