PromotionError

An object to encapsulate information about a promotion.

appliedBusinessDate
integer

The YYYYMMDD integer for the business date that the promotion was applied at the given restaurant.

appliedDate
string <date-time>

The date when this promotion was applied. If not specified, set to the current system time. Use ISO 8601 date and time format for all Toast APIs.

appliedDiscountGuid
string

This GUID corresponds to an AppliedDiscount.guid contained in Check.appliedDiscounts, and indicates the applied discount that is associated with the promotion.

developerErrorMessage
string

Internal-only message that developers can use to better understand the error.

discountAmount
number <double>

The dollar amount of the discount that was applied. Please note that this amount should not include tax. Toast handles all tax calculations for discounts.

errorType
string

A specific type for well-known error states.

  • INVALID_REQUEST - Request does not contain proper or expected parameters or is otherwise malformed.
  • CODE_ALREADY_USED - The promotion code has already been used the maximum number of times.
  • CODE_NOT_EXIST - The promotion code does not exist.
  • CODE_NOT_APPLY - The promotion code does not apply to the given check.
  • CODE_INACTIVE - The promotion code was never activated for usage or was otherwise deactivated.
  • OTHER - The error cannot be categorized as one of the types listed above.

Enum: "INVALID_REQUEST" "CODE_ALREADY_USED" "CODE_NOT_EXIST" "CODE_NOT_APPLY" "CODE_INACTIVE" "OTHER"
externalId
required
string

The Toast-Transaction-GUID from the VERIFY request made to produce this applied promotion. This field should be populated by the provider in the response for verify requests.

name
string

The name of the applied discount. The name must be supplied by vendor and be guest-friendly, as it will appear on both the POS and the receipt.

promoCode
string

The promotion code that was applied for this discount.

referenceId
string

A string field that can be used by partners to store some id. Can only be filled on the VERIFY request; the response value will be included on the promotion for future requests.

userErrorMessage
string

A user-friendly error message to display to the restaurant employee on the POS.

{
  • "appliedDate": "2019-08-24T14:15:22Z",
  • "appliedBusinessDate": 0,
  • "promoCode": "string",
  • "name": "string",
  • "discountAmount": 0,
  • "referenceId": "string",
  • "externalId": "string",
  • "appliedDiscountGuid": "string",
  • "developerErrorMessage": "string",
  • "userErrorMessage": "string",
  • "errorType": "INVALID_REQUEST"
}