Poq.SDK.Node

Home > @poq/sdk-sfcc > IPromotionsClient > getPromotions

IPromotionsClient.getPromotions() method

Handles get promotion by filter criteria Returns an array of enabled promotions matching specified filter criteria. In the request URL, you must provide a campaign_id parameter, and you can optionally specify a date range by providing start_date and end_date parameters. Both parameters are required to specify a date range: omitting one causes the server to return a MissingParameterException fault. Each request returns only enabled promotions; the server does not consider promotion qualifiers or schedules.

Signature:

getPromotions(campaignId: string, startDate?: string, endDate?: string, currency?: string, options?: RequestOptions): Promise<PoqResponse<PromotionResult>>;

Parameters

Parameter Type Description
campaignId string Find the promotions assigned to this campaign (mandatory)
startDate string (Optional) The start date of the promotion in ISO8601 date time format: yyyy-MM-dd&#39;T&#39;HH:mmZ
endDate string (Optional) The end date of the promotion in ISO8601 date time format: yyyy-MM-dd&#39;T&#39;HH:mmZ
currency string (Optional) The currency mnemonic specified for price
options RequestOptions (Optional) Override http request option.

Returns:

Promise<PoqResponse<PromotionResult>>