Documentation

GET Service

Access millions of products with our product web services. You can use the product web services to run queries on the product data, download the category structure of a shop, get a list of all accessible shops and their offers, and much more.

SearchProducts

This method can be used to search individual shops for products. It is also possible to search within the products of all shops, with which you have a partnership.

Endpoint

https://product-api.affili.net/V3/productservice.svc/{XML|JSON}/SearchProducts

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php

// Set webservice endpoint (JSON)
$service = "https://product-api.affili.net/V3/productservice.svc/JSON/SearchProducts";

// If you want to get the response in XML use the following service url
$serviceXML = "https://product-api.affili.net/V3/productservice.svc/XML/SearchProducts";

// Set credentials
$params['PublisherId'] = ''; // your publisher ID
$params['Password'] = ''; // your product web services password

// Narrow down results to specific Shops (optional)
$params['ShopIds'] = ''; // enter one or more shop Ids as comma separated list. You can use "GetShopList" to receive Shop Ids
$params['ShopIdMode'] = 'Include';

/**
 * Narrow down by Query, CategoryIds or FilterQueries (on of the three must be set)
 *
 * Query
 * Use search operators AND, OR, NOT (in capital letters) for better results
 * Use "" for an exact match
 * Use () to group expressions
 * Use wildcard * for suffix matching, e.g. 'bott*' will match bottle or bottom
 * Example: "apple ipod" ((touch OR classic) NOT nano) AND "32 GB"
 */
$params['Query'] = 'ipod'; //

/**
 * CategoryIds
 * The Ids of the categories you wish to restrict the search on. Whether the Ids are to be interpreted as shop categories
 * or as affilinet categories can be specified by using the parameter "UseAffilinetCategories".
 * You can receive shop categories using "GetCategoryList".
 */
$params['CategoryIds'] = '1,4,13';
$params['UseAffilinetCategories'] = 'true';
$params['ExcludeSubCategories'] = 'false';

/**
 * Facet fields
 * With this parameter, you can specify, what facets shall be created out of the search results (e.g. "Brand", "ShopId",
 * "AffilinetCategoryPath" or "Property_Size"). See PDF documentation for a full list.
 */
$params['FacetFields'] = 'ShopId,ShopName';
$params['FacetValueLimit'] = 5;

// Page settings
$params['CurrentPage'] = 1;
$params['PageSize'] = 20;
$params['SortBy'] = 'Score';
$params['SortOrder'] = 'descending';

// Set further parameters
$params['ImageScales'] = 'Image90,Image180';
$params['LogoScales'] = 'Logo90,Logo150';
$params['WithImageOnly'] = 'true';
$params['MinimumPrice'] = 0;
$params['MaximumPrice'] = 0;

// Put together request
$request = $service . "?" . http_build_query($params);

/**
 * Filter Queries (FQ)
 * With the FilterQuery functionality, you can restrict the search results to those products that have a certain value (e.g. "Sony") in a certain data field (e.g. "Brand"). You can define up to 15 FilterQueries at the same time.
 * The fields and values must be URL encoded.
 */
$filterQuery = "&fq=" . urlencode("Brand:Apple") . "&fq=" . urlencode("Manufacturer:Apple");

// Append filter query to GET request
$request .= $filterQuery;

// Get response
$response = file_get_contents($request, true);

/*
Please note: the JSON output begins with a byte order mark (BOM).
If you run into problems while parsing the JSON response, try removing the BOM first.
*/
if(substr($response,0,3) == pack("CCC", 0xEF,0xBB,0xBF)) {
    $response = substr($response,3);
}

// Show response
print_r($response);
        

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

Password required

The product web service password of the requesting publisher.

ShopIds

A comma separated list of Shop Ids. Lets you restrict the search results to only those of the specified shops. If you specify a ShopId with which you don’t have a partnership this ShopId is ignored.

Please note the difference between ShopId and ProgramId: each program (= advertiser) has one ProgramId, but might have more than one ShopId, e.g. if the program supplies its electronics products separately from its clothing products.

If one of the specified Shop Ids is 0 the search is performed across all shops with which the requesting publisher has an accepted partnership, other specified ShopIds are then ignored in this request.

Limit: Up to 500 Shop Ids can be specified.

ShopIdMode

Specifies the logic that shall be applied to the list of shops which is specified in ShopIds. Valid values are:

  • Include
  • Exclude

If you choose Include, then products are only returned if they come from any of the shops specified in ShopIds.

If you choose Exclude, then products are not returned if they come from any of the shops specified in ShopIds.

If ShopIds is not set ShopIdMode will be ignored.

Default: Include (if ShopIds is set)

Query

The keyword(s) you want the products to match. Can be any length. The following search operators are supported:

  • AND (both query tokens must be contained in the product, but not necessarily next to one another)
  • OR (any of the query tokens must be contained in the product)
  • NOT (e.g. with “ipod AND NOT nano”, you will get products, which match the query “ipod”, but at the same time don’t match “nano”)
  • (phrase match: all query tokens enclosed with double quotes must be contained in the found products in that order)
  • () (Parentheses, to group expressions)

The wildcard * is supported for suffix matching, that is: a query bott* will match products that contain the word "bottle" or the word "bottom".

Search operators AND, OR and NOT must be in capital letters.

Example: "apple ipod" ((touch OR classic) NOT nano) AND "32 GB"

CategoryIds

A comma separated list Category Ids you wish to restrict the search on. Whether the specified Ids are to be interpreted as shop categories or as affilinet categories, must be specified with the parameter UseAffilinetCategories.

Limit: Up to 100 Category Ids can be defined per request.

UseAffilinetCategories

Here you can define, whether the Ids given in CategoryIds are to interpreted as affilinet category Ids or shop category Ids. Valid values are:

  • true
  • false

Default: If this parameter is not set, but CategoryIds is, then false is assumed (that is: we assume that the Category Ids are shop categories). If CategoryIds is not set this parameter is ignored.

ExcludeSubCategories

If this parameter is set to “true”, then only those products are returned, that are assigned to any of the categories specified in CategoryIds. If it is set to false, then products are returned, which are assigned to any of the categories specified in CategoryIds or any of their direct or indirect sub categories. Valid values are:

  • true
  • false

Default: If this parameter is not set, but CategoryIds is, then false is assumed (that is: by default, we search including subcategories). If CategoryIds is not set this parameter is ignored.

WithImageOnly

Valid values are:

  • true
  • false

By setting this parameter to true, you can limit the search results to products, for which we successfully downloaded an image from the advertiser. With false you search across all products, regardless of their product image.

Default: false

ImageScales

A comma separated list of the standard image size variants you want to obtain for the products. This comma separated list has the following valid values:

  • NoImage
  • Image30
  • Image60
  • Image90
  • Image120
  • Image180
  • OriginalImage

If no image scale is specified, then the product gets delivered with no image information.

You cannot specify the same Image Scale value more than once.

LogoScales

A comma separated list of the standard logo size variants of the shops that provide the products. This comma separated list has the following valid values:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468

If no logo name is specified, then the product gets delivered with no logo.

You cannot specify the same Logo Scale value more than once.

CurrentPage

States which page should be displayed. Must be an integer greater than 0.

Default: 1

PageSize

States the size of a result page. Must be an integer between 1 and 500.

Default: 10 (if not specified or 0)

MinimumPrice

Minimum price in the search results (not including shipping costs).

Must be a decimal, 0 or greater. Decimal separator must be . (dot), thousand separators are not allowed.

Default: 0

MaximumPrice

Maximum price in the search results (not including shipping costs).

Must be a decimal, 0 or greater. Decimal separator must be . (dot), thousand separators are not allowed.

Has to be bigger than MinimumPrice, if both parameters are specified.

If not specified, then no upper price limit is applied.

SortBy

