GetRelatedProducts

From Wiki

Jump to: navigation, search

The 'getRelatedProducts' API request will return the related products based on conditions given.

Parameters


Element

Type

iProductId optional

The current product ID

Value Type: int

iBrandId optional

The brand to relate to

Value Type: int

iCategoryId optional

The category to relate to

Value Type: int

iAdult optional

Allow adult content

Value Type: int

iLimit optional

The number of products to return

Min: 0 Max: 100 Value Type: int

iScale optional

Percentage of the price to increase/decrease when obtaining related products

Value Type: int

sColumnToReturn optional

Columns to return with each product. By default only required columns are returned. Add as many columns as you require from the Product_PSAPI data type to your API call to get more data.

Value Type: string/array
Example: array('sBrand','sDescription')


Response


oProduct

Objects for any returned products

Value Type: Product

iTotalCount

Total count of products found

Value Type: int


Example Request (parameters)


$aParams11 = array('iProductId'	=> 25483279, 'iLimit' => 3);

$oResponse = $oClient->call('getProductList', $aParams11);


Example Response


stdClass Object
(
    [oProduct] => Array
        (
            [0] => stdClass Object
                (
                    [iId] => 45435
                    [iCategoryId] => 245
                    [iMerchantId] => 205
                    [iAdult] => 0
                    [sName] => Schumann Orchestral Works Otto Ackermann Benno Moiseiwitsch
                    [sAwDeepLink] => ...
                    [sAwThumbUrl] => http://images.productserve.com/thumb/205/45435.jpg
                    [fPrice] => 11.29
                )

            [1] => stdClass Object
                (
                    [iId] => 3074352531
                    [iCategoryId] => 198
                    [iMerchantId] => 3040
                    [iAdult] => 0
                    [sName] => Gina Bacconi Chiffon Dress & Jacket
                    [sAwDeepLink] => ...
                    [sAwThumbUrl] => http://images.productserve.com/thumb/3040/3074352531.jpg
                    [fPrice] => 290
                )

            [2] => stdClass Object
                (
                    [iId] => 3061708233
                    [iCategoryId] => 198
                    [iMerchantId] => 3040
                    [iAdult] => 0
                    [sName] => Gray & Osbourn Beaded Georgette Dress
                    [sAwDeepLink] => ...
                    [sAwThumbUrl] => http://images.productserve.com/thumb/3040/3061708233.jpg
                    [fPrice] => 135
                )

        )

    [iTotalCount] => 1341421
)

Privacy

Due to new European legislation regarding how websites store information about you, AWIN is updating its privacy policy. You can see the new version of our policy here. If you would like to see the information we capture on this website, please click here for further details. In order to accept cookies on this site please click the 'I ACCEPT' button