{"componentChunkName":"component---src-templates-redoc-operation-js","path":"/promotions/tag/Data-definitions/schema/AppliedServiceCharge/","result":{"data":{"contentItem":{"type":"redoc-operation","link":"/promotions/tag/Data-definitions/schema/AppliedServiceCharge/","data":{"redocStoreStr":"{\"menu\":{\"activeItemIdx\":-1},\"definition\":{\"data\":{\"openapi\":\"3.0.0\",\"info\":{\"version\":\"1.0.0\",\"title\":\"Toast promotions integration API - draft\",\"contact\":{\"name\":\"Toast developer support\"}},\"paths\":{\"/promotion\":{\"post\":{\"summary\":\"Endpoint to handle all promotion-related requests.\",\"description\":\"Takes in an optional JSON `PromotionRequest` body and performs a promotion operation defined by the specified `Toast-Transaction-Type`.\\n- <code>PROMOTION_VERIFY</code>:\\n   Verifies whether a given promotion code is applicable to a check. Confirms that the promotion code is available for use, the check meets the criteria of the promotion, and that no other, conflicting promotions or discounts are applied.\\n   <br/><br/>\\n   Each unique `PROMOTION_VERIFY` request has a unique GUID. Providers can cache a response based on a `Toast-Transaction-GUID`.\\n   <br/><br/>\\n   If the request is valid (it is properly formatted and the promotion code can be applied), then the API returns a corresponding `PromotionObject`\\n   that is applicable to the check provided in the `PromotionRequest`. This `PromotionObject` contains the proper state of the promotion,\\n   including the amount to take off the check (as calculated by the provider), the name of the promotion, and the `appliedDate`. It is recommended\\n   that the provider use the `appliedDate` provided by the `VerifyPromotionRequest`.\\n   <br/><br/>\\n   This operation must be idempotent, such that the same request must always get the same response (barring any separate apply/void requests).\\n   The provider should reserve a promotion code based on a `PROMOTION_VERIFY` response, and may wish to use a composite key of <i>(check.guid, restaurant-external-guid)</i>.\\n   Providers should use the `Toast-Transaction-GUID` to prevent replayed requests from reserving the promotion more than once. Additionally, the `Toast-Transaction-GUID` acts\\n   as an identifier for the promotion in future requests.\\n   <br/><br/>\\n   The average response time for a promotion verify request should be 500ms, with the maximum response time being 2s.\\n   <br/><br/>\\n- <code>PROMOTION_REVALIDATE</code>:\\n   Revalidates all `AppliedPromotions` provided on an `RevalidatePromotionsRequest` (in the `promotionsToActOn` field). This should check that all promotions in that field\\n   are still applicable to the provided check, and represent the correct amount. The promotions in `promotionsToActOn` are not APPLIED.\\n   <br/><br/>\\n   If the `PROMOTION_REVALIDATE` request is valid (it is properly formatted and the promotion code can be applied), then the API returns a 200 response with\\n   a list of all <code>AppliedPromotion</code> objects from `promotionsToActOn` with up-to-date values. If the total discount of a promotion is different than what was provided, the corresponding\\n   `AppliedPromotion` response should have this new value.\\n   <br/>\\n   The promotions that are not included in `promotionsToActOn` are immutable because they have been APPLIED, and can no longer be removed from the check.\\n   <br/><br/>\\n   If there are any promotions that are invalid, the API returns a 400 response with an `ErrorResponse` object. The `ErrorResponse` should contain all\\n   invalid promotions. Toast will resend a request to the revalidate endpoint after removing all invalidated promotions.\\n   <br/><br/>\\n   This operation must be idempotent, such that the same request must always get the same response (barring any separate apply/void requests). If promotions are locked,\\n   their unlocking time should be refreshed upon this request. If promotion locks have expired, they should acquire a new lock.\\n   <br/><br/>\\n   The average response time for a revalidate request should be 500ms, with the maximum response time being 2s.\\n   <br/><br/>\\n- <code>PROMOTION_APPLY</code>:\\n   Redeems all `AppliedPromotions` provided on an `ApplyPromotionsRequest` (in the `promotionsToActOn` field). If the redemption is successful, the API commits the transaction and returns a 200 response.\\n   <br/><br/>\\n   Each unique `PROMOTION_APPLY` request will have a unique GUID, which will be referenced later to verify the state of a promotion code or to void a previously\\n   applied promotion code. If the request contains a `Toast-Transaction-GUID` that has already been committed or voided for a different check GUID,\\n   the API provider must return a 400 response with the appropriate `ErrorResponse` object. If there are any issues applying promotions, the API provider must return a 400\\n   response, and we will revalidate our existing promotions.\\n   <br/><br/>\\n   If the request is valid (it is properly formatted and the promotion code can be applied), then the API returns a list of `AppliedPromotion` objects\\n   that are applicable to the check provided in the `PromotionRequest`. Each `AppliedPromotion` object contains the proper state of the promotion,\\n   including the amount to be taken off the check (as calculated by the provider).\\n   <br/><br/>\\n   This operation must be considered idempotent for multiple requests with the same `Toast-Transaction-GUID` and the same check GUID, for a 24 hour period (that is, it should apply once and only once).\\n   <br/><br/>\\n   The average response time for an apply promotion request should be 500ms, with the maximum response time being 2s.\\n   <br/><br/>\\n- <code>PROMOTION_STATUS</code>:\\n   Responds with the `PromotionObject` or `ErrorResponse` that is associated with the provided `Toast-Transaction-GUID`, as well as the status of the redemption\\n   (\\\"VERIFIED\\\", \\\"VOIDED\\\", or \\\"APPLIED\\\").\\n   If the transaction GUID is not associated with a promotion that was VERIFIED, the response code is 400.\\n   <br/><br/>\\n   The average response time for a promotion status request should be 500ms, with the maximum response time being 2s.\\n   <br/><br/>\\n- <code>PROMOTION_VOID</code>:\\n   Voids supplied promotions from a `VoidPromotionsRequest` (in the `appliedPromotions` field).\\n   This endpoint is called when the entire check is voided, or the promotion is removed from the check. This endpoint is called on\\n   promotions that are verified as well as committed. If called on a non-committed promotion AND there is a lock placed on the\\n   promotion, the lock should be lifted, allowing another user to potentially use the promotion code.\\n   If the promotions have already been voided, then nothing should change for those.\\n   <br/><br/>\\n   This call must be idempotent for multiple requests with the same `Toast-Transaction-GUID`. The `Toast-Transaction-GUID` may be used to cache\\n   a response, and to prevent a replay attack.\\n   <br/><br/>\\n   The average response time for a promotion void request should be 500ms, with the maximum response time being 2s.\\n   <br/><br/>\\n\",\"parameters\":[{\"name\":\"Authorization\",\"description\":\"Contains configured authorization information.\\nThis should be used by the client to verify the identity of the sender\\n<br/><br/>\\nContains an OAuth bearer token in <a href=\\\"https://tools.ietf.org/html/rfc7519\\\">JWT (JSON Web Token) format</a>.\\n<br/><br/>\\nSignature is to be verified by the partner with the public session verification key, available at `https://[toast-api-hostname]/usermgmt/v1/oauth/token_key`. \\nThe public session verification key can be cached by the partner, but Toast reserves the right to change the public key at any time. A refresh rate of once a day, and upon an unsuccessful validation of token, is recommended.\\n<br/><br/>\\nThe token contains expiry date information. Requests older than the expiry date should be ignored.\\n<br/><br/>\\nThe recommended Java implementation of JSON Web Token (JWT) is <a href=\\\"https://github.com/auth0/java-jwt\\\">auth0 java-jwt</a>.\\n<br/><br/>\\nThe public key is provided in RSA format. Use the RSA256 algorithm to authorize the token.\\n\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"string\"}},{\"name\":\"Toast-Transaction-GUID\",\"description\":\"The identifier of the promotion request. Based on the requestType, it is used for different functions:\\n  - <code>PROMOTION_VERIFY</code> requests use a new, unique GUID for each request to verify if a promotion code is applicable to a check. The `Toast-Transaction-GUID` is used to identify\\n    the new promotion in future requests.\\n  - <code>PROMOTION_REVALIDATE</code> requests use a new, unique GUID for each request to verify if promotions are still applicable to a check.\\n  - <code>PROMOTION_APPLY</code> requests use a new, unique GUID to commit promotion codes on a given check. If the same `Toast-Transaction-GUID` is used on the same check with the same promo\\n    codes, it should return the same result as before, without decrementing usage of the promotion code.\\n  - <code>PROMOTION_STATUS</code> requests, given an already used `Toast-Transaction-GUID`, will give status information for the transaction.\\n  - <code>PROMOTION_VOID</code> requests, given a unique `Toast-Transaction-GUID`, void promotion code usages.\\n\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"Toast-Restaurant-External-ID\",\"description\":\"The ID that identifies the restaurant for this configuration.\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"string\"}},{\"name\":\"Toast-Transaction-Type\",\"description\":\"The type of operation.\",\"in\":\"header\",\"required\":true,\"schema\":{\"type\":\"string\",\"format\":\"string\",\"enum\":[\"PROMOTION_VERIFY\",\"PROMOTION_REVALIDATE\",\"PROMOTION_APPLY\",\"PROMOTION_STATUS\",\"PROMOTION_VOID\"]}}],\"requestBody\":{\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PromotionRequest\"}}},\"description\":\"A JSON `PromotionRequest` or `VerifyPromotionRequest` object\\ncontaining information about an order and promotion code. **Note:**\\n`VerifyPromotionRequest` is a subtype of `PromotionRequest`. If\\npassed during a void, to void all promotions associated with it.\\n\"},\"responses\":{\"200\":{\"description\":\"Returns a JSON `PromotionObject`\\n representing the response if this was a <code>PROMOTION_VERIFY</code> or <code>PROMOTION_APPLY</code> request.\\nReturns 200 for a successful <code>PROMOTION_VOID</code> request.\\npromotion codes should only be \\\"used up\\\" on a <code>PROMOTION_APPLY</code> request.\\n\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/PromotionObject\"}}}},\"400\":{\"description\":\"Invalid request. Returns a JSON `ErrorResponse`\\nto describe why the request was not valid.\\nReasons for an `ErrorResponse` can include a bad request (such as invalid format or missing information),\\nor if the promotion code transaction being voided has never been seen.\\n\",\"content\":{\"application/json\":{\"schema\":{\"$ref\":\"#/components/schemas/ErrorResponse\"}}}},\"401\":{\"description\":\"Not properly authorized to make this request.\"},\"500\":{\"description\":\"An unexpected internal error occurred.\"}}}}},\"servers\":[{\"url\":\"https://your-api-server/promotions/v1\"}],\"components\":{\"schemas\":{\"Check\":{\"type\":\"object\",\"description\":\"Represents a single check within an order.\",\"allOf\":[{\"$ref\":\"#/components/schemas/ExternalReference\"},{\"type\":\"object\",\"required\":[\"selections\"],\"properties\":{\"openedDate\":{\"description\":\"The date and time when this check was opened. If not specified, set to the current system time.\",\"type\":\"string\",\"format\":\"date-time\"},\"closedDate\":{\"description\":\"The most recent date and time when this check's payment status was set to CLOSED.\",\"type\":\"string\",\"format\":\"date-time\"},\"modifiedDate\":{\"description\":\"The most recent date and time when this check was modified.\",\"type\":\"string\",\"format\":\"date-time\"},\"deletedDate\":{\"description\":\"The date and time when this check was deleted. `deletedDate` is only applicable when `deleted` is true. If the check is not deleted, defaults to `1970-01-01T00:00:00.000+0000`.\",\"type\":\"string\",\"format\":\"date-time\"},\"deleted\":{\"type\":\"boolean\",\"description\":\"True if this check has been deleted.\"},\"createdDevice\":{\"$ref\":\"#/components/schemas/Device\"},\"selections\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/Selection\"}},\"customer\":{\"$ref\":\"#/components/schemas/Customer\"},\"appliedLoyaltyInfo\":{\"$ref\":\"#/components/schemas/AppliedLoyaltyInfo\"},\"taxExempt\":{\"type\":\"boolean\",\"default\":false,\"description\":\"True if this check is tax exempt. Tax exempt number is not yet supported.\"},\"displayNumber\":{\"type\":\"string\",\"description\":\"Generally starts at 1 each day and counts up. Toast will supply a `displayNumber` if one is not specified when POSTing. The `displayNumber` is not a unique identifier.\"},\"appliedServiceCharges\":{\"type\":\"array\",\"description\":\"Any restaurant-configured service charges that applied to this check.\",\"items\":{\"$ref\":\"#/components/schemas/AppliedServiceCharge\"}},\"amount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The subtotal amount due on this check in USD, after discounts but before tax.\"},\"taxAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The computed tax amount in USD. Includes service charge and item-level taxes.\"},\"totalAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The total amount due on this check in USD, including discounts and taxes.\"},\"payments\":{\"type\":\"array\",\"description\":\"Payments made on this check.\",\"minItems\":0,\"items\":{\"$ref\":\"#/components/schemas/Payment\"}},\"tabName\":{\"type\":\"string\",\"description\":\"The name taken by a restaurant employee to identify the order. This name appears on the KDS (Kitchen Display System) for pending orders. The `tabName` can be up to 255 characters in length.\"},\"appliedDiscounts\":{\"type\":\"array\",\"description\":\"The discounts applied to this check. In a `POST` request, only one `appliedDiscount` is allowed per check.\",\"minItems\":0,\"items\":{\"$ref\":\"#/components/schemas/AppliedDiscount\"}},\"voided\":{\"type\":\"boolean\",\"description\":\"True if this check has been voided.\"},\"voidDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The date and time when this check was voided.\"},\"voidBusinessDate\":{\"type\":\"integer\",\"description\":\"The business date (yyyymmdd) on which this check was voided.\"},\"paidDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The most recent date and time when this check received payment. If not specified when POSTing, set to the current system time.\"}}}]},\"Device\":{\"type\":\"object\",\"description\":\"The *Device ID* value that the Toast POS system assigns to a specific Toast POS device. The `id` value is a unique identifier for a device. To find the ID for a Toast POS device, do the following. From the overflow  menu (⋮) select *Device Status* and then select the *Device* tab.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"The physical id of the device\"}}},\"Selection\":{\"type\":\"object\",\"description\":\"A `Selection` object can represent either a primary menu item (that is, Check.selections) or a modifier (Selection.modifiers) selection. <br><br> All selections must have valid `item` and `itemGroup` fields. `quantity` defaults to 1. <br><br> To specify a modifier selection, add it to the `modifiers` list of another selection. For each modifier selection, its `optionGroup` field must be set correctly, because a menu item can be included in multiple menu option groups, potentially with different prices or sizing. \",\"allOf\":[{\"$ref\":\"#/components/schemas/ExternalReference\"},{\"type\":\"object\",\"required\":[\"item\",\"quantity\"],\"properties\":{\"item\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"itemGroup\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"optionGroup\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"preModifier\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"quantity\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Quantity ordered. A decimal number for items sold by weight; a counting number for discrete items.\"},\"selectionType\":{\"type\":\"string\",\"description\":\"Specifies whether this selection is a special request or other off-menu sale. If left null or set to NONE, describes a normal modifier or item selection.\",\"enum\":[\"NONE\",\"OPEN_ITEM\",\"SPECIAL_REQUEST\",\"PORTION\"]},\"salesCategory\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"appliedDiscounts\":{\"type\":\"array\",\"description\":\"The itemized discounts applied to this item.\",\"minItems\":0,\"items\":{\"$ref\":\"#/components/schemas/AppliedDiscount\"}},\"deferred\":{\"type\":\"boolean\",\"description\":\"Defines whether this selection is a deferred revenue transaction, such as a gift card sale.\"},\"preDiscountPrice\":{\"type\":\"number\",\"description\":\"Gross sale price for this selection. Excludes tax.\",\"format\":\"double\"},\"price\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"Net price for this selection. The final price of the item after considering discounts (including discounts at the check level), quantity adjustments, and modifier prices at the time the item was selected for purchase.\"},\"tax\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The total tax amount for this selection.\"},\"voided\":{\"type\":\"boolean\",\"description\":\"True if this selection has been voided.\"},\"voidDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The date and time when this selection was voided.\"},\"voidBusinessDate\":{\"type\":\"integer\",\"description\":\"The business date (yyyymmdd) on which this selection was voided.\"},\"voidReason\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"displayName\":{\"type\":\"string\",\"description\":\"The display name of the selection. This field can be used to set a special request value, otherwise it will be generated from this selection's `item` property.\"},\"createdDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The date and time when this selection was created. If not specified, set to the current date and time.\"},\"modifiedDate\":{\"type\":\"string\",\"format\":\"date-time\",\"description\":\"The date and time when this selection was last modified. If not specified, set to the current date and time.\"},\"modifiers\":{\"type\":\"array\",\"description\":\"A list of modifiers applying to the `item` in this `Selection`.\",\"items\":{\"$ref\":\"#/components/schemas/Selection\"}},\"fulfillmentStatus\":{\"type\":\"string\",\"default\":\"NEW\",\"description\":\"Indicates the stage of the preparation workflow that the\\nselected menu item is in. The `fulfillmentStatus` of a\\nmenu item selection changes as restaurant employees move\\nthe item through the functions of the Toast POS including \\norder entry on a device and prep station display on a KDS.\\n\\n<ul>\\n  <li>`NEW` - The item has been added to a\\n    check but has not been sent to the KDS for\\n    preparation.</li>\\n  <li>`HOLD` - The item has been added to a\\n    check and a restaurant employee has paused the \\n    order so that it does not yet appear on the\\n    KDS for preparation.</li>\\n  <li>`SENT` - The item has been fired to the prep \\n    station and a ticket is printed or appears on the \\n    KDS for preparation.</li>\\n  <li>`READY` - Preparation is complete, the item\\n    has been fulfilled and no longer appears on\\n    the KDS. If your restaurant uses printers instead of the \\n    Toast POS KDS, items in an order do not reach the `READY`\\n    status.</li>\\n</ul>\\n\",\"enum\":[\"NEW\",\"HOLD\",\"SENT\",\"READY\"]},\"appliedTaxes\":{\"type\":\"array\",\"description\":\"An array of `AppliedTaxRate` objects that contain information about tax payments made for the selection.\",\"items\":{\"$ref\":\"#/components/schemas/AppliedTaxRate\"}}}}]},\"Customer\":{\"type\":\"object\",\"allOf\":[{\"$ref\":\"#/components/schemas/ToastReference\"},{\"type\":\"object\",\"required\":[\"firstName\",\"lastName\",\"email\",\"phone\"],\"properties\":{\"firstName\":{\"type\":\"string\"},\"lastName\":{\"type\":\"string\"},\"phone\":{\"type\":\"string\"},\"email\":{\"type\":\"string\"}}}]},\"AppliedServiceCharge\":{\"type\":\"object\",\"description\":\"A percentage/open/fixed service charge added to a check which could, in general, represent an upcharge like a gratuity or delivery fee. Whether the upcharge is taxable is defined in the restaurant-configured `serviceCharge`. The values for the AppliedServiceCharge are computed based on the referenced `serviceCharge` configuration.\",\"allOf\":[{\"$ref\":\"#/components/schemas/ExternalReference\"},{\"type\":\"object\",\"required\":[\"serviceCharge\"],\"properties\":{\"chargeAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The final applied amount excluding tax. This is required if the amountType is OPEN.\"},\"serviceCharge\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"chargeType\":{\"description\":\"Derived from `serviceCharge`. An OPEN service charge can either be a dollar amount or a percentage. Response only.\",\"type\":\"string\",\"enum\":[\"FIXED\",\"PERCENT\",\"OPEN\"]},\"name\":{\"description\":\"Derived from `serviceCharge`. The configured, user-friendly label for the service charge. Response only.\",\"type\":\"string\"},\"delivery\":{\"description\":\"Derived from `serviceCharge`. Defines whether this service charge is a delivery charge.\",\"type\":\"boolean\"},\"gratuity\":{\"description\":\"Derived from `serviceCharge`. Defines whether this service charge is a gratuity. Can be used to derive a required tip amount on the check.\",\"type\":\"boolean\"},\"taxable\":{\"description\":\"Derived from `serviceCharge`. Defines whether this service charge is taxable.\",\"type\":\"boolean\"},\"appliedTaxes\":{\"type\":\"array\",\"description\":\"Derived from `serviceCharge`. Identifies the taxes applied to the service.\",\"items\":{\"$ref\":\"#/components/schemas/AppliedTaxRate\"}}}}]},\"AppliedTaxRate\":{\"type\":\"object\",\"description\":\"A tax rate applied to a menu item or service charge.\",\"discriminator\":{\"propertyName\":\"entityType\"},\"required\":[\"taxRate\"],\"allOf\":[{\"$ref\":\"#/components/schemas/ToastReference\"},{\"type\":\"object\",\"properties\":{\"entityType\":{\"description\":\"The type of object this is.\",\"type\":\"string\"},\"taxRate\":{\"$ref\":\"#/components/schemas/ToastReference\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the tax rate.\"},\"rate\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The tax rate, which can be a fixed amount, a percentage, or null.\"},\"taxAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The tax amount that was actually applied.\"},\"type\":{\"type\":\"string\",\"description\":\"The type of the tax rate. If no tax rate is configured, defaults to PERCENT.\",\"enum\":[\"PERCENT\",\"FIXED\",\"NONE\"]}}}]},\"AppliedDiscountTrigger\":{\"type\":\"object\",\"description\":\"The menu selection that triggered the application of this discount.\",\"properties\":{\"selection\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"quantity\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The quantity ordered of the selection that triggered the applied discount.\"}}},\"AppliedDiscount\":{\"type\":\"object\",\"description\":\"A discount applied to a check or item. The Toast POS system calculates service\\ncharges before applying discounts. The system calculates tax after applying\\ndiscounts. In a `POST` request, the type of the discount must be fixed amount\\nor fixed percentage, and the discount must be applied to a check. See\\n[Applying Discounts to a Check in an Order](https://doc.toasttab.com/Ie5QH/apiApplyingDiscountsToACheck.html).\\n\",\"allOf\":[{\"$ref\":\"#/components/schemas/ToastReference\"},{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the applied discount.\"},\"discountAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The discount amount in USD. This amount will be subtracted from the check or item.\"},\"discount\":{\"$ref\":\"#/components/schemas/ToastReference\"},\"triggers\":{\"type\":\"array\",\"description\":\"Optional items that triggered this discount.\",\"items\":{\"$ref\":\"#/components/schemas/AppliedDiscountTrigger\"}},\"approver\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"comboItems\":{\"type\":\"array\",\"description\":\"A list of menu item selections that this discount applies to (empty for non-combo discounts).\",\"items\":{\"$ref\":\"#/components/schemas/ExternalReference\"}},\"appliedPromoCode\":{\"type\":\"string\",\"description\":\"The promotion code that was applied for this discount.\"},\"provider\":{\"type\":\"string\",\"description\":\"The provider of the discount.\"}}}]},\"AppliedLoyaltyInfo\":{\"type\":\"object\",\"description\":\"Information about the guest loyalty program account associated with a check.\",\"required\":[\"loyaltyIdentifier\",\"vendor\"],\"allOf\":[{\"$ref\":\"#/components/schemas/ToastReference\"},{\"type\":\"object\",\"properties\":{\"loyaltyIdentifier\":{\"type\":\"string\",\"description\":\"An identifier for the loyalty program account. For `POST` orders, this identifier is transmitted to the loyalty program service provider to associate the check with the loyalty account.\"},\"vendor\":{\"type\":\"string\",\"description\":\"The specific loyalty program service provider that supports the loyalty account.\",\"enum\":[\"TOAST\",\"PUNCHH\",\"PUNCHH2\",\"PAYTRONIX\",\"APPFRONT\"]},\"accrualFamilyGuid\":{\"type\":\"string\",\"description\":\"Response only. An internal Toast POS identifier for loyalty program transactions. This is not returned from the initial `POST` order request, but is available at a later time.\"},\"accrualText\":{\"type\":\"string\",\"description\":\"Response only. A description of the loyalty program transaction to print on the customer's reciept. For example, \\\"Earned 27 points.\\\" The maximum length of the description is 255 characters. This is not returned from the initial `POST` order request, but is available at a later time.\"}}}]},\"Payment\":{\"type\":\"object\",\"description\":\"Defines a payment.\",\"allOf\":[{\"$ref\":\"#/components/schemas/ExternalReference\"},{\"type\":\"object\",\"required\":[\"type\",\"amount\",\"tipAmount\"],\"properties\":{\"paidDate\":{\"description\":\"The date when the payment was made.\",\"type\":\"string\",\"format\":\"date-time\"},\"paidBusinessDate\":{\"description\":\"The business date (yyyyMMdd) on which this payment was first applied. Response only.\",\"type\":\"integer\"},\"type\":{\"type\":\"string\",\"description\":\"The payment method. When POSTing, only OTHER is supported. All other types are response only. For cash payments, please create an external cash payment type in `otherPayment` options.\",\"enum\":[\"CASH\",\"CREDIT\",\"GIFTCARD\",\"HOUSE_ACCOUNT\",\"REWARDCARD\",\"LEVELUP\",\"OTHER\",\"UNDETERMINED\"]},\"cardEntryMode\":{\"type\":\"string\",\"description\":\"Indicates how credit card data was obtained. Response only.\",\"enum\":[\"SWIPED\",\"KEYED\",\"ONLINE\",\"EMV_CHIP_SIGN\",\"TOKENIZED\",\"PRE_AUTHED\",\"SAVED_CARD\",\"FUTURE_ORDER\"]},\"amount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The amount of this payment, excluding tips.\"},\"tipAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The amount tipped on this payment.\"},\"amountTendered\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The amount tendered for this payment.\"},\"cardType\":{\"type\":\"string\",\"description\":\"The type of credit card used. Response only.\",\"enum\":[\"VISA\",\"MASTERCARD\",\"AMEX\",\"DISCOVER\",\"JCB\",\"DINERS\",\"CIT\",\"MAESTRO\",\"LASER\",\"SOLO\",\"UNKNOWN\"]},\"last4Digits\":{\"type\":\"string\",\"description\":\"The last 4 digits of the credit card used. Response only.\"},\"originalProcessingFee\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The original processing fee for this payment. The original processing fee value is populated after the payment has been captured. Response only.\"},\"cashDrawer\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"refundStatus\":{\"type\":\"string\",\"description\":\"Response only.\",\"enum\":[\"NONE\",\"PARTIAL\",\"FULL\"]},\"refund\":{\"$ref\":\"#/components/schemas/Refund\"},\"paymentStatus\":{\"type\":\"string\",\"description\":\"The status of this payment when the type is CREDIT. Response only.\",\"enum\":[\"OPEN\",\"PROCESSING\",\"AUTHORIZED_AT_RISK\",\"AUTHORIZED\",\"ERROR\",\"DENIED\",\"VOIDED_AT_RISK\",\"CANCELLED\",\"CAPTURE_IN_PROGRESS\",\"CAPTURED\",\"VOIDED\"]},\"voidInfo\":{\"$ref\":\"#/components/schemas/VoidInformation\"},\"houseAccount\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"otherPayment\":{\"$ref\":\"#/components/schemas/ExternalReference\"}}}]},\"Refund\":{\"type\":\"object\",\"description\":\"A discount applied to a check or item.\",\"properties\":{\"refundAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The amount of the refund excluding the tip.\"},\"tipRefundAmount\":{\"type\":\"number\",\"format\":\"double\",\"description\":\"The amount of the tip refund.\"},\"refundDate\":{\"description\":\"The date and time when the refund was made.\",\"type\":\"string\",\"format\":\"date-time\"},\"refundBusinessDate\":{\"description\":\"The business date (yyyyMMdd) on which this refund was created. Response only.\",\"type\":\"integer\"}}},\"VoidInformation\":{\"type\":\"object\",\"description\":\"Information about a void applied to a check or item.\",\"properties\":{\"voidUser\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"voidApprover\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"voidDate\":{\"description\":\"The date when the void took place.\",\"type\":\"string\",\"format\":\"date-time\"},\"voidBusinessDate\":{\"description\":\"The business date (yyyyMMdd) on which this void was made. Response only.\",\"type\":\"integer\"},\"voidReason\":{\"$ref\":\"#/components/schemas/ExternalReference\"}}},\"ExternalReference\":{\"type\":\"object\",\"description\":\"A wrapper object with fields that allow reference to a Toast entity by Toast GUID or a partner's identifier.\",\"discriminator\":{\"propertyName\":\"entityType\"},\"allOf\":[{\"$ref\":\"#/components/schemas/ToastReference\"},{\"type\":\"object\",\"properties\":{\"externalId\":{\"description\":\"External identifier string that is prefixed by the naming authority.\",\"type\":\"string\"}}}]},\"ToastReference\":{\"type\":\"object\",\"description\":\"A wrapper object with fields that allow reference to a Toast entity by Toast GUID.\",\"discriminator\":{\"propertyName\":\"entityType\"},\"required\":[\"guid\",\"entityType\"],\"properties\":{\"guid\":{\"description\":\"The GUID maintained by Toast.\",\"type\":\"string\"},\"entityType\":{\"description\":\"The type of object this is.\",\"type\":\"string\"}}},\"PromotionRequest\":{\"type\":\"object\",\"description\":\"A request to verify, revalidate, apply, or void a Promotion to a Check. There are three types (VERIFY, APPLY, and VOID), which have different required fields for their respective requests. <br/><br/> VERIFY requests contain `check`, `appliedPromotions`, `requestDateTime`, and `requestUser`.\",\"required\":[\"check\",\"appliedPromotions\",\"requestDateTime\"],\"properties\":{\"check\":{\"$ref\":\"#/components/schemas/Check\"},\"checkGuid\":{\"type\":\"string\",\"description\":\"The unique identifier of the check to which the promotions were applied.\"},\"appliedPromotions\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/AppliedPromotion\"},\"description\":\"A list of promotions applied on the check, linked to their AppliedDiscount. Includes metadata about promotions.\"},\"newPromotion\":{\"$ref\":\"#/components/schemas/PromotionObject\"},\"promotionsToActOn\":{\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/AppliedPromotion\"},\"description\":\"Specific promotions that a request should act on (such as void or apply all of the supplied promotions).\"},\"requestDateTime\":{\"description\":\"The date and time when this check request was made. If not specified, set to the current system time.\\n[Use ISO 8601 date and time format for all Toast APIs](https://dev.toasttab.com/Ie5QH/api_dates_and_timestamps.html).\\n\",\"type\":\"string\",\"format\":\"date-time\"},\"requestBusinessDate\":{\"description\":\"The business date (yyyyMMdd) on which this request was created.\",\"type\":\"integer\"},\"requestUser\":{\"$ref\":\"#/components/schemas/ExternalReference\"},\"orderOpenedDate\":{\"type\":\"string\",\"description\":\"The date the corresponding Order was opened.\",\"format\":\"date-time\"},\"orderOpenedBusinessDate\":{\"type\":\"integer\",\"description\":\"The business date (yyyyMMdd) on which this order was opened.\"}}},\"VerifyPromotionRequest\":{\"type\":\"object\",\"description\":\"A type of `PromotionRequest` to verify that a new promotion can be added to a check. The only fields that are provided in this request are `check`, `appliedPromotions`, `newPromotion`, `requestDateTime`, and `requestUser`. </br></br> The `newPromotion` field  contains the promotion code that should be queried for the restaurant, and `check`, `appliedPromotions`, and `requestDateTime` can be used to validate that a promotion can be applied.\",\"required\":[\"check\",\"appliedPromotions\",\"newPromotion\",\"requestDateTime\"],\"allOf\":[{\"$ref\":\"#/components/schemas/PromotionRequest\"}]},\"ApplyPromotionsRequest\":{\"type\":\"object\",\"description\":\"A request with a list of AppliedPromotions that should be applied/committed. The only fields that are provided in this request are `check`, `appliedPromotions`, `promotionsToActOn`, `requestDateTime`, and `requestUser`. All promotions on `promotionsToActOn` should be committed, and the other fields can be used to validate them.\",\"required\":[\"check\",\"appliedPromotions\",\"promotionsToActOn\",\"requestDateTime\"],\"allOf\":[{\"$ref\":\"#/components/schemas/PromotionRequest\"}]},\"RevalidatePromotionsRequest\":{\"type\":\"object\",\"description\":\"A request with a list of AppliedPromotions that should be revalidated. The only fields that are provided in this request are `check`, `appliedPromotions`, `promotionsToActOn`, `requestDateTime`, and `requestUser`. Promotions on `promotionsToActOn` should be revalidated, and can be updated by the response. Promotions not included in this field have already been APPLIED, and can no longer be modified. The other fields can be used to validate the promotions in `promotionsToActOn`.\",\"required\":[\"check\",\"appliedPromotions\",\"promotionsToActOn\",\"requestDateTime\"],\"allOf\":[{\"$ref\":\"#/components/schemas/PromotionRequest\"}]},\"VoidPromotionsRequest\":{\"type\":\"object\",\"description\":\"A request with a list of AppliedPromotions and the GUID of the check that they belong to. The only fields that are provided in this request are `promotionsToActOn` and `checkGuid`. All promotions supplied in `promotionsToActOn` should be voided. The individual promotions should be identifiable by the tuple of (promotion.externalId, checkGuid, and Toast-Restaurant-External-ID).\",\"required\":[\"promotionsToActOn\",\"checkGuid\"],\"allOf\":[{\"$ref\":\"#/components/schemas/PromotionRequest\"}]},\"PromotionObject\":{\"type\":\"object\",\"description\":\"An object to encapsulate information about a promotion.\",\"properties\":{\"appliedDate\":{\"description\":\"The date when this promotion was applied. If not specified, set to the current system time.\\n[Use ISO 8601 date and time format for all Toast APIs](https://dev.toasttab.com/Ie5QH/api_dates_and_timestamps.html).\\n\",\"type\":\"string\",\"format\":\"date-time\"},\"appliedBusinessDate\":{\"description\":\"The YYYYMMDD integer for the business date that the promotion was applied at the given restaurant.\\n\",\"type\":\"integer\"},\"promoCode\":{\"type\":\"string\",\"description\":\"The promotion code that was applied for this discount.\"},\"name\":{\"type\":\"string\",\"description\":\"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.\"},\"discountAmount\":{\"description\":\"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.\",\"type\":\"number\",\"format\":\"double\"},\"referenceId\":{\"description\":\"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.\",\"type\":\"string\"}}},\"AppliedPromotion\":{\"type\":\"object\",\"description\":\"An object containing information about a promotion attached to a check.\",\"required\":[\"externalId\"],\"allOf\":[{\"$ref\":\"#/components/schemas/PromotionObject\"},{\"type\":\"object\",\"properties\":{\"externalId\":{\"description\":\"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.\",\"type\":\"string\"},\"appliedDiscountGuid\":{\"description\":\"This GUID corresponds to an AppliedDiscount.guid contained in Check.appliedDiscounts, and indicates the applied discount that is associated with the promotion.\",\"type\":\"string\"}}}]},\"PromotionError\":{\"type\":\"object\",\"description\":\"A response object that contains information about why a promotion cannot be applied.\",\"allOf\":[{\"$ref\":\"#/components/schemas/AppliedPromotion\"},{\"type\":\"object\",\"properties\":{\"developerErrorMessage\":{\"description\":\"Internal-only message that developers can use to better understand the error.\",\"type\":\"string\"},\"userErrorMessage\":{\"description\":\"A user-friendly error message to display to the restaurant employee on the POS.\",\"type\":\"string\"},\"errorType\":{\"type\":\"string\",\"description\":\"A specific type for well-known error states.\\n  <ul>\\n    <li>`INVALID_REQUEST` - Request does not contain proper or expected parameters or is otherwise malformed.</li>\\n    <li>`CODE_ALREADY_USED` - The promotion code has already been used the maximum number of times.</li>\\n    <li>`CODE_NOT_EXIST` - The promotion code does not exist.</li>\\n    <li>`CODE_NOT_APPLY` - The promotion code does not apply to the given check.</li>\\n    <li>`CODE_INACTIVE` - The promotion code was never activated for usage or was otherwise deactivated.</li>\\n    <li>`OTHER` - The error cannot be categorized as one of the types listed above.</li>\\n  </ul>\\n\",\"enum\":[\"INVALID_REQUEST\",\"CODE_ALREADY_USED\",\"CODE_NOT_EXIST\",\"CODE_NOT_APPLY\",\"CODE_INACTIVE\",\"OTHER\"]}}}]},\"StatusResponse\":{\"type\":\"object\",\"description\":\"A response object containing information about connection and more.\",\"discriminator\":{\"propertyName\":\"entityType\"},\"required\":[\"status\"],\"properties\":{\"status\":{\"description\":\"Status of connection.\",\"type\":\"string\"}}},\"ErrorResponse\":{\"type\":\"object\",\"description\":\"A response object containing information about connection and more.\",\"discriminator\":{\"propertyName\":\"entityType\"},\"required\":[\"status\"],\"properties\":{\"developerErrorMessage\":{\"description\":\"Internal-only message that developers can use to better understand the error.\",\"type\":\"string\"},\"userErrorMessage\":{\"description\":\"A user-friendly error message to display to the restaurant employee on the POS.\",\"type\":\"string\"},\"invalidPromotions\":{\"description\":\"An array of promotions for this check. For a `PROMOTION_VERIFY`, contains only a single element, the promotion being checked.\\nFor `PROMOTION_REVALIDATE` or `PROMOTION_APPLY` requests in which multiple applied promotions may be invalid, all invalid promotions are described here.\\n\",\"type\":\"array\",\"items\":{\"$ref\":\"#/components/schemas/PromotionError\"}}}}}}}},\"options\":{\"hideTryItPanel\":true,\"pagination\":\"item\",\"generateCodeSamples\":{\"languages\":[{\"lang\":\"curl\"},{\"lang\":\"Java\"},{\"lang\":\"Python\"}]},\"showConsole\":false,\"hideHostname\":true,\"hideDownloadButton\":true,\"sortPropsAlphabetically\":true,\"schemaDefinitionsTagName\":\"Data definitions\",\"disableSearch\":true,\"ctrlFHijack\":false,\"disableSidebar\":true,\"theme\":{\"overrides\":{\"DownloadButton\":{\"custom\":\"\"},\"NextSectionButton\":{\"custom\":\"\"}},\"codeBlock\":{\"tokens\":{}},\"schema\":{\"constraints\":{},\"examples\":{}},\"rightPanel\":{\"textColor\":\"#eeeeee\"},\"typography\":{\"heading1\":{},\"heading2\":{},\"heading3\":{},\"rightPanelHeading\":{}}}}}","redocHasSecurityDefinitions":false,"redocInfoPageLink":"/promotions/overview/","redocItemId":"tag/Data-definitions/schema/AppliedServiceCharge","redocHasInfoPage":false,"settings":{"generateCodeSamples":{"languages":[{"lang":"curl"},{"lang":"Java"},{"lang":"Python"}]},"showConsole":false,"hideHostname":true,"hideDownloadButton":true,"sortPropsAlphabetically":true,"schemaDefinitionsTagName":"Data definitions","hideTryItPanel":true},"requestLogin":false,"lastModified":"2023-02-13T02:57:02.000Z"},"seo":{"title":"AppliedServiceCharge"}}},"pageContext":{"id":"79593a32-4629-520e-a687-1e1e0c32dcc6tag/Data-definitions/schema/AppliedServiceCharge/__redocly content/promotions/tag/Data-definitions/schema/AppliedServiceCharge/","seo":{"title":"AppliedServiceCharge","description":"<SchemaDefinition showWriteOnly={true} schemaRef=\"#/components/schemas/AppliedServiceCharge\" />","image":"","keywords":null,"jsonLd":null,"lang":null},"pageId":"promotions.reference.page.yaml#tag/Data-definitions/schema/AppliedServiceCharge/","pageBaseUrl":"/promotions","type":"redoc-operation","toc":{"enable":true,"maxDepth":4,"headings":null},"data":{},"catalogInfo":null,"link":"/promotions/tag/Data-definitions/schema/AppliedServiceCharge/","sidebarName":"api-reference","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":[{"definitionId":"promotions","id":"promotions","title":"promotions","isDefault":true,"apiId":null}],"apiVersionId":null,"isDefaultApiVersion":true}},"staticQueryHashes":["1123603147","1180902673","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3743992808","561138138"]}