Lets you define along which criteria the search results are sorted. Valid values are:

  • Score (a.k.a. rank, relevance)
  • Price (excluding shipping)
  • ProductName
  • LastImported (relates to the last update of this product's shop which is not necessarily the last update of this specific product)

Default: Score. Products with the same score will be sorted by LastImported.

SortOrder

Lets you specify by what order the search results are sorted. Valid values are:

  • ascending
  • descending

Default: descending

FacetFields

A comma separated list of product data fields. With this parameter, you can specify, what facets shall be created out of the search results. Please note the chapter about faceting.

Facets can be built over the following data fields (though not all of them are recommended for faceting, see chapter about faceting.)

  • AffilinetCategoryId
  • AffilinetCategoryPathFacet
  • ArticleNumber
  • Brand
  • Distributor
  • EAN
  • Manufacturer
  • ProgramId
  • Property_*
  • ShopCategoryId
  • ShopCategoryPathFacet
  • ShopId
  • ShopName

Limit: In each request, up to 4 facet fields can be specified.

FacetValueLimit

Lets you specify, how many values you want to receive per facet. Must be an integer between 1 and 50

Default: 10

FQ

A set of additional filter criteria. Please note the chapter about filter queries.

The fields and values must be URL encoded.

Limit: In each request, up to 15 filter queries can be specified.

Syntax: ...&fq=field1:value1&fq=field2:value2&fq=field3:value3,...

Alternative syntax: ...&fq=field1:value1,field2:value2,field3:value3&...

Example: ...&fq=brand:Hitachi&fq=property_size:3.5%22&fq=property_interface:USB%203.0&...

Response

SearchProductsResponse
Name Type Description
ProductsSummary ProductsSummary

General information on the found products.

Products Array of Product

The list of products which match the given search parameters.

Limit: a maximum of 10.000 products is returned in this array (across all pages)

Facets Array of Product

Facet information on the search results. Empty if SearchProductsRequest.FacetFields was empty.

ProductsSummary
Name Type Description
Records Integer

The amount of products on this page.

TotalRecords Integer

The total amount of products, which match the given criteria (across all pages).

TotalPages Integer

The amount of pages, which hold the found products.

CurrentPage Integer

The number of the page of this search result.

Product
Name Type Description
ArticleNumber String

The identifier of this product as supplied by the advertiser. Not necessarily unique throughout the affilinet platform. Filled for all products.

LastShopUpdate DateTime

The timestamp when the product list, to which this product belongs, was last imported. Filled for all products.

LastProductChange DateTime

The timestamp when this product has last been changed.

Score Integer

This number represents the accuracy, with which this product matches the given query terms. If no query keywords were specified, all returned products match the given search criteria equally, therefore 0 is returned for all products. Filled for all products.

ProductId Integer

The identifier of this product, unique throughout the affilinet platform. Filled for all products.

ShopId Integer

The ID of the product list, to which this product belongs. Not to be mistaken with ProgramId: each advertiser has one ProgramId, but can have any number of ShopIds - e.g. one for its full product feed and a different one for the top seller feed. Filled for all products.

ShopTitle String

The name of the product list, to which this product belongs.

ProductName String

The title of the product.

Description String

The full description of the product.

DescriptionShort String

A short description of the product.

ShopCategoryId Integer

Advertisers provide us with products including the information, to which category of the shop category tree the product belongs. This category receives its own unique category ID in our system. This field returns that ID. If the advertiser fails to provide us with a category, then this parameter returns '0'. Filled for all products.

AffilinetCategoryId Integer

Affilinet has its own category tree. We try to map each product to a category in that tree. So each product comes with the advertiser's category AND the affilinet category. If we were unable to map the product to our tree, then AffilinetCategoryId is 0. Filled for all products.

ShopCategoryPath String

The label of each shop category which lies on the path from the ShopCategoryId to the root of the shop category tree, separated by ' > ' (e.g. "Electronics > Home Entertainment > TV"). If the advertiser fails to provide us with a category, then this parameter returns NULL.

AffilinetCategoryPath String

The label of each affilinet category which lies on the path from the AffilinetCategoryId to the root of the affilinet category tree, separated by ' > ' (e.g. "Electronics > Home Entertainment > TV"). If we were unable to map the product to our tree, then this parameter returns NULL.

ShopCategoryIdPath String

The Id of each shop category which lies on the path from the root of the shop category tree to the ShopCategoryId of the product. The category Ids are separated by ' > ' (e.g. "123456 > 987654 > 159159"). If the advertiser fails to provide us with a category, then this parameter returns NULL.

AffilinetCategoryIdPath String

The Id of each affilinet category which lies on the path from the AffilinetCategoryId to the root of the affilinet category tree. The category Ids are separated by ' > ' (e.g. "123456 > 987654 > 159159"). If we were unable to map the product to our tree, then this parameter returns NULL.

Availability String

Currently not in use.

DeliveryTime String

Currently not in use.

Deeplink1 String

The URL, which takes you to the detail page of the shop to display this product. Filled for all products.

Deeplink2 String

The URL, through which you not only reach the detail page of this product on the shop site, but this product is at the same time added to the customer's shopping cart (not available for all shops).

Brand String

The brand of the product.

Manufacturer String

The manufacturer of the product (e.g. for mobile phones, the manufacturer sometimes differs from the brand).

Distributor String

The distributor of the product, normally only specified for books, DVDs and CDs.

EAN String

The European Article Number or Global Trade Item Number GTIN of the product.

Keywords String

Optional keywords, which the advertiser specified to characterise this product.

PriceInformation array of PriceInformation

This element contains various pieces of information regarding the price of this product (e.g. the current price, the old price, the base price,...). Filled for all products.

Images array of ImageCollection

This element contains all images of the product in the sizes which you specified in the parameter "ImageScale" in the SearchProductsRequest. Filled for all products if requested in SearchProductsRequest.ImageScales.

Logos array of Logo

This element contains all shop logos of the provider of this product in the sizes which you specified in the parameter "LogoScales" of the SearchProductsRequest. Filled for all products if requested in SearchProductsRequest.LogoScales.

Properties array of Property

For details check the chapter product properties

ProgramId Integer

The Id of the program, to which this ShopId belongs.

PriceInformation
Name Type Description
Currency String

Three characters indicating the currency for the product price. Currently, this can be either EUR or GBP. Filled for all products.

DisplayPrice String

This is the ready-to-use string to display the price. E.g. "For a limited time only 15.99 GBP plus shipping". Filled for all products.

DisplayShipping String

This is the ready-to-use string to display the shipping cost of this item. E.g. "Only 6.99 GBP except for overseas shipping".

DisplayBasePrice String

This is the ready-to-use string to display the price of this product calculated on a base measure. E.g. "27.98 GBP per kg".

PriceDetails array of PriceDetails

This element displays detailed information on the price of this product. Filled for all products.

ShippingDetails array of ShippingDetails

This element displays detailed information on the shipping cost of this product.

BasePriceDetails array of BasePriceDetails

This element displays detailed information on the price of this product calculated on a base measure (e.g. per kg, per litre etc.).

PriceDetails
Name Type Description
PriceOld Decimal

Former price of this product, as specified by the advertiser.

PricePrefix String

A string to be displayed before the actual price figure (e.g. "From").

Price Decimal

The price of this product in numerical presentation (e.g. 19.99). Filled for all products.

PriceSuffix String

A string to be displayed after the actual price figure (e.g. "incl. shipping").

ShippingDetails
Name Type Description
ShippingPrefix String

A string to be displayed before the actual shipping cost figure (e.g. "From").

Shipping Decimal

The shipping cost of this product in numerical presentation (e.g. 4.99).

ShippingSuffix String

A string to be displayed after the actual shipping cost figure (e.g. "except channel islands").

BasePriceDetails
Name Type Description
BasePricePrefix String

A string to be displayed before the actual price of this product calculated on a base measure (e.g. "From").

BasePrice Decimal

The price of this product calculated on a base measure in numerical presentation (e.g. 14.99).

BasePriceSuffix String

A string to be displayed after the actual price of this product calculated on a base measure (e.g. "depending on capacity").

ImageCollection
Name Type Description
ImageCollection array of Image

Each image we have for a product is returned in an ImageCollection in the desired sizes. Filled for all products if requested in SearchProductsRequest.ImageScales.

Image
Name Type Description
ImageScale Enum

The name of the image size variant. Filled for all products. Possible values are:

  • NoImage
  • Image30
  • Image60
  • Image90
  • Image120
  • Image180
  • OriginalImage
URL String

The URL where to obtain this image. Filled for all products.

Width Integer

The width of this image in pixels.

Height Integer

The height of this image in pixels.

Logo
Name Type Description
LogoScale Enum

The name of the logo size variant. Filled for all products. Possible values are:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468
URL String

The URL where to obtain this logo. Filled for all products.

Width Integer

The width of this logo in pixels. Filled for all products.

Height Integer

The height of this logo in pixels. Filled for all products.

Property
Name Type Description
PropertyName String

The name of the product property, e.g. "Size".

PropertyValue String

The value of this product property, e.g. "XS".

Facet
Name Type Description
FacetField String

The name of the dimension (e.g. "Brand") for which facet values have been found (e.g. "Sony").

FacetValues array of FacetValues

All different found variants (e.g. "Sony") for this FacetField (e.g. "Brand")

FacetValue
Name Type Description
FacetValueName String

One variant (e.g. "Sony") of the given FacetField (e.g. "Brand").

FacetValueCount String

The amount of products, which match the given search criteria and have this FacetValueName (e.g. "Sony") in the specified FacetField (e.g. "Brand").

GetProducts

This method returns detailed information for single products. It requires a list of specified product IDs as input.

Endpoint

https://product-api.affili.net/V3/productservice.svc/{XML|JSON}/GetProducts

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

// Set webservice endpoint (JSON)
$service = "https://product-api.affili.net/V3/productservice.svc/JSON/GetProducts";

// If you want to get the response in XML use the following service url
$serviceXML = "https://product-api.affili.net/V3/productservice.svc/XML/GetProducts";

// Set credentials
$params['PublisherId'] = ''; // your publisher ID
$params['Password'] = ''; // your product web services password

// Set parameters
$params['ProductIds'] = ''; // comma separated list, use "SearchProducts" to get Product Ids (mandatory)
$params['ImageScales'] = 'Image90,Image180';
$params['LogoScales'] = 'Logo90,Logo150'; 

// Put together request
$request = $service . "?" . http_build_query($params);

// Get response
$response = file_get_contents($request, true);

/*
Please note: the JSON output begins with a byte order mark (BOM).
If you run into problems while parsing the JSON response, try removing the BOM first.
*/
if(substr($response,0,3) == pack("CCC", 0xEF,0xBB,0xBF)) {
    $response = substr($response,3);
}

// Show response
print_r($response);
        

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

Password required

The product web service password of the requesting publisher.

ProductIds required

A comma separated list of those products, which shall be returned. Can hold up to 50 ProductIds. If the information of a requested ProductId cannot be returned (e.g. because the publisher lacks the partnership or the product is no longer available), then this product will not be in the array "Products" of the result, but the other products will.

ImageScales

A comma separated list of the standard image size variants you want to obtain for the products. This comma separated list has the following valid values:

  • NoImage
  • Image30
  • Image60
  • Image90
  • Image120
  • Image180
  • OriginalImage

If no image scale is specified, then the product gets delivered with no image information.

You cannot specify the same Image Scale value more than once.

LogoScales

A comma separated list of the standard logo size variants of the shops that provide the products. This comma separated list has the following valid values:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468

If no logo name is specified, then the product gets delivered with no logo.

You cannot specify the same Logo Scale value more than once.

Response

GetProductsResponse
Name Type Description
ProductsSummary ProductsSummary

General information on the found products.

Products Array of Product

The list of products which match the given search parameters.

ProductsSummary
Name Type Description
Records Integer

The amount of products on this page.

TotalRecords Integer

The total amount of products, which match the given criteria (across all pages).

TotalPages Integer

The amount of pages, which hold the found products.

CurrentPage Integer

The number of the page of this search result.

Product
Name Type Description
ArticleNumber String

The identifier of this product as supplied by the advertiser. Not necessarily unique throughout the affilinet platform. Filled for all products.

LastShopUpdate DateTime

The timestamp when the product list, to which this product belongs, was last imported. Filled for all products.

LastProductChange DateTime

The timestamp when this product has last been changed.

Score Integer

This number represents the accuracy, with which this product matches the given query terms. If no query keywords were specified, all returned products match the given search criteria equally, therefore 0 is returned for all products. Filled for all products.

ProductId Integer

The identifier of this product, unique throughout the affilinet platform. Filled for all products.

ShopId Integer

The ID of the product list, to which this product belongs. Not to be mistaken with ProgramId: each advertiser has one ProgramId, but can have any number of ShopIds - e.g. one for its full product feed and a different one for the top seller feed. Filled for all products.

ShopTitle String

The name of the product list, to which this product belongs.

ProductName String

The title of the product.

Description String

The full description of the product.

DescriptionShort String

A short description of the product.

ShopCategoryId Integer

Advertisers provide us with products including the information, to which category of the shop category tree the product belongs. This category receives its own unique category ID in our system. This field returns that ID. If the advertiser fails to provide us with a category, then this parameter returns '0'. Filled for all products.

AffilinetCategoryId Integer

Affilinet has its own category tree. We try to map each product to a category in that tree. So each product comes with the advertiser's category AND the affilinet category. If we were unable to map the product to our tree, then AffilinetCategoryId is 0. Filled for all products.

ShopCategoryPath String

The label of each shop category which lies on the path from the ShopCategoryId to the root of the shop category tree, separated by ' > ' (e.g. "Electronics > Home Entertainment > TV"). If the advertiser fails to provide us with a category, then this parameter returns NULL.

AffilinetCategoryPath String

The label of each affilinet category which lies on the path from the AffilinetCategoryId to the root of the affilinet category tree, separated by ' > ' (e.g. "Electronics > Home Entertainment > TV"). If we were unable to map the product to our tree, then this parameter returns NULL.

ShopCategoryIdPath String

The Id of each shop category which lies on the path from the root of the shop category tree to the ShopCategoryId of the product. The category Ids are separated by ' > ' (e.g. "123456 > 987654 > 159159"). If the advertiser fails to provide us with a category, then this parameter returns NULL.

AffilinetCategoryIdPath String

The Id of each affilinet category which lies on the path from the AffilinetCategoryId to the root of the affilinet category tree. The category Ids are separated by ' > ' (e.g. "123456 > 987654 > 159159"). If we were unable to map the product to our tree, then this parameter returns NULL.

Availability String

Currently not in use.

DeliveryTime String

Currently not in use.

Deeplink1 String

The URL, which takes you to the detail page of the shop to display this product. Filled for all products.

Deeplink2 String

The URL, through which you not only reach the detail page of this product on the shop site, but this product is at the same time added to the customer's shopping cart (not available for all shops).

Brand String

The brand of the product.

Manufacturer String

The manufacturer of the product (e.g. for mobile phones, the manufacturer sometimes differs from the brand).

Distributor String

The distributor of the product, normally only specified for books, DVDs and CDs.

EAN String

The European Article Number or Global Trade Item Number GTIN of the product.

Keywords String

Optional keywords, which the advertiser specified to characterise this product.

PriceInformation array of PriceInformation

This element contains various pieces of information regarding the price of this product (e.g. the current price, the old price, the base price,...). Filled for all products.

Images array of ImageCollection

This element contains all images of the product in the sizes which you specified in the parameter "ImageScale" in the SearchProductsRequest. Filled for all products if requested in SearchProductsRequest.ImageScales.

Logos array of Logo

This element contains all shop logos of the provider of this product in the sizes which you specified in the parameter "LogoScales" of the SearchProductsRequest. Filled for all products if requested in SearchProductsRequest.LogoScales.

Properties array of Property

For details check the chapter product properties

ProgramId Integer

The Id of the program, to which this ShopId belongs.

PriceInformation
Name Type Description
Currency String

Three characters indicating the currency for the product price. Currently, this can be either EUR or GBP. Filled for all products.

DisplayPrice String

This is the ready-to-use string to display the price. E.g. "For a limited time only 15.99 GBP plus shipping". Filled for all products.

DisplayShipping String

This is the ready-to-use string to display the shipping cost of this item. E.g. "Only 6.99 GBP except for overseas shipping".

DisplayBasePrice String

This is the ready-to-use string to display the price of this product calculated on a base measure. E.g. "27.98 GBP per kg".

PriceDetails array of PriceDetails

This element displays detailed information on the price of this product. Filled for all products.

ShippingDetails array of ShippingDetails

This element displays detailed information on the shipping cost of this product.

BasePriceDetails array of BasePriceDetails

This element displays detailed information on the price of this product calculated on a base measure (e.g. per kg, per litre etc.).

PriceDetails
Name Type Description
PriceOld Decimal

Former price of this product, as specified by the advertiser.

PricePrefix String

A string to be displayed before the actual price figure (e.g. "From").

Price Decimal

The price of this product in numerical presentation (e.g. 19.99). Filled for all products.

PriceSuffix String

A string to be displayed after the actual price figure (e.g. "incl. shipping").

ShippingDetails
Name Type Description
ShippingPrefix String

A string to be displayed before the actual shipping cost figure (e.g. "From").

Shipping Decimal

The shipping cost of this product in numerical presentation (e.g. 4.99).

ShippingSuffix String

A string to be displayed after the actual shipping cost figure (e.g. "except channel islands").

BasePriceDetails
Name Type Description
BasePricePrefix String

A string to be displayed before the actual price of this product calculated on a base measure (e.g. "From").

BasePrice Decimal

The price of this product calculated on a base measure in numerical presentation (e.g. 14.99).

BasePriceSuffix String

A string to be displayed after the actual price of this product calculated on a base measure (e.g. "depending on capacity").

ImageCollection
Name Type Description
ImageCollection array of Image

Each image we have for a product is returned in an ImageCollection in the desired sizes. Filled for all products if requested in SearchProductsRequest.ImageScales.

Image
Name Type Description
ImageScale Enum

The name of the image size variant. Filled for all products. Possible values are:

  • NoImage
  • Image30
  • Image60
  • Image90
  • Image120
  • Image180
  • OriginalImage
URL String

The URL where to obtain this image. Filled for all products.

Width Integer

The width of this image in pixels.

Height Integer

The height of this image in pixels.

Logo
Name Type Description
LogoScale Enum

The name of the logo size variant. Filled for all products. Possible values are:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468
URL String

The URL where to obtain this logo. Filled for all products.

Width Integer

The width of this logo in pixels. Filled for all products.

Height Integer

The height of this logo in pixels. Filled for all products.

Property
Name Type Description
PropertyName String

The name of the product property, e.g. "Size".

PropertyValue String

The value of this product property, e.g. "XS".

GetShopList

This method returns all active shops you have an accepted partnership with.

Endpoint

https://product-api.affili.net/V3/productservice.svc/{XML|JSON}/GetShopList

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

// Set webservice endpoint
$service = "https://product-api.affili.net/V3/productservice.svc/JSON/GetShopList";

// If you want to get the response in XML use the following service url
$serviceXML = "https://product-api.affili.net/V3/productservice.svc/XML/GetShopList";

// Set credentials
$params['PublisherId'] = ''; // your publisher ID
$params['Password'] = ''; // your product web services password

// Set parameters
$params['LogoScale'] = 'Logo150';
$params['CurrentPage'] = '1';
$params['PageSize'] = '10';
$params['UpdatedAfter'] = date(DATE_ATOM, strtotime("-1 week"));

// Put together request
$request = $service . "?" . http_build_query($params);

// Get response
$response = file_get_contents($request, true);

/*
Please note: the JSON output begins with a byte order mark (BOM).
If you run into problems while parsing the JSON response, try removing the BOM first.
*/
if(substr($response,0,3) == pack("CCC", 0xEF,0xBB,0xBF)) {
    $response = substr($response,3);
}

// Show response
print_r($response);
        

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

Password required

The product web service password of the requesting publisher.

LogoScales

A comma separated list of the standard logo size variants of the shops that provide the products. This comma separated list has the following valid values:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468

If no logo name is specified, then the product gets delivered with no logo.

You cannot specify the same Logo Scale value more than once.

CurrentPage

The number of the page of shops which shall be returned. Must be an integer greater than 0. If not specified or empty, 1 is assumed.

PageSize

The maximum amount of records per page. Must be an integer between 1 and 5000. If not specified or empty, 10 is assumed.

Query

You can specify a keyword here, if you want to restrict to those shops which match the given query terms. If not specified or empty, no keyword restriction will be applied.

UpdatedAfter

Only shops which have been updated at this given timestamp (or later) will be returned. Format: YYYY-MM-DDTHH:MM:SS, e.g. 2010-10-21T22:10:00. If not specified or empty, shops will be returned without any restriction on their last update.

Response

GetShopListResponse
Name Type Description
GetShopListSummary GetShopListSummary

General information on the found records.

Shops Array of Shop

The list of shops which match the given search criteria.

GetShopListSummary
Name Type Description
Records Integer

Number of found shops on this page.

TotalRecords Integer

Total number of shops matching the given search criteria.

TotalPages Integer

The total amount of pages with shops matching the given search criteria.

CurrentPage Integer

The page of results, which you are currently looking at.

Shop
Name Type Description
ShopId Integer

Id of this product list.

LastUpdate DateTime

Date when the product list was last updated.

Logo Logo

Information on the logo of this shop.

ProductCount Integer

Number of products found for this advertiser.

ProgramId Integer

Each program has a unique program-Id across the affilinet platform. If it provides us with product data, it can have one or several shop-Ids, depending on the number of product feeds which are provided by the advertiser, e.g. if it delivers books and DVDs in separate lists. These 2 lists will then have different ShopIds.

ShopLink String

The URL of the start page of this shop.

ShopTitle String

Name of the product list.

Logo
Name Type Description
LogoScale Enum

The name of the logo size variant. Filled for all products. Possible values are:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468
URL String

The URL where to obtain this logo. Empty string in the case of LogoScale=NoLogo. Filled for all products.

Width Integer

The width of this logo in pixels. 0 in the case of LogoScale=NoLogo. Filled for all products.

Height Integer

The height of this logo in pixels. 0 in the case of LogoScale=NoLogo. Filled for all products.

GetCategoryList

This method returns the list of categories of a specified shop or alternatively the list of affilinet categories.

Endpoint

https://product-api.affili.net/V3/productservice.svc/{XML|JSON}/GetCategoryList

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

// Set webservice endpoint
$service = "https://product-api.affili.net/V3/productservice.svc/JSON/GetCategoryList";

// If you want to get the response in XML use the following service url
$serviceXML = "https://product-api.affili.net/V3/productservice.svc/XML/GetCategoryList";

// Set credentials
$params['PublisherId'] = ''; // your publisher ID
$params['Password'] = ''; // your product web services password

// Set parameters
$params['ShopId'] = ''; // use "GetShopList" to get Shop Ids (mandatory)
$params['CurrentPage'] = '1';
$params['PageSize'] = '10';

// Put together request
$request = $service . "?" . http_build_query($params);

// Get response
$response = file_get_contents($request, true);

/*
Please note: the JSON output begins with a byte order mark (BOM).
If you run into problems while parsing the JSON response, try removing the BOM first.
*/
if(substr($response,0,3) == pack("CCC", 0xEF,0xBB,0xBF)) {
    $response = substr($response,3);
}

// Show response
print_r($response);
        

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

Password required

The product web service password of the requesting publisher.

ShopId required

The Id of the product list, for which the category list shall be returned. Must be 0 or greater. You need to have an accepted partnership with the program of the given ShopId, in order to obtain results. If you set this to 0, then the returned categories reflect the affilinet product category tree. Must be a not negative integer.

CurrentPage

The number of the page of shops which shall be returned. Must be an integer greater than 0. If not specified or empty, 1 is assumed.

PageSize

The maximum amount of records per page. Must be an integer between 1 and 5000. If not specified or empty, 5000 is assumed.

Response

GetShopListResponse
Name Type Description
GetCategoryListSummary GetCategoryListSummary

General information on the found records.

Categories Array of Category

The list of categories which are defined for this shop.

GetCategoriesListSummary
Name Type Description
Records Integer

The amount of categories of the current result page.

TotalRecords Integer

The total amount of categories for the given ShopId.

TotalPages Integer

The amount of pages with search results.

CurrentPage Integer

The number of this result page.

ProgramId Integer

The Id of the program, to which the given ShopId belongs. A program can have several product lists (a.k.a. ShopIds), but each ShopId belongs to only 1 ProgramId. If you are requesting the affilinet product category tree, then this will be 0.

ProgramTitle String

The name of the advertiser, to which the given ShopId belongs. If you are requesting the affilinet product category tree, this will be 'affilinet'.

ShopId Integer

The Id of the product list, which was requested.

ShopTitle String

The name of the product list. Can differ from the ProgramTitle. If you are requesting the affilinet product category list, then this will be 'affilinet'.

Category
Name Type Description
Id Integer

The Id of the category, a unique identifier across all ShopIds.

IdPath String

A string representing the hierarchical position of this category within the category tree, top down: if e.g. "987>1111>3235" is returned, this reads "this category (3235) has the parent category 1111, which has the parent category 987, which does NOT have a parent category" In other words: 987 is a top category.

Title String

The name of the category, e.g. "Menswear".

TitlePath String

The titles of all categories along the path from the root node to this category, separated by '>'. E.g. "Clothing & Accessories>Menswear"

ProductCount Integer

The total amount of products, which are currently contained in this category.

GetPropertyList

This method returns the list of custom properties of a specified shop.

Endpoint

https://product-api.affili.net/V3/productservice.svc/{XML|JSON}/GetPropertyList

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

// Set webservice endpoint
$service = "https://product-api.affili.net/V3/productservice.svc/JSON/GetPropertyList";

// If you want to get the response in XML use the following service url
$serviceXML = "https://product-api.affili.net/V3/productservice.svc/XML/GetPropertyList";

// Set credentials
$params['PublisherId'] = ''; // your publisher ID
$params['Password'] = ''; // your product web services password

// Set parameters
$params['ShopId'] = ''; // use "GetShopList" to get Shop Ids (mandatory)

// Put together request
$request = $service . "?" . http_build_query($params);

// Get response
$response = file_get_contents($request, true);

/*
Please note: the JSON output begins with a byte order mark (BOM).
If you run into problems while parsing the JSON response, try removing the BOM first.
*/
if(substr($response,0,3) == pack("CCC", 0xEF,0xBB,0xBF)) {
    $response = substr($response,3);
}

// Show response
print_r($response);
        

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

Password required

The product web service password of the requesting publisher.

ShopId required

The Id of the product list, for which the property list shall be returned. Must be an integer greater than 0. You need to have an accepted partnership with the program of the given ShopId, in order to obtain results.

Response

GetPropertyListResponse
Name Type Description
GetPropertyListSummary GetPropertyListSummary

General information on the found records.

PropertyCounts Array of PropertyCounts

The list of product properties which are set for this shop and the amount of products, which have this parameter set.

GetPropertyListSummary
Name Type Description
ShopId Integer

The Id of the requested product list.

TotalCount Integer

The amount of different properties found for the given ShopId.

PropertyCounts
Name Type Description
PropertyName String

The title of the product property (e.g. "Size" or "Colour").

TotalCount Integer

The total amount of products of the given ShopId, which have this property set.

SOAP Service

Access millions of products with our product web services. You can use the product web services to run queries on the product data, download the category structure of a shop, get a list of all accessible shops and their offers, and much more.

Logon

For a given publisher ID and product web service password, this method returns an authentication token, which is necessary for all other product web service requests. Each token is valid for 20 minutes.

WSDL

http://product-api.affili.net/Authentication/Logon.svc?wsdl

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php

// Start session
session_start();

// Set webservice endpoints and credentials
$wsdlProductService = "https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl";
$username = ''; // the publisher ID
$password = ''; // the product web services password

// You need an authentication token for every web service request. The Logon Class handles authentication.
// With the method getToken() you can get a token.
$logon = new Logon($username, $password);
$token = $logon->getToken();

// Example request: GetPropertyList  
$soapClient = new SoapClient($wsdlProductService); .

$params = array(
    'CredentialToken' => $token,
    'PublisherId' => '', // the Id of the requesting publisher (mandatory)
    'ShopId' => '' // use "GetShopList" to get Shop Ids (mandatory)
);
 
$response = $soapClient->GetPropertyList($params);
 
// Output GetPropertyList response
print_r($response);

 
/**
* Logon Class that returns an authentication token 
*/  
class Logon 
{
  	// Logon Webservice endpoint
	private $wsdl = "http://product-api.affili.net/Authentication/Logon.svc?wsdl";
 
	// Credentials
	private $username;
	private $password;
 
	// Soap Client instance
	private $soapClient;
 
	/**
	 * Class constructor. Expects username and password
	 * 
	 * @param int $username your publisher Id
	 * @param string $password your publisher web services password 
	 */
	public function __construct($username, $password) {
		$this->username = $username;
		$this->password = $password;
		$this->soapClient = new SoapClient($this->wsdl);
	}
 
	/**
	* Get authentication token 
	* 
	* @return string
	*/
	public function getToken() {
		// If there is no token stored or the token has already expired a new token is requested
		if(!isset($_SESSION['token']) or $this->tokenHasExpired()) {
 
			// Get new token and get store token expiration date
			$_SESSION['token'] = $this->createToken(); 
			$_SESSION['expiration_date'] = $this->getTokenExpirationDate();
		}
 
		// Return token
		return $_SESSION['token'];
	}
 
	/**
	* Checks if token is expired
	* 
	* @return boolean
	*/
	private function tokenHasExpired() {
		// If expiration date is not available, return true
		if (!isset($_SESSION['expiration_date'])) {
			return true;
		}
 
		// Check if the token has already expired
		return date(DATE_ATOM) > $_SESSION['expiration_date'];
	}
 
	/**
	* Create a new authentication token 
	* 
	* @return string 
	*/
	private function createToken() {
		// Send a request to the Affilinet Product Logon Service to get an authentication token
		return $this->soapClient->Logon(array(
			'Username'  => $this->username,
			'Password'  => $this->password,
			'WebServiceType' => 'Product'
		));
	}
 
	/**
	* Get token expiration date
	* 
	* @return string 
	*/
	private function getTokenExpirationDate() {
		// Send a request to the Affilinet Logon Service to get the token expiration date
		return $this->soapClient->GetIdentifierExpiration($_SESSION['token']); 
	}
}

Parameters

Name Type Description
Username required String

The affilinet publisher ID.

Password required String

The affilinet publisher web services password.

WebServiceType required Enum

Assign here "Product", because of using product data webservices.

Response

Name Type Description
CredentialToken String

A token which you need for all other web service requests.

GetIdentifierExpiration

When you have a logon token, this method lets you check how much longer you can use the token before it expires.

WSDL

http://product-api.affili.net/Authentication/Logon.svc?wsdl

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php

// Start session
session_start();

// Set webservice endpoints and credentials
$wsdlProductService = "https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl";
$username = ''; // the publisher ID
$password = ''; // the product web services password

// You need an authentication token for every web service request. The Logon Class handles authentication.
// With the method getToken() you can get a token.
$logon = new Logon($username, $password);
$token = $logon->getToken();

// Example request: GetPropertyList  
$soapClient = new SoapClient($wsdlProductService); .

$params = array(
    'CredentialToken' => $token,
    'PublisherId' => '', // the Id of the requesting publisher (mandatory)
    'ShopId' => '' // use "GetShopList" to get Shop Ids (mandatory)
);
 
$response = $soapClient->GetPropertyList($params);
 
// Output GetPropertyList response
print_r($response);

 
/**
* Logon Class that returns an authentication token 
*/  
class Logon 
{
  	// Logon Webservice endpoint
	private $wsdl = "http://product-api.affili.net/Authentication/Logon.svc?wsdl";
 
	// Credentials
	private $username;
	private $password;
 
	// Soap Client instance
	private $soapClient;
 
	/**
	 * Class constructor. Expects username and password
	 * 
	 * @param int $username your publisher Id
	 * @param string $password your publisher web services password 
	 */
	public function __construct($username, $password) {
		$this->username = $username;
		$this->password = $password;
		$this->soapClient = new SoapClient($this->wsdl);
	}
 
	/**
	* Get authentication token 
	* 
	* @return string
	*/
	public function getToken() {
		// If there is no token stored or the token has already expired a new token is requested
		if(!isset($_SESSION['token']) or $this->tokenHasExpired()) {
 
			// Get new token and get store token expiration date
			$_SESSION['token'] = $this->createToken(); 
			$_SESSION['expiration_date'] = $this->getTokenExpirationDate();
		}
 
		// Return token
		return $_SESSION['token'];
	}
 
	/**
	* Checks if token is expired
	* 
	* @return boolean
	*/
	private function tokenHasExpired() {
		// If expiration date is not available, return true
		if (!isset($_SESSION['expiration_date'])) {
			return true;
		}
 
		// Check if the token has already expired
		return date(DATE_ATOM) > $_SESSION['expiration_date'];
	}
 
	/**
	* Create a new authentication token 
	* 
	* @return string 
	*/
	private function createToken() {
		// Send a request to the Affilinet Product Logon Service to get an authentication token
		return $this->soapClient->Logon(array(
			'Username'  => $this->username,
			'Password'  => $this->password,
			'WebServiceType' => 'Product'
		));
	}
 
	/**
	* Get token expiration date
	* 
	* @return string 
	*/
	private function getTokenExpirationDate() {
		// Send a request to the Affilinet Logon Service to get the token expiration date
		return $this->soapClient->GetIdentifierExpiration($_SESSION['token']); 
	}
}

Parameters

Name Type Description
CredentialToken required String

The authentification token you receive from the method "Logon".

Response

Name Type Description
ExpirationDate DateTime

The exact timestamp when the given token will expire. Format: YYYY-MM-DDTHH:MM:SS.mm e.g. 2010-09-14T12:45:32.62

SearchProducts

This method can be used to search individual shops for products. It is also possible to search within the products of all shops, with which you have a partnership.

WSDL

https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php

// Set webservice endpoints
define("WSDL_LOGON", "http://product-api.affili.net/Authentication/Logon.svc?wsdl");
define("WSDL_PRODUCT", "https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl");

// Set credentials
$username = ''; // your publisher ID
$password = ''; // your product web services password

// Send a request to the Logon Service to get an authentication token
$soapLogon = new SoapClient(WSDL_LOGON);
$token = $soapLogon->Logon(array(
    'Username' => $username,
    'Password' => $password,
    'WebServiceType' => 'Product'
));

// Narrow down results to specific Shops (optional)
$shopIds = array(); // enter one or more shop Ids. You can use "GetShopList" to receive Shop Ids
$shopIdMode = 'Include';

/**
 * Narrow down by Query, CategoryIds or FilterQueries (on of the three must be set)
 *
 * Query
 * Use search operators AND, OR, NOT (in capital letters) for better results
 * Use "" for an exact match
 * Use () to group expressions
 * Use wildcard * for suffix matching, e.g. 'bott*' will match bottle or bottom
 * Example: "apple ipod" ((touch OR classic) NOT nano) AND "32 GB"
 */
$query = 'ipod'; //

/**
 * CategoryIds
 * The Ids of the categories you wish to restrict the search on. Whether the Ids are to be interpreted as shop categories
 * or as affilinet categories can be specified by using the parameter "UseAffilinetCategories".
 * You can receive shop categories using "GetCategoryList".
 */
$categoryIds = array(1,4,13);
$useAffilinetCategories = true;
$excludeSubCategories = false;

/**
 * Filter Queries
 * With the FilterQuery functionality, you can restrict the search results to those products that have a certain value (e.g. "Sony") in a certain data field (e.g. "Brand"). You can define up to 15 FilterQueries at the same time.
 */
$filterQueries = array(
    array(
        'DataField' => 'Manufacturer',
        'FilterValue' => 'Apple'
    ),
    array(
        'DataField' => 'Brand',
        'FilterValue' => 'Apple'
    )
);

/**
 * Facet fields
 * With this parameter, you can specify, what facets shall be created out of the search results (e.g. "Brand", "ShopId",
 * "AffilinetCategoryPath" or "Property_Size"). See PDF documentation for a full list.
 */
$facetFields = array('ShopId', 'ShopName');
$facetValueLimit = 15;

// Page settings
$pageSettings = array(
    'CurrentPage' => 1,
    'PageSize' => 20
);

// Set parameters
$params = array(
    'CredentialToken' => $token,
    'PublisherId' => '', // the Id of the requesting publisher (mandatory)
    'ShopIds' => $shopIds,
    'ShopIdMode' => $shopIdMode,
    'Query' => $query,
    'CategoryIds' => $categoryIds,
    'UseAffilinetCategories' => $useAffilinetCategories,
    'ExcludeSubCategories' => $excludeSubCategories,
    'FilterQueries' => $filterQueries,
    'FacetFields' => $facetFields,
    'FacetValueLimit' => $facetValueLimit,
    'ImageScales' => array('Image90', 'Image180'),
    'LogoScales' => array('Logo90', 'Logo150'),
    'WithImageOnly' => true,
    'MinimumPrice' => 0,
    'MaximumPrice' => 0,
    'PageSettings' => $pageSettings,
    'SortBy' => 'Score',
    'SortOrder' => 'descending'
);

// Send request to Publisher Program Service
$soapRequest = new SoapClient(WSDL_PRODUCT);
$response = $soapRequest->SearchProducts($params);

// Show response
print_r($response);
        

Parameters

Name Type Description
PublisherId required integer

The Id of the requesting publisher.

CredentialToken required string

The authentication token generated through the Logon method.

ShopIds array of integer

Lets you restrict the search results to only those of the specified shops. If you specify a ShopId with which you don’t have a partnership this ShopId is ignored.

Please note the difference between ShopId and ProgramId: each program (= advertiser) has one ProgramId, but might have more than one ShopId, e.g. if the program supplies its electronics products separately from its clothing products.

If one of the specified Shop Ids is 0 the search is performed across all shops with which the requesting publisher has an accepted partnership, other specified ShopIds are then ignored in this request.

Limit: Up to 500 Shop Ids can be specified.

ShopIdMode enum

Specifies the logic that shall be applied to the list of shops which is specified in ShopIds. Valid values are:

  • Include
  • Exclude

If you choose Include, then products are only returned if they come from any of the shops specified in ShopIds.

If you choose Exclude, then products are not returned if they come from any of the shops specified in ShopIds.

If ShopIds is not set ShopIdMode will be ignored.

Default: Include (if ShopIds is set)

Query string

The keyword(s) you want the products to match. Can be any length. The following search operators are supported:

  • AND (both query tokens must be contained in the product, but not necessarily next to one another)
  • OR (any of the query tokens must be contained in the product)
  • NOT (e.g. with “ipod AND NOT nano”, you will get products, which match the query “ipod”, but at the same time don’t match “nano”)
  • (phrase match: all query tokens enclosed with double quotes must be contained in the found products in that order)
  • () (Parentheses, to group expressions)

The wildcard * is supported for suffix matching, that is: a query bott* will match products that contain the word "bottle" or the word "bottom".

Search operators AND, OR and NOT must be in capital letters.

Example: "apple ipod" ((touch OR classic) NOT nano) AND "32 GB"

CategoryIds array of integer

The Ids of the categories you wish to restrict the search on. Whether the specified Ids are to be interpreted as shop categories or as affilinet categories, must be specified with the parameter UseAffilinetCategories.

Limit: Up to 100 Category Ids can be defined per request.

UseAffilinetCategories boolean

Here you can define, whether the Ids given in CategoryIds are to interpreted as affilinet category Ids or shop category Ids.

Default: If this parameter is not set, but CategoryIds is, then false is assumed (that is: we assume that the Category Ids are shop categories). If CategoryIds is not set this parameter is ignored.

ExcludeSubCategories boolean

If this parameter is set to “true”, then only those products are returned, that are assigned to any of the categories specified in CategoryIds. If it is set to false, then products are returned, which are assigned to any of the categories specified in CategoryIds or any of their direct or indirect sub categories.

Default: If this parameter is not set, but CategoryIds is, then false is assumed (that is: by default, we search including subcategories). If CategoryIds is not set this parameter is ignored.

WithImageOnly boolean

By setting this parameter to true, you can limit the search results to products, for which we successfully downloaded an image from the advertiser. With false you search across all products, regardless of their product image.

Default: false

ImageScales array of enum

The images of the products can be obtained in several standard sizes. Here you can specify what sizes you require. Valid values are:

  • NoImage
  • Image30
  • Image60
  • Image90
  • Image120
  • Image180
  • OriginalImage

If no image scale is specified, then the product gets delivered with no image information.

You cannot specify the same Image Scale value more than once.

LogoScales array of enum

The logos of the shops, which provide the products, can be obtained in several standard sizes. Here you can specify what sizes you require. Valid values are:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468

If no logo name is specified, then the product gets delivered with no logo.

You cannot specify the same Logo Scale value more than once.

PageSettings PageSettings

Information on how many records shall be displayed per page and which page to be displayed.

Default: If not specified, then page 1 is displayed with up to 10 records.

MinimumPrice decimal

Minimum price in the search results (not including shipping costs).

Must be a decimal, 0 or greater. Decimal separator must be . (dot), thousand separators are not allowed.

Default: 0

MaximumPrice decimal

Maximum price in the search results (not including shipping costs).

Must be a decimal, 0 or greater. Decimal separator must be . (dot), thousand separators are not allowed.

Has to be bigger than MinimumPrice, if both parameters are specified.

If not specified, then no upper price limit is applied.

SortBy enum

Lets you define along which criteria the search results are sorted. Valid values are:

  • Score (a.k.a. rank, relevance)
  • Price (excluding shipping)
  • ProductName
  • LastImported (relates to the last update of this product's shop which is not necessarily the last update of this specific product)

Default: Score. Products with the same score will be sorted by LastImported.

SortOrder enum

Lets you specify by what order the search results are sorted. Valid values are:

  • ascending
  • descending

Default: descending

FacetFields array of string

With this parameter, you can specify, what facets shall be created out of the search results. Please note the chapter about faceting.

Facets can be built over the following data fields (though not all of them are recommended for faceting, see chapter about faceting.)

  • AffilinetCategoryId
  • AffilinetCategoryPathFacet
  • ArticleNumber
  • Brand
  • Distributor
  • EAN
  • Manufacturer
  • ProgramId
  • Property_*
  • ShopCategoryId
  • ShopCategoryPathFacet
  • ShopId
  • ShopName

Limit: In each request, up to 4 facet fields can be specified.

FacetValueLimit integer

Lets you specify, how many values you want to receive per facet. Must be an integer between 1 and 50

Default: 10

FilterQueries array of FilterQuery

A set of additional filter criteria. Please note the chapter about filter queries.

Limit: In each request, up to 15 filter queries can be specified.

PageSettings object
Name Type Description
CurrentPage integer

States which page should be displayed. Must be an integer greater than 0.

Default: 1

PageSize integer

States the size of a result page.

Must be an integer between 1 and 500.

Default: 10 (if not specified or 0)

FilterQuery object

Please note the chapter about filter queries where more detailed information is given.

Name Type Description
DataField required string

The product data field you wish to create a restriction on. If you would like to get only those products, which have "Brand=Sony", then set DataField to "Brand" and set FilterValue to "Sony".

Please note that if you filter on custom product properties of specific shops like "Size" then DataField must be set to "Property_Size". Please note the chapter about product properties.

FilterValue required string

Only those products will be returned that contain the specified value in the given data field (case insensitive).

Example: if DataField is set to "Manufacturer" and FilterValue is set to "HTC", then products with "HTC" or "htc" or "Htc" as manufacturer will be returned, but products with "HTC Ltd." will not.

Response

For price display it is recommended to use the ready-to-use price strings DisplayPrice and DisplayShipping. They include the correct currency suffix as well as further information.

Alternatively you can use the raw values which are returned by the fields Price and Shipping.

SearchProductsResponse
Name Type Description
ProductsSummary ProductsSummary

General information on the found products.

Products array of Product

The list of products which match the given search parameters.

Limit: a maximum of 10.000 products is returned in this array (across all pages)

Facets array of Facet

Facet information on the search results. Empty if SearchProductsRequest.FacetFields was empty.

ProductsSummary
Name Type Description
Records integer

The amount of products on this page.

TotalRecords integer

The total amount of products, which match the given criteria (across all pages).

TotalPages integer

The amount of pages, which hold the found products.

CurrentPage integer

The number of the page of this search result.

Product
Name Type Description
ArticleNumber string

The identifier of this product as supplied by the advertiser. Not necessarily unique throughout the affilinet platform. Filled for all products.

LastShopUpdate dateTime

The timestamp when the product list, to which this product belongs, was last imported. Filled for all products.

LastProductChange dateTime

The timestamp when this product has last been changed.

Score double

This number represents the accuracy, with which this product matches the given query terms. If no query keywords were specified, all returned product s match the given search criteria equally, therefore 0 is returned for all products. Filled for all products.

ProductId integer

The identifier of this product, unique throughout the affilinet platform. Filled for all products.

ShopId integer

The ID of the product list, to which this product belongs. Not to be mistaken with ProgramId: each advertiser has one ProgramId, but can have any number of ShopIds - e.g. one for its full product feed and a different one for the top seller feed. Filled for all products.

ShopTitle string

The name of the product list, to which this product belongs.

ProductName string

The name of the product.

Description string

The name of the product list, to which this product belongs.

DescriptionShort string

A short description of the product.

ShopCategoryId integer

Advertisers provide us with products including the information, to which category of the shop category tree the product belongs. This category receives its own unique category ID in our system. This field returns that ID.

If the advertiser fails to provide us with a category, then this parameter returns 0. Filled for all products.

AffilinetCategoryId integer

Affilinet has its own category tree. We try to map each product to a category in that tree. So each product comes with the advertiser's category AND the affilinet category.

If we were unable to map the product to our tree, then AffilinetCategoryId is 0. Filled for all products.

ShopCategoryPath string

The label of each shop category which lies on the path from the ShopCategoryId to the root of the shop category tree, separated by > (e.g. "Electronics > Home Entertainment > TV").

If the advertiser fails to provide us with a category, then this parameter returns NULL.

AffilinetCategoryPath string

The label of each affilinet category which lies on the path from the AffilinetCategoryId to the root of the affilinet category tree, separated by > (e.g. "Electronics > Home Entertainment > TV").

If we were unable to map the product to our tree, then this parameter returns NULL.

ShopCategoryIdPath string

The Id of each shop which lies on the path from the root of the shop category tree. The category Ids are separated by > (e.g. "123456 > 987654 > 159159").

If the advertiser fails to provide us with a category, then this parameter returns NULL.

AffilinetCategoryIdPath string

The Id of each affilinet category which lies on the path from the AffilinetCategoryId to the root of the affilinet category tree. The category Ids are separated by > (e.g. "123456 > 987654 > 159159").

If we were unable to map the product to our tree, then this parameter returns NULL.

Availability string

Currently not in use.

DeliveryTime string

Currently not in use.

Deeplink1 string

The URL which takes you to the detail page of the shop to display this product. Filled for all products.

Deeplink2 string

Alternative deeplink to Deeplink1

Brand string

The make of the product.

Manufacturer string

The manufacturer of the product (e.g. for mobile phones, the manufacturer sometimes differs from the brand).

Distributor string

The distributor of the product, normally only specified for books, DVDs and CDs.

EAN string

The European Article Number of the product.

Keywords string

Optional keywords, which the advertiser specified to characterise this product.

PriceInformation array of PriceInformation

This element contains various pieces of information regarding the price of this product (e.g. the current price, the old price, the base price,...). Filled for all products.

Images array of ImageCollection

This element contains all images of the product in the sizes which you specified in the parameter ImageScales.

Filled for all products if requested in SearchProductsRequest.ImageScales.

Logos array of Logo

This element contains all shop logos of the provider of this product in the sizes which you specified in the parameter LogoScales.

Filled for all products if requested in SearchProductsRequest.LogoScales.

Properties array of Property

For details check the chapter product properties

ProgramId integer

The Id of the program, to which this ShopId belongs.

PriceInformation
Name Type Description
Currency string

Three characters indicating the currency for the product price. Currently, this can be either EUR or GBP. Filled for all products.

DisplayPrice string

This is the ready-to-use string to display the price. E.g. "For a limited time only 15.99 GBP plus shipping". Filled for all products.

DisplayShipping string

This is the ready-to-use string to display the shipping cost of this item. E.g. "Only 6.99 GBP except for overseas shipping".

DisplayBasePrice string

This is the ready-to-use string to display the price of this product calculated on a base measure. E.g. "27.98 GBP per kg".

PriceDetails PriceDetails

This element displays detailed information on the price of this product. Filled for all products.

ShippingDetails ShippingDetails

This element displays detailed information on the shipping cost of this product.

BasePriceDetails BasePriceDetails

This element displays detailed information on the price of this product calculated on a base measure (e.g. per kg, per litre etc.).

PriceDetails
Name Type Description
PriceOld decimal

Former price of this product, as specified by the advertiser.

PricePrefix string

A string to be displayed before the actual price figure (e.g. "From").

Price decimal

The price of this product in numerical presentation (e.g. 19.99). Filled for all products.

PriceSuffix string

A string to be displayed after the actual price figure (e.g. "incl. shipping").

ShippingDetails
Name Type Description
ShippingPrefix string

A string to be displayed before the actual shipping cost figure (e.g. "From").

Shipping decimal

The shipping cost of this product in numerical presentation (e.g. 4.99).

ShippingSuffix string

A string to be displayed after the actual shipping cost figure (e.g. "except channel islands").

BasePriceDetails
Name Type Description
BasePricePrefix string

A string to be displayed before the actual price of this product (e.g. "From").

BasePrice decimal

The price of this product in numerical presentation (e.g. 14.99).

BasePriceSuffix string

A string to be displayed after the actual price of this product (e.g. "depending on capacity").

ImageCollection
Name Type Description
ImageCollection array of Image

Each image we have for a product is returned in an ImageCollection in the desired sizes. Filled for all products if requested in SearchProductsRequest.ImageScales.

Image
Name Type Description
ImageScale enum

The name of the image size variant. Filled for all products. Valid values are:

  • NoImage
  • Image30
  • Image60
  • Image90
  • Image120
  • Image180
  • OriginalImage
URL string

The URL where to obtain this image. Filled for all products.

Width integer

The width of this image in pixels.

Height integer

The height of this image in pixels.

Logo
Name Type Description
LogoScale enum

The name of the logo size variant. Filled for all products. Valid values are:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468
URL string

The URL where to obtain this logo. Filled for all products.

Width integer

The width of this logo in pixels. Filled for all products.

Height integer

The height of this logo in pixels. Filled for all products.

Property
Name Type Description
PropertyName string

The name of the product property, e.g. "Size".

PropertyValue string

The value of this product property, e.g. "XS"

Facet
Name Type Description
FacetField string

The name of the dimension (e.g. "Brand") for which facet values have been found (e.g. "Sony").

FacetValues array of FacetValue

All different found variants (e.g. "Sony") for this FacetField (e.g. "Brand")

FacetValue
Name Type Description
FacetValueName string

One variant (e.g. "Sony") of the given FacetField (e.g. "Brand").

FacetValueCount string

The amount of products, which match the given search criteria and have this FacetValueName (e.g. "Sony") in the specified FacetField (e.g. "Brand").

GetProducts

This method returns detailed information for single products. It requires a list of specified product IDs as input.

WSDL

https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

// Set webservice endpoints
define("WSDL_LOGON", "http://product-api.affili.net/Authentication/Logon.svc?wsdl");
define("WSDL_PRODUCT", "https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl");

// Set credentials
$username = ''; // your publisher ID
$password = ''; // your product web services password

// Send a request to the Logon Service to get an authentication token
$soapLogon = new SoapClient(WSDL_LOGON);
$token = $soapLogon->Logon(array(
    'Username' => $username,
    'Password' => $password,
    'WebServiceType' => 'Product'
));

// Set array of product Ids 
    $productIds = array(); // enter one or more product Ids (mandatory). You can use "SearchProducts" to receive Product Ids
 
// Set parameters
$params = array(
    'CredentialToken' => $token,
    'PublisherId' => '', // the Id of the requesting publisher (mandatory)
    'ProductIds' => $productIds,
    'ImageScales' => array('Image90', 'Image180'),
    'LogoScales' => array('Logo90', 'Logo150')
);
 
// Send request to Publisher Program Service
$soapRequest = new SoapClient(WSDL_PRODUCT);
$response = $soapRequest->GetProducts($params);
 
// Show response
print_r($response);

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

CredentialToken required

The authentication token generated through the Logon method.

ProductIds required

An array of those products, which shall be returned. Must hold between 1 and 50 ProductIds.

ImageScales

The images of the products can be obtained in several standard sizes. Here you can specify what sizes you require. Possible values are:

  • Image30
  • Image60
  • Image90
  • Image120
  • Image180
  • OriginalImage

If no image scale is specified, then the product gets delivered with no image information.

You cannot specify the same Image Scale value more than once.

LogoScales

The logos of the shops, which provide the products, can be obtained in several standard sizes. Here you can specify what sizes you require. Possible values are:

  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468

If no logo scale is specified, then the product gets delivered with no logo.

You cannot specify the same LogoScale value more than once.

Response

For price display it is recommended to use the ready-to-use price strings DisplayPrice and DisplayShipping. They include the correct currency suffix as well as further information.

Alternatively you can use the raw values which are returned by the fields Price and Shipping.

GetProductsResponse
Name Type Description
ProductsSummary ProductsSummary

General information on the found products.

Products Array of Product

The list of products which match the given search parameters.

ProductsSummary
Name Type Description
Records Integer

The amount of products on this page.

TotalRecords Integer

The total amount of products, which match the given criteria (across all pages).

TotalPages Integer

The amount of pages, which hold the found products.

CurrentPage Integer

The number of the page of this search result.

Product
Name Type Description
ArticleNumber String

The identifier of this product as supplied by the advertiser. Not necessarily unique throughout the affilinet platform. Filled for all products.

LastShopUpdate DateTime

The timestamp when the product list, to which this product belongs, was last imported. Filled for all products.

LastProductChange DateTime

The timestamp when this product has last been changed.

Score Integer

This number represents the accuracy, with which this product matches the given query terms. If no query keywords were specified, all returned products match the given search criteria equally, therefore 0 is returned for all products. Filled for all products.

ProductId Integer

The identifier of this product, unique throughout the affilinet platform. Filled for all products.

ShopId Integer

The ID of the product list, to which this product belongs. Not to be mistaken with ProgramId: each advertiser has one ProgramId, but can have any number of ShopIds - e.g. one for its full product feed and a different one for the top seller feed. Filled for all products.

ShopTitle String

The name of the product list, to which this product belongs.

ProductName String

The title of the product.

Description String

The full description of the product.

DescriptionShort String

A short description of the product.

ShopCategoryId Integer

Advertisers provide us with products including the information, to which category of the shop category tree the product belongs. This category receives its own unique category ID in our system. This field returns that ID. If the advertiser fails to provide us with a category, then this parameter returns '0'. Filled for all products.

AffilinetCategoryId Integer

Affilinet has its own category tree. We try to map each product to a category in that tree. So each product comes with the advertiser's category AND the affilinet category. If we were unable to map the product to our tree, then AffilinetCategoryId is 0. Filled for all products.

ShopCategoryPath String

The label of each shop category which lies on the path from the ShopCategoryId to the root of the shop category tree, separated by ' > ' (e.g. "Electronics > Home Entertainment > TV"). If the advertiser fails to provide us with a category, then this parameter returns NULL.

AffilinetCategoryPath String

The label of each affilinet category which lies on the path from the AffilinetCategoryId to the root of the affilinet category tree, separated by ' > ' (e.g. "Electronics > Home Entertainment > TV"). If we were unable to map the product to our tree, then this parameter returns NULL.

ShopCategoryIdPath String

The Id of each shop category which lies on the path from the root of the shop category tree to the ShopCategoryId of the product. The category Ids are separated by ' > ' (e.g. "123456 > 987654 > 159159"). If the advertiser fails to provide us with a category, then this parameter returns NULL.

AffilinetCategoryIdPath String

The Id of each affilinet category which lies on the path from the AffilinetCategoryId to the root of the affilinet category tree. The category Ids are separated by ' > ' (e.g. "123456 > 987654 > 159159"). If we were unable to map the product to our tree, then this parameter returns NULL.

Availability String

Currently not in use.

DeliveryTime String

Currently not in use.

Deeplink1 String

The URL, which takes you to the detail page of the shop to display this product. Filled for all products.

Deeplink2 String

The URL, through which you not only reach the detail page of this product on the shop site, but this product is at the same time added to the customer's shopping cart (not available for all shops).

Brand String

The brand of the product.

Manufacturer String

The manufacturer of the product (e.g. for mobile phones, the manufacturer sometimes differs from the brand).

Distributor String

The distributor of the product, normally only specified for books, DVDs and CDs.

EAN String

The European Article Number or Global Trade Item Number GTIN of the product.

Keywords String

Optional keywords, which the advertiser specified to characterise this product.

PriceInformation array of PriceInformation

This element contains various pieces of information regarding the price of this product (e.g. the current price, the old price, the base price,...). Filled for all products.

Images array of ImageCollection

This element contains all images of the product in the sizes which you specified in the parameter "ImageScale" in the SearchProductsRequest. Filled for all products if requested in SearchProductsRequest.ImageScales.

Logos array of Logo

This element contains all shop logos of the provider of this product in the sizes which you specified in the parameter "LogoScales" of the SearchProductsRequest. Filled for all products if requested in SearchProductsRequest.LogoScales.

Properties array of Property

For details check the chapter product properties

ProgramId Integer

The Id of the program, to which this ShopId belongs.

PriceInformation
Name Type Description
Currency String

Three characters indicating the currency for the product price. Currently, this can be either EUR or GBP. Filled for all products.

DisplayPrice String

This is the ready-to-use string to display the price. E.g. "For a limited time only 15.99 GBP plus shipping". Filled for all products.

DisplayShipping String

This is the ready-to-use string to display the shipping cost of this item. E.g. "Only 6.99 GBP except for overseas shipping".

DisplayBasePrice String

This is the ready-to-use string to display the price of this product calculated on a base measure. E.g. "27.98 GBP per kg".

PriceDetails array of PriceDetails

This element displays detailed information on the price of this product. Filled for all products.

ShippingDetails array of ShippingDetails

This element displays detailed information on the shipping cost of this product.

BasePriceDetails array of BasePriceDetails

This element displays detailed information on the price of this product calculated on a base measure (e.g. per kg, per litre etc.).

PriceDetails
Name Type Description
PriceOld Decimal

Former price of this product, as specified by the advertiser.

PricePrefix String

A string to be displayed before the actual price figure (e.g. "From").

Price Decimal

The price of this product in numerical presentation (e.g. 19.99). Filled for all products.

PriceSuffix String

A string to be displayed after the actual price figure (e.g. "incl. shipping").

ShippingDetails
Name Type Description
ShippingPrefix String

A string to be displayed before the actual shipping cost figure (e.g. "From").

Shipping Decimal

The shipping cost of this product in numerical presentation (e.g. 4.99).

ShippingSuffix String

A string to be displayed after the actual shipping cost figure (e.g. "except channel islands").

BasePriceDetails
Name Type Description
BasePricePrefix String

A string to be displayed before the actual price of this product calculated on a base measure (e.g. "From").

BasePrice Decimal

The price of this product calculated on a base measure in numerical presentation (e.g. 14.99).

BasePriceSuffix String

A string to be displayed after the actual price of this product calculated on a base measure (e.g. "depending on capacity").

ImageCollection
Name Type Description
ImageCollection array of Image

Each image we have for a product is returned in an ImageCollection in the desired sizes. Filled for all products if requested in SearchProductsRequest.ImageScales.

Image
Name Type Description
ImageScale Enum

The name of the image size variant. Filled for all products. Possible values are:

  • NoImage
  • Image30
  • Image60
  • Image90
  • Image120
  • Image180
  • OriginalImage
URL String

The URL where to obtain this image. Filled for all products.

Width Integer

The width of this image in pixels.

Height Integer

The height of this image in pixels.

Logo
Name Type Description
LogoScale Enum

The name of the logo size variant. Filled for all products. Possible values are:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468
URL String

The URL where to obtain this logo. Filled for all products.

Width Integer

The width of this logo in pixels. Filled for all products.

Height Integer

The height of this logo in pixels. Filled for all products.

Property
Name Type Description
PropertyName String

The name of the product property, e.g. "Size".

PropertyValue String

The value of this product property, e.g. "XS".

GetShopList

This method returns all active shops you have an accepted partnership with.

WSDL

https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php

// Set webservice endpoints
define("WSDL_LOGON", "http://product-api.affili.net/Authentication/Logon.svc?wsdl");
define("WSDL_PRODUCT", "https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl");

// Set credentials
$username = ''; // your publisher ID
$password = ''; // your product web services password

// Send a request to the Logon Service to get an authentication token
$soapLogon = new SoapClient(WSDL_LOGON);
$token = $soapLogon->Logon(array(
    'Username' => $username,
    'Password' => $password,
    'WebServiceType' => 'Product'
));

// Set page setting parameters
$pageSettings = array(
    'CurrentPage' => 1,
    'PageSize' => 10
);

// Set parameters
$params = array(
    'CredentialToken' => $token,
    'PublisherId' => '', // the Id of the requesting publisher (mandatory)
    'LogoScale' => 'Logo150',
    'PageSettings' => $pageSettings,
    'UpdatedAfter' => strtotime("-1 week"),
);

// Send request to Publisher Program Service
$soapRequest = new SoapClient(WSDL_PRODUCT);
$response = $soapRequest->GetShopList($params);

// Show response
print_r($response);

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

CredentialToken required

The authentication token generated through the Logon method.

LogoScales

We will return each found shop together with a logo. We have several sizes available and here you can specify the size you want. Possible values are:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468

If not specified, NoLogo is assumed.

PageSettings

Information on how many records shall be displayed per page and which page shall be displayed. If not specified, then page 1 is displayed with up to 10 records.

Query

You can specify a keyword here, if you want to restrict to those shops which match the given query terms. If not specified or empty, no keyword restriction will be applied.

UpdatedAfter

Only shops which have been updated at this given timestamp (or later) will be returned. Format: YYYY-MM-DDTHH:MM:SS, e.g. 2010-10-21T22:10:00. If not specified or empty, shops will be returned without any restriction on their last update.

PageSettings
Name Description
CurrentPagerequired

The number of the page of shops which shall be returned. Must be an integer greater than 0. If not specified or empty, 1 is assumed.

PageSizerequired

The maximum amount of records per page. Must be an integer between 1 and 5000. If not specified or empty, 10 is assumed.

Response

The found records come back sorted first by ProgramId and then by ShopId in ascending order.

GetShopListResponse
Name Type Description
GetShopListSummary GetShopListSummary

General information on the found records.

Shops Array of Shop

The list of shops which match the given search criteria.

GetShopListSummary
Name Type Description
Records Integer

Number of found shops on this page.

TotalRecords Integer

Total number of shops matching the given search criteria.

TotalPages Integer

The total amount of pages with shops matching the given search criteria.

CurrentPage Integer

The page of results, which you are currently looking at.

Shop
Name Type Description
ShopId Integer

Id of this product list.

LastUpdate DateTime

Date when the product list was last updated.

Logo Logo

Information on the logo of this shop.

ProductCount Integer

Number of products found for this advertiser.

ProgramId Integer

Each program has a unique program-Id across the affilinet platform. If it provides us with product data, it can have one or several shop-Ids, depending on the number of product feeds which are provided by the advertiser, e.g. if it delivers books and DVDs in separate lists. These 2 lists will then have different ShopIds.

ShopLink String

The URL of the start page of this shop.

ShopTitle String

Name of the product list.

Logo
Name Type Description
LogoScale Enum

The name of the logo size variant. Filled for all products. Possible values are:

  • NoLogo
  • Logo50
  • Logo90
  • Logo120
  • Logo150
  • Logo468
URL String

The URL where to obtain this logo. Empty string in the case of LogoScale=NoLogo. Filled for all products.

Width Integer

The width of this logo in pixels. 0 in the case of LogoScale=NoLogo. Filled for all products.

Height Integer

The height of this logo in pixels. 0 in the case of LogoScale=NoLogo. Filled for all products.

GetCategoryList

This method returns the list of categories of a specified shop or alternatively the list of affilinet categories.

WSDL

https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php

// Set webservice endpoints
define("WSDL_LOGON", "http://product-api.affili.net/Authentication/Logon.svc?wsdl");
define("WSDL_PRODUCT", "https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl");

// Set credentials
$username = ''; // your publisher ID
$password = ''; // your product web services password

// Send a request to the Logon Service to get an authentication token
$soapLogon = new SoapClient(WSDL_LOGON);
$token = $soapLogon->Logon(array(
    'Username' => $username,
    'Password' => $password,
    'WebServiceType' => 'Product'
));

// Set page setting parameters
$pageSettings = array(
    'CurrentPage' => 1,
    'PageSize' => 10
);

// Set parameters
$params = array(
        'CredentialToken' => $token,
        'PublisherId' => '', // the Id of the requesting publisher (mandatory)
        'PageSettings' => $pageSettings,
        'ShopId' => '' // use "GetShopList" to get Shop Ids (mandatory)
);
	
// Send request to Publisher Program Service
$soapRequest = new SoapClient(WSDL_PRODUCT);
$response = $soapRequest->GetCategoryList($params);

// Show response
print_r($response);

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

CredentialToken required

The authentication token generated through the Logon method.

ShopId required

The Id of the product list, for which the category list shall be returned. Must be 0 or greater. You need to have an accepted partnership with the program of the given ShopId, in order to obtain results. If you set this to 0, then the returned categories reflect the affilinet product category tree. Must be a not negative integer.

PageSettings

Information on how many records shall be displayed per page and which page shall be displayed. If not specified, then page 1 is displayed with up to 5000 records.

PageSettings
Name Description
CurrentPagerequired

The number of the page which shall be returned. Must be greater than 0. If not specified or empty, 1 is assumed.

PageSizerequired

r The maximum amount of records per page. Must be between 1 and 5000. If not specified or empty, 5000 is assumed.

Response

The results will be sorted by amount of products contained in the category in descending order.

GetShopListResponse
Name Type Description
GetCategoryListSummary GetCategoryListSummary

General information on the found records.

Categories Array of Category

The list of categories which are defined for this shop.

GetCategoriesListSummary
Name Type Description
Records Integer

The amount of categories of the current result page.

TotalRecords Integer

The total amount of categories for the given ShopId.

TotalPages Integer

The amount of pages with search results.

CurrentPage Integer

The number of this result page.

ProgramId Integer

The Id of the program, to which the given ShopId belongs. A program can have several product lists (a.k.a. ShopIds), but each ShopId belongs to only 1 ProgramId. If you are requesting the affilinet product category tree, then this will be 0.

ProgramTitle String

The name of the advertiser, to which the given ShopId belongs. If you are requesting the affilinet product category tree, this will be 'affilinet'.

ShopId Integer

The Id of the product list, which was requested.

ShopTitle String

The name of the product list. Can differ from the ProgramTitle. If you are requesting the affilinet product category list, then this will be 'affilinet'.

Category
Name Type Description
Id Integer

The Id of the category, a unique identifier across all ShopIds.

IdPath String

A string representing the hierarchical position of this category within the category tree, top down: if e.g. "987>1111>3235" is returned, this reads "this category (3235) has the parent category 1111, which has the parent category 987, which does NOT have a parent category" In other words: 987 is a top category.

Title String

The name of the category, e.g. "Menswear".

TitlePath String

The titles of all categories along the path from the root node to this category, separated by '>'. E.g. "Clothing & Accessories>Menswear"

ProductCount Integer

The total amount of products, which are currently contained in this category.

GetPropertyList

This method returns the list of custom properties of a specified shop.

WSDL

https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

// Set webservice endpoints
define("WSDL_LOGON", "http://product-api.affili.net/Authentication/Logon.svc?wsdl");
define("WSDL_PRODUCT", "https://product-api.affili.net/V3/WSDLFactory/Product_ProductData.wsdl");

// Set credentials
$username = ''; // your publisher ID
$password = ''; // your product web services password

// Send a request to the Logon Service to get an authentication token
$soapLogon = new SoapClient(WSDL_LOGON);
$token = $soapLogon->Logon(array(
    'Username' => $username,
    'Password' => $password,
    'WebServiceType' => 'Product'
));

// Set parameters
$params = array(
        'CredentialToken' => $token,
        'PublisherId' => '', // the Id of the requesting publisher (mandatory)
        'ShopId' => '' // use "GetShopList" to get Shop Ids (mandatory)
);
	
// Send request to Publisher Program Service
$soapRequest = new SoapClient(WSDL_PRODUCT);
$response = $soapRequest->GetPropertyList($params);

// Show response
print_r($response);

Parameters

Name Description
PublisherId required

The Id of the requesting publisher.

CredentialToken required

The authentication token generated through the Logon method.

ShopId required

The Id of the product list, for which the property list shall be returned. Must be an integer greater than 0. You need to have an accepted partnership with the program of the given ShopId, in order to obtain results.

Response

GetPropertyListResponse
Name Type Description
GetPropertyListSummary GetPropertyListSummary

General information on the found records.

PropertyCounts Array of PropertyCounts

The list of product properties which are set for this shop and the amount of products, which have this parameter set.

GetPropertyListSummary
Name Type Description
ShopId Integer

The Id of the requested product list.

TotalCount Integer

The amount of different properties found for the given ShopId.

PropertyCounts
Name Type Description
PropertyName String

The title of the product property (e.g. "Size" or "Colour").

TotalCount Integer

The total amount of products of the given ShopId, which have this property set.

Product Properties

Advertisers can provide us with 3 types of data for each product:

  • obligatory fields (e.g. price or deeplink)
  • optional fields (e.g. brand or distributor)
  • custom fields (which we call product properties)

Product properties are very flexible: every additional data column a shop delivers to us, is handed out to the publishers with unaltered column name. So a shoe shop can provide us with custom fields / product properties like size or material, while a notebook shop can send us screensize, cpu etc...

Our product web service can return any amount of product properties for each product

Product Properties can be used for Faceting and FilterQueries. In this context, property field names must be prefixed with "Property_", so we can tell this field apart from a standard data field, which incidentally might have the same name.

So if a shop delivers products with the property material, filter queries> or facets on this field must be formulated as Property_material. However, the returned products will have a property with the original name "material".

Filter Queries

With the FilterQuery functionality you can restrict the search results to only those products, which have a a certain value (e.g. "Sony") in a certain data field (e.g. "Brand").

You can define up to 15 filter queries at the same time. They are combined with a logical AND, that is: only products are returned, which fulfill ALL given FilterQueries and match the other search criteria specified in the SearchProducts request.

That way, you can e.g. obtain all products of shop 123, which have an image, match the query term "UltraHD", have brand "Sony" and lie in the shop category "Electronics > TV" (CategoryId 987654) or any of its subcategories:

  • Set ShopIds to 123
  • Set WithImageOnly to true
  • Set Query to "UltraHD"
  • Set FilterQuery to DataField=Brand and FilterValue=Sony
  • Set CategoryIds to 987654

Another common use case for FilterQueries would be the EAN field: if you send off a SearchProducts request in which only 1 filter query is defined (DataField=EAN and FilterValue=1234567890123), then you will only get back products with this EAN - which e.g. can serve as input for a price comparison site.

FilterQueries can not only be built on the data field "Brand" or "EAN", but over all following data fields:

  • AffilinetCategoryPath
  • AffilinetCategoryPathFacet
  • ArticleNumber
  • Brand
  • Distributor
  • Manufacturer
  • ProgramId
  • ShopCategoryPath
  • ShopCategoryPathFacet
  • Property_*

Both the DataField and the FilterValue have to match exactly, case insensitive. That is: if DataField is set to "Manufacturer" and FilterValue is set to "HTC", then products with "HTC" or "htc" or "Htc" as manufacturer will be returned, but products with "HTC Ltd." will not.

Facets

Many names refer to the same thing. Faceting is sometimes also called Faceted Search, Parameter Search, Faceted Navigation and others. What it is about is best explained with a common use case of our context:

If you send off a SearchProducts request with a FacetField "Brand", then you not only get back the products that match the search criteria, but on top an overview, what brands occur among all found products and how often. Up to 50 different brands will be returned, together with the quantity of products for each brand - depending on the input parameter FacetValueLimit.

Facets cannot only be built on the DataField "Brand", but over all following data fields:

  • AffilinetCategoryId
  • AffilinetCategoryPathFacet (*)
  • ArticleNumber
  • Brand
  • Distributor
  • EAN
  • Manufacturer
  • ProgramId
  • Property_*
  • ShopCategoryId
  • ShopCategoryPathFacet (*)
  • ShopId
  • ShopName

(*) Please note: ShopCategoryPathFacet returns the following information, separated with the character ^:

  • The Id of the category, which you should use in a possible FilterQuery
  • The name of the category, which belongs to this Id
  • The Ids of all parent categories along the category's path
  • The names of all parent categories along the category's path

So if 234 of all the products, which match your current filter criteria, are in the category "HiFi", whose Id is 67890, then this returned facet would be:

<FacetValue>
    <FacetValueCount>234</FacetValueCount>
    <FacetValueName>67890^HiFi^12345>67890^Electronics>HiFi</FacetValueName>
</FacetValue>

The reason for this is the common use case where this facet value is intended to be used as a filter query: you might want to display after a query that e.g. 234 products have been found in the category "HiFi", and if you want your customers to be able to click on "HiFi" and see only those 234 products, you need the CategoryId of "HiFi" to fill SearchProductsRequest (which can be obtained by splitting on the ^ character). Or you could let your customer click on the parent category "Electronics" and then formulate a request restricted on that category 12345 - the several information components of ShopCategoryPathFacet can be used for various objectives.

Same applies to AffilinetCategoryPathFacet.

The facets that get returned can be used as filter queries.

Further reading: http://en.wikipedia.org/wiki/Faceted_search

PHP SDK

If you are a PHP developer you can use our PHP SDK for the product data webservices.

> Product Data PHP SDK