younifyd
Menu

Get Promotions

Return an array of enabled promotions for specified IDs.

GET/organizations/{organizationId}/promotions

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Promotions action (under Shopper Promotions).
  3. Fill in the fields below, then reference the result from later steps as {{getPromotions.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the organization the request is being made by

Query parameters

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

idsarray<string>required
localeoneOf

A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.

Response

Returns 200 with an object. Read it in later steps with {{getPromotions.response.data.<field>}}.

dataarray<object>

The array of promotion documents.

calloutMsgstring

The localized call-out message of the promotion.

currencystring

The currency that a promotion can be applied to. A null value means that the promotion applies to all allowed currencies.

detailsstring

The localized detailed description of the promotion.

endDatestring (date-time)

The end date of the promotion. This property follows the ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ . The time zone of the date time is always UTC.

idstringrequired

The unique ID of the promotion.

imagestring

The URL to the promotion image.

namestring

The localized name of the promotion.

startDatestring (date-time)

The start date of the promotion. This property follows the ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ. The time zone of the date time is always UTC.

json
{
  "data": [
    {
      "id": "$30FixedShippingAmountAbove150",
      "calloutMsg": "$30 Fixed Shipping Amount Above 150",
      "currency": "USD",
      "details": "$30 Fixed Shipping Amount Above 150",
      "endDate": "2015-07-04T21:00:00Z",
      "image": "string",
      "name": "$30 Fixed Shipping Amount Above 150",
      "startDate": "2015-07-04T21:00:00Z"
    }
  ]
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.