younifyd
Menu

Get Coupon

Return coupon information for the specified coupon ID.

GET/organizations/{organizationId}/coupons/{couponId}

Use it in a workflow

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

Request

Path parameters

couponIdstringrequired

The ID of the coupon to create.

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.

Response

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

couponIdstring

The ID of the coupon.

creationDatestring (date-time)

Returns the value of attribute 'creationDate'.

descriptionstring

The description of the coupon.

enabledboolean

A flag indicating whether the coupon is enabled.

exportedCodeCountinteger (int32)

The number of coupon codes attached to the coupon that have been issued (read only).

lastModifiedstring (date-time)

Returns the value of attribute 'lastModified'.

redemptionCountinteger (int32)

The number of times the coupon has been redeemed (read only). The count is updated once per hour.

redemptionLimitsany

The redemption limit per coupon code.

singleCodestring

Single coupon code, only valid for Single Code type.

systemCodesConfigany

The configuration of system coupon codes, including prefix and number of codes.

totalCodesCountinteger (int32)

The total number of coupon codes associated with this coupon (read only). The count is updated once per hour.

typestring

The type of coupon code.

One ofsingle_codemultiple_codessystem_codes

json
{
  "couponId": "MyCoupon",
  "enabled": false,
  "type": "single_code",
  "creationDate": "2019-10-20T12:00:00Z",
  "description": "This coupon is used to give 10% off stuff.\n",
  "exportedCodeCount": 0,
  "lastModified": "2019-10-30T04:23:59Z",
  "redemptionCount": 3,
  "redemptionLimits": {
    "limitPerCode": 1,
    "limitPerCustomer": 1,
    "limitPerTimeFrame": {
      "limit": 2,
      "redemptionTimeFrame": 24
    }
  },
  "singleCode": "MyCode",
  "systemCodesConfig": {
    "codePrefix": "SG",
    "numberOfCodes": 500000
  },
  "totalCodesCount": 50
}

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

Was this page helpful?
Get Coupon — Salesforce Commerce Cloud — Documentation