Retrieve a promotion

Request

Only available to Buyer Users.

Security
OAuth2(Required scopes: FullAccessShopper)
Path
promotionIDstringrequired

ID of the promotion.

curl -i -X GET \
  'https://api.ordercloud.io/v1/me/promotions/{promotionID}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Only available to Buyer Users.

Bodyapplication/json
IDstring, <= 100 characters
Example:""
LineItemLevelboolean

If true, certain eligible expression requirements must be met, and the PromotionDiscount will be applied at the line item level.

Example:false
Codestring, <= 100 characters

Must be unique within a marketplace. Entered by buyer when adding promo to order. Required when GeneratedCodeCount is 0.

Example:""
Namestring, <= 100 characters
Example:""
RedemptionLimitinteger, (int32)

Limit the total number of orders this promotion can be applied to across all users.

Example:0
RedemptionLimitPerUserinteger, (int32)

Limit the total number of orders this promotion can be applied to per user.

Example:0
RedemptionCountinteger, (int32)read-only

The number of times this promotion has been applied to an order.

Example:0
QuantityLimitPerOrderinteger, (int32), >= 1

Can only be used when LineItemLevel is true and ItemLimitPerOrder does not have a value. When defined the ValueExpression will be the discount applied to each qualifying quantity of eligible items. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.

Example:0
ItemLimitPerOrderinteger, (int32), >= 1

Can only be used when LineItemLevel is true and QuantityLimitPerOrder does not have a value. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.

Example:0
ItemSortBystring, <= 200 characters

Comma delimited list of properties to sort by. Can only be used when ItemLimitPerOrder is true. Used to determine the order in which the promotion is applied to the specified limit of items. Use ! to reverse sort order on a property.

Example:""
Descriptionstring, <= 2000 characters
Example:""
FinePrintstring, <= 2000 characters

For reference only. Terms, conditions, and other legal jargon.

Example:""
StartDatestring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
ExpirationDatestring, (date-time)
Example:"2018-01-01T00:00:00-06:00"
EligibleExpressionstring, <= 400 characters

The expression evaluated to determine if an item or order is eligible for a promotion. See rules engine documentation for formatting details.

Example:""
ValueExpressionstring, <= 1000 characters

The expression evaluated to determine the discount amount of an eligible promotion. See rules engine documentation for formatting details.

Example:""
CanCombineboolean

If true, the promotion can be applied to an order that already other promotions applied, as long as they can also be combined.

Example:false
AllowAllBuyersboolean

Allow promo to be used by all buyers without creating explicit assignments.

Example:false
OwnerIDstring

ID of the organization that owns the promotion. Only the marketplace owner can override the OwnerID on create.

Example:""
AutoApplyboolean
Default:false
Example:false
Activeboolean
Default:true
Example:false
UseIntegrationboolean
Example:false
Priorityinteger, (int32)

Used to control the order in which promotions are applied when calling the auto apply or refresh endpoint.

Example:0
GeneratedCodeCountinteger, (int32), [ 0 .. 100000 ]

Number of platform-generated single-use codes for this promotion. Mutually exclusive with Code.

GeneratedCodeLengthinteger, (int32), [ 6 .. 10 ]

Character length of each generated code (excluding prefix). Required when GeneratedCodeCount > 0.

GeneratedCodePrefixstring, <= 10 characters

Optional prefix prepended to generated codes, separated by a dash.

xpobject
Example:
{}
Response
{ "ID": "", "LineItemLevel": false, "Code": "", "Name": "", "RedemptionLimit": 0, "RedemptionLimitPerUser": 0, "RedemptionCount": 0, "QuantityLimitPerOrder": 0, "ItemLimitPerOrder": 0, "ItemSortBy": "", "Description": "", "FinePrint": "", "StartDate": "2018-01-01T00:00:00-06:00", "ExpirationDate": "2018-01-01T00:00:00-06:00", "EligibleExpression": "", "ValueExpression": "", "CanCombine": false, "AllowAllBuyers": false, "OwnerID": "", "AutoApply": false, "Active": false, "UseIntegration": false, "Priority": 0, "xp": {} }