Home > @vsf-enterprise/sap-commerce-webservices-sdk > PromotionsApi > getPromotions

PromotionsApi.getPromotions() method

Returns promotions defined for a current base site. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers and therefore some of them are currently not compatible with the new promotion engine. Get a list of promotions.

Signature:

getPromotions(baseSiteId: string, type: 'all' | 'product' | 'order', fields?: string, promotionGroup?: string, options?: any): Promise<import("axios").AxiosResponse<PromotionList>>;

Parameters

Parameter Type Description
baseSiteId string Base site identifier
type 'all' | 'product' | 'order' Defines what type of promotions should be returned. Values supported for that parameter are: &lt;ul&gt;&lt;li&gt;all: All available promotions are returned&lt;/li&gt;&lt;li&gt;product: Only product promotions are returned&lt;/li&gt;&lt;li&gt;order: Only order promotions are returned&lt;/li&gt;&lt;/ul&gt;
fields string Response configuration. This is the list of fields that should be returned in the response body. Examples: BASIC, DEFAULT, FULL
promotionGroup string Only promotions from this group are returned
options any Override http request option.

Returns:

Promise<import("axios").AxiosResponse<PromotionList>>

Exceptions

{RequiredError} PromotionsApi