younifyd
Menu

Get Coupon Codes

Get Coupon Codes

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

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Coupon Codes action (under Coupons (Data API)).
  3. Fill in the fields below, then reference the result from later steps as {{getCouponCodes.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.

limitinteger (int32)

Maximum records to retrieve per request, not to exceed 200. Defaults to 25.

Default 25

offsetinteger (int32)

Used to retrieve the results based on a particular resource offset.

Default 0

Response

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

dataarray<object>

The collection of coupon codes.

codestringrequired

The code used to redeem the coupon.

issuedbooleanrequired

Flag indicating if the coupon code has been issued.

redemptionCountinteger (int32)required

The count of the number of redemptions associated with the code.

json
{
  "data": [
    {
      "code": "Code1",
      "issued": false,
      "redemptionCount": 0
    }
  ]
}

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

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