commerce/catalog/admin/couponsets

Use the Coupon Sets resource to view and create coupon sets. You can use coupon sets to group multiple coupon codes together and associate them with one or more discounts. Use the commerce/catalog/admin/couponsets/coupons subresource to manage the coupon codes within manual coupon sets. Use the commerce/catalog/admin/couponsets/assigneddiscounts subresource to mange the discounts assigned to coupon sets.

JSON Example

CouponSet Properties

Property Description
assignedDiscountCount

type: int

The total number of discounts assigned to or associated with this coupon set. When you perform a GetCouponSet or GetCouponSets operation, set the includeCounts operation parameter to true to view this field.

This field is read only.

auditInfo

type: auditInfo

Basic audit info about the object, including date, time, and user account. This data may be captured when creating, updating, and removing data.

auditInfo.createBy

type: string

Identifier of the user that created the object. System created and read only.

auditInfo.createDate

type: DateTime

The date and time in UTC format set when the object was created.

auditInfo.updateBy

type: string

Identifier of the user that updated the entity most recently.

auditInfo.updateDate

type: DateTime

The date and time in UTC format the object was updated most recently.

canBeDeleted

type: bool

Specifies whether the coupon set can be deleted. You cannot delete a coupon set if any of the coupons within the coupon set have been redeemed.

This value is read only.

couponCodeCount

type: int

The total number of coupon codes within the coupon set. When you perform a GetCouponSet or GetCouponSets operation, set the includeCounts operation parameter to true to view this field.

This field is read only.

couponCodeType

type: string

Determines whether the coupon set is a manual coupon set or a generated coupon set.

Valid values for this field are: "Generated" and "Manual".

couponSetCode

type: string

The unique identifier of the coupon set. This value is also used as the coupon code prefix in generated coupon sets. If you specify a value, it must be unique to the catalog. If you leave this field empty or null, Kibo eCommerce generates one. Use the GetUniqueCouponSetCode operation to retrieve a unique, random four character code.

This value has a maximum length of 32. This value is required.

endDate

type: DateTime

The date and time in UTC format that the coupon set and the coupon codes in the coupon set expire.

id

type: int

Unique identifier of the source property, such as a catalog, discount, order, or email template.

For a product field it will be the name of the field.

For a category ID, must be a positive integer not greater than 2000000. By default, Kibo eCommerce auto-generates a category ID when categories are created. If you want to specify an ID during creation (which preserves category link relationships when migrating tenant data from one sandbox to another), you must also include the useProvidedId query string in the endpoint. For example, api/commerce/catalog/admin/categories/?useProvidedId=true. Then, use the id property to specify the desired category ID.

For a product attribute it will be the Attribute FQN.

For a document, the ID must be specified as a 32 character, case-insensitive, alphanumeric string. You can specify the ID as 32 sequential characters or as groups separated by dashes in the format 8-4-4-4-12. For example, bba0a1a885e2413bb097ceacf7bac366
or
bba0a1a8-85e2-413b-b097-ceacf7bac366.

For email templates, the ID must be one of the following values:
BackInStock
OrderChanged
OrderShipped
OrderFulfillmentDetailsChanged
ShopperLoginCreated
ShopperPasswordReset
ReturnCreated
ReturnAuthorized
ReturnUpdated
ReturnRejected
ReturnCancelled
ReturnClosed
RefundCreated
StoreCreditCreated
StoreCreditUpdated
GiftCardCreated

maxRedemptionsPerCouponCode

type: int

The maximum number of times any coupon code in the coupon set can be used. This value must be either null, greater than or equal to 1, or -1. A value of -1 indicates unlimited.

If you leave this value null, Kibo eCommerce defaults this value to 1 when you create the coupon set.

maxRedemptionsPerUser

type: int

The maximum number of times any single shopper can redeem any coupon code in the coupon set. This value must be either null, greater than or equal to 1, or -1. A value of -1 indicates unlimited.

If you leave this value null, Kibo eCommerce defaults this value to 1 when you create the coupon set.

name

type: string

The user supplied name that appears in Admin. You can use this field for identification purposes.

redemptionCount

type: int

The total number of all redeemed coupons within the coupon set. When you perform a GetCouponSet or GetCouponSets operation, set the includeCounts operation parameter to true to view this field.

This field is read only.

setSize

type: int

The number of coupon codes within the coupon set.

This value is required when couponCodeType is "Generated".

startDate

type: DateTime

The date and time in UTC format that the coupon codes in the coupon set become active.

status

type: string

The current status of the object.

This value is read only. Valid values for this field are: "Active", "Expired", and "Inactive".

Operations

Operation Name Request URI Description
AddCouponSet POST %3fresponseFields%3d%7bresponseFields%7d

Adds a single coupon set to the catalog.

DeleteCouponSet DELETE %7bcouponSetCode%7d

Deletes a specified coupon set from the catalog. Use the couponSetCode parameter to specify the coupon set to delete.

GetCouponSet GET %7bcouponSetCode%7d%3fincludeCounts%3d%7bincludeCounts%7d%26responseFields%3d%7bresponseFields%7d

Retrieves the details of a single coupon set. Use the couponSetCode parameter to specify the coupon set. Use the includeCounts parameter to specify whether to include the number of redeemed coupons, existing coupon codes, and assigned discounts.

GetCouponSets GET %3fstartIndex%3d%7bstartIndex%7d%26pageSize%3d%7bpageSize%7d%26sortBy%3d%7bsortBy%7d%26filter%3d%7bfilter%7d%26includeCounts%3d%7bincludeCounts%7d%26responseFields%3d%7bresponseFields%7d

Retrieves a list of coupon sets in the catalog according to any specified filter criteria and sort options.

GetUniqueCouponSetCode GET unique-code%3fresponseFields%3d%7bresponseFields%7d

Returns a unique, random four character code to use for the couponSetCode.

UpdateCouponSet PUT %7bcouponSetCode%7d%3fresponseFields%3d%7bresponseFields%7d

Updates one or more properties of a coupon set in the catalog.

ValidateUniqueCouponSetCode POST validate-unique-code

Validates the couponSetCode and tests it for uniqueness.