# Class ProductsRequest

Search for products

  Affilinet\ProductData\Requests\AbstractRequest implements Affilinet\ProductData\Requests\RequestInterface
  Affilinet\ProductData\Requests\ProductsRequest implements Affilinet\ProductData\Requests\ProductsRequestInterface uses Affilinet\ProductData\Requests\Traits\ImageTrait, Affilinet\ProductData\Requests\Traits\LogoTrait, Affilinet\ProductData\Requests\Traits\PaginationTrait

Namespace: Affilinet\ProductData\Requests
Located at Affilinet/ProductData/Requests/ProductsRequest.php

Methods summary
`public `Affilinet\ProductData\Responses\ResponseElements\Product`|null` | # `findOne( integer $productId )` Find one Product by Id Find one Product by Id #### Parameters $productId #### Returns `Affilinet\ProductData\Responses\ResponseElements\Product`|null #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::findOne()`
`public `Affilinet\ProductData\Responses\ProductsResponse`` | # `send( )` #### Returns `Affilinet\ProductData\Responses\ProductsResponse` #### Throws `Affilinet\ProductData\Exceptions\AffilinetProductWebserviceException` #### Implementation of `Affilinet\ProductData\Requests\RequestInterface::send()`
`public Psr\Http\Message\RequestInterface` | # `getPsr7Request( )` #### Returns Psr\Http\Message\RequestInterface #### Overrides `Affilinet\ProductData\Requests\AbstractRequest::getPsr7Request()` #### Implementation of `Affilinet\ProductData\Requests\RequestInterface::getPsr7Request()`
`public string` | # `getEndpoint( )` Get the URI to where this request should be sent Get the URI to where this request should be sent #### Returns string #### Implementation of `Affilinet\ProductData\Requests\RequestInterface::getEndpoint()`
`public `Affilinet\ProductData\Responses\ProductsResponseInterface`` | # `find( array $productIds )` #### Parameters $productIds #### Returns `Affilinet\ProductData\Responses\ProductsResponseInterface` #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::find()`
`public `Affilinet\ProductData\Requests\ProductsRequest`` | # `excludeShopIds( array $shopIDs )` Exclude ShopIDs from result Exclude ShopIDs from result 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 ShopIds is ‘0’, then the search is performed across all shops with which the requesting publisher has an accepted partners #### Parameters $shopIDs #### Returns `Affilinet\ProductData\Requests\ProductsRequest` #### Throws `Affilinet\ProductData\Exceptions\AffilinetProductWebserviceException` #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::excludeShopIds()`
`public` | # `onlyFromShop( `Affilinet\ProductData\Responses\ResponseElements\ShopInterface` $shop )` #### Parameters $shop #### Returns $this #### Throws `Affilinet\ProductData\Exceptions\AffilinetProductWebserviceException` #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::onlyFromShop()`
`public `Affilinet\ProductData\Requests\ProductsRequest`` | # `onlyFromShopIds( array $shopIDs )` #### Parameters $shopIDs #### Returns `Affilinet\ProductData\Requests\ProductsRequest` #### Throws `Affilinet\ProductData\Exceptions\AffilinetProductWebserviceException` #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::onlyFromShopIds()`
`public` | # `onlyFromShops( array $shops )` #### Parameters $shops array #### Returns $this #### Throws `Affilinet\ProductData\Exceptions\AffilinetProductWebserviceException` #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::onlyFromShops()`
`public` | # `onlyFromShopCategory( `Affilinet\ProductData\Responses\ResponseElements\CategoryInterface` $category )` #### Parameters $category #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::onlyFromShopCategory()`
`public` | # `onlyFromCategories( array $categoryIds, boolean $excludeSubCategories = false, boolean $useAffilinetCategories = true )` #### Parameters $categoryIds $excludeSubCategories $useAffilinetCategories #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::onlyFromCategories()`
`public` | # `onlyFromShopCategories( array $categories )` #### Parameters $categories #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::onlyFromShopCategories()`
`public` | # `onlyWithImage( boolean $withImageOnly = true )` #### Parameters $withImageOnly #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::onlyWithImage()`
`public` | # `sort( string $sortBy = 'Score', boolean $descending = true )` #### Parameters $sortBy $descending #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::sort()`
`public` | # `minPrice( float|integer|string $price )` #### Parameters $price #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::minPrice()`
`public` | # `maxPrice( float|integer|string $price )` #### Parameters $price #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::maxPrice()`
`public` | # `addFacetArticleNumber( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetArticleNumber()`
`public` | # `addFacetBrand( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetBrand()`
`public` | # `addFacetDistributor( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetDistributor()`
`public` | # `addFacetEAN( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetEAN()`
`public` | # `addFacetManufacturer( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetManufacturer()`
`public` | # `addFacetProgramId( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Deprecated Since there is no valid Filter Query to filter this facets results this method will be removed #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetProgramId()`
`public` | # `addFacetShopId( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetShopId()`
`public` | # `addFacetShopName( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Deprecated Since there is no valid Filter Query to filter this facets results this method will be removed #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetShopName()`
`public` | # `addFacetAffilinetCategoryId( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetAffilinetCategoryId()`
`public` | # `addFacetAffilinetCategoryPath( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetAffilinetCategoryPath()`
`public` | # `addFacetShopCategoryId( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetShopCategoryId()`
`public` | # `addFacetShopCategoryPath( integer $facetValueLimit = self::DEFAULT_FACET_VALUE_LIMIT )` #### Parameters $facetValueLimit #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFacetShopCategoryPath()`
`public` | # `addRawQuery( $query )` #### Parameters $query #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addRawQuery()`
`public ProductsRequestInterface;` | # `query( `Affilinet\ProductData\Requests\Helper\QueryInterface` $query )` #### Parameters $query #### Returns ProductsRequestInterface; #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::query()`
`public` | # `addFilterQuery( $name, $value )` #### Parameters $name $value #### Returns $this #### Implementation of `Affilinet\ProductData\Requests\ProductsRequestInterface::addFilterQuery()`

