Simulate rewards
Show what the effects will be after applying the selected rewards, and start the rewards transaction, only call this when user selected some reward, otherwise skip this call and use redeemAndAccumulateRewards API call. Rate limit: 8 requests per minute.
Request
- Base URLhttps://partners.tryotter.com
- AuthOAuth 2Authorization code/v1/auth/oauth2/authorizeClient credentialsToken URL/v1/auth/tokenScopesmanager.loyalty
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Loyalty provider source
Headers
The unique identifier of the store in your app. This ID, along with the Application ID, will be used to match the correct store when performing operations. It cannot be longer than 255 characters and must only contain printable ASCII characters. During on-boarding, this ID will be similar to onboarding:905bb725-b141-4a9b-832a-1f254f772c94 (where the UUID is the Internal Store ID). During off-boarding, this field will be filled with the last known Store ID, or with an empty string, in case none is found. In that case, please fall back to the provided internalStoreId (a.k.a. Sku-Sku ID).
Request body
Example request
{
"userId": "someidstring",
"order": {
"id": "someidstring",
"currencyCode": "USD",
"items": [
{
"id": "someidstring",
"displayName": "Cheese Burger",
"quantity": 1,
"price": 19.07
}
],
"totals": {
"subTotal": 29.07,
"tax": 10,
"discount": 9.07,
"total": 30
}
},
"selectedRewards": [
{
"id": "someidstring",
"amount": 19.07,
"menus": {
"entityId": "someidstring"
}
}
]
}Response
Simulate rewards response.
Example response
{
"transactionId": "someidstring",
"rewardEffect": {
"subtotal": {
"amount": 19.07
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.