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: <ul><li>all: All available promotions are returned</li><li>product: Only product promotions are returned</li><li>order: Only order promotions are returned</li></ul> |
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