Methods inherited from Affilinet\ProductData\Requests\AbstractRequest
`__construct(), getAffilinetClient(), serialize(), serializeWithCredentials(), unserialize()`

Methods inherited from Affilinet\ProductData\Requests\ProductsRequestInterface
`addProductImage(), addProductImageWithSize120px(), addProductImageWithSize180px(), addProductImageWithSize30px(), addProductImageWithSize60px(), addProductImageWithSize90px(), addShopLogoWithSize120px(), addShopLogoWithSize150px(), addShopLogoWithSize468px(), addShopLogoWithSize50px(), addShopLogoWithSize90px(), page(), pageSize()`

Methods used from Affilinet\ProductData\Requests\Traits\ImageTrait
`addAllProductImages(), addProductImage(), addProductImageWithSize120px(), addProductImageWithSize180px(), addProductImageWithSize30px(), addProductImageWithSize60px(), addProductImageWithSize90px()`

Methods used from Affilinet\ProductData\Requests\Traits\LogoTrait
`addAllShopLogos(), addShopLogoWithSize120px(), addShopLogoWithSize150px(), addShopLogoWithSize468px(), addShopLogoWithSize50px(), addShopLogoWithSize90px()`

Methods used from Affilinet\ProductData\Requests\Traits\PaginationTrait
`page(), pageSize()`

Constants summary
`string` | `ENDPOINT` #### Const string The base URI of the product data webservice. | # `'https://product-api.affili.net/V3/productservice.svc/JSON/SearchProducts'`
`string` | `ENDPOINT_ALTERNATE` | # `'https://product-api.affili.net/V3/productservice.svc/JSON/GetProducts'`
`string` | `SORT_BY_RELEVANCE` | # `'Score'`
`string` | `SORT_BY_PRICE` | # `'Price'`
`string` | `SORT_BY_PRODUCT_NAME` | # `'ProductName'`
`string` | `SORT_BY_LAST_PROGRAM_LIST_UPDATE` | # `'LastImported'`

Constants inherited from Affilinet\ProductData\Requests\ProductsRequestInterface
`DEFAULT_FACET_VALUE_LIMIT`

Properties inherited from Affilinet\ProductData\Requests\AbstractRequest
`$affilinetClient, $queryParams`