Storyous Public APIs
  1. Loyalty API
Storyous Public APIs
  • Introduction
  • Merchants API
    • Get merchant and all its places
  • Menu API
    • Get a menu tree
    • Get time-based menu
    • Get Remaining amounts of time-based menu
  • Bills API
    • Get list of payment bills
    • Get detail of a payment bill
  • Delivery API
    • Create an order through delivery API
    • Get status of delivery order
  • Deskview API
    • Get list of desks
    • Get list of sections
    • Get desk view of a place
  • Features API
    • Get list of merchants/places with a feature
  • Hotel accounts integration API
    • Provide list of accounts
    • Write consumed items to hotel account
  • Stocks API
    • Get list of stocks
    • Get list of items
    • Get list of stock ups
    • Get detail of stock up
    • Create new stock up
    • Modify stock up
    • Delete stock up
    • Get list of stock takings
    • Get detail of stock taking
    • Create new stock taking
    • Modify stock taking
    • Delete stock taking
    • Get suppliers
  • Loyalty API
    • Introduction
    • Get benefit offer
      POST
    • Report offer validation error
      POST
    • Report benefit usage
      POST
    • Get loyalty benefit usages
      GET
    • Mark benefit usages as synchronized
      POST
  • DataSync
    • Webhook receiving endpoint
      • Receive new or updated records
    • Data domains
      • Stock management
        • Stocks domain
        • StockItemCategories domain
        • StockItems domain
        • StockMovements domain
      • Sales and costs
        • Bills domain
        • BillCosts domain
        • TerminalTransactions domain
        • PaymentTypes domain
        • Loyalty domain
      • Desks
        • DeskSections domain
        • Desks domain
      • Menu
        • ItemCategories domain
        • Items domain
        • PlaceITems domain
      • Merchants
        • Merchants domain
        • Places domain
        • Persons domain
  • Schemas
    • Schemas
      • Loyalty api
        • BalanceBenefitOfferRequest
        • ThirdPartyLoyaltyOfferRequest
        • LoyaltyOfferValidationError
        • LoyaltyBenefitUsagesPayload
        • BenefitInput
        • PaidItem
        • Applied Benefits
        • PaymentByBalance
        • UsedBalance
        • LoyaltyOfferResponse
        • MenuProductDefinition
        • UsedGeneralDiscount
      • Desk
      • Section
  1. Loyalty API

Get benefit offer

Testing
Webhook
POST
getBenefitOffer
Purpose
Storyous calls this endpoint to obtain a benefit offer for a POS. The partner should evaluate inputs (items, balances, benefit inputs) and return a structured offer indicating what can be applied.

How it’s used
POS may call “Get benefit offer” multiple times while the basket changes (items, quantities, discounts).
Always echo back the loyaltyOfferId you received.

Request highlights
benefitInputs[]: partner-specific flags/codes (e.g., “discount_10”, "promo50”).
balances[]: current state and POS choices (rejectedByPOS, requested controllableValueToUse).
itemsToPay[]: full basket lines with totalPriceWithVat, vatRate, etc.
pricePrecision: number of decimal places you should respect for monetary calculations.
posLang / billLang: use for localized posTitle / billTitle.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://your-api-server.com' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "checkId": "7689202504",
    "deviceNumber": 1,
    "currencyCode": "CZK",
    "countryCode": "CZ",
    "posLang": "cs",
    "billLang": "cs",
    "pricePrecision": 2,
    "benefitInputs": [
        {
            "inputCode": "dicount_10"
        },
        {
            "inputCode": "promo30"
        },
        {
            "inputCode": "7866567221"
        }
    ],
    "balances": [
        {
            "balanceId": "benefitPoints",
            "rejectedByPOS": false,
            "controllableValueToUse": 0,
            "valueToPrepay": 0
        },
        {
            "balanceId": "credit",
            "rejectedByPOS": false,
            "controllableValueToUse": 100,
            "valueToPrepay": 0
        },
        {
            "balanceId": "voucher",
            "rejectedByPOS": true,
            "controllableValueToUse": 0,
            "valueToPrepay": 0
        }
    ],
    "itemsToPay": [
        {
            "checkItemId": "2025071121",
            "product": {
                "productId": "prod-svickova-001",
                "name": "Svíčková",
                "categories": [
                    {
                        "categoryId": "main-dishes",
                        "parentCategoryId": "food",
                        "name": "Main Dishes"
                    }
                ]
            },
            "amount": 3.5,
            "measure": "pcs",
            "totalPriceWithVat": 3500,
            "totalAppliedNonLoyaltyDiscounts": 0,
            "vatRate": 1,
            "vatId": 1
        }
    ]
}'
Response Response Example
General discount
{
    "customer": {
        "customerId": "8ea2591121e636086a4a9c0992-39056",
        "fullName": "John Smith",
        "loyaltyStatus": "Gold Member"
    },
    "benefitInputs": [
        {
            "applicable": true,
            "posTitle": "Discount 10",
            "inputCode": "crm_10",
            "reasonCode": null
        }
    ],
    "billMessages": [],
    "balances": [],
    "generalDiscounts": [
        {
            "billTitle": "Sleva CRM-10",
            "generalDiscountId": "CRM-10",
            "isItemSpecific": true,
            "posTitle": "Sleva CRM-10",
            "valueToUse": 103
        }
    ],
    "itemBenefitsToApply": [
        {
            "benefits": [
                {
                    "absoluteTotalValue": 37.5,
                    "appliedFromGeneralDiscountId": "CRM-10",
                    "appliedFromBalanceId": null,
                    "sourceType": "generalDiscount"
                },
                {
                    "absoluteTotalValue": 18.5,
                    "appliedFromGeneralDiscountId": "CRM-10",
                    "appliedFromBalanceId": null,
                    "sourceType": "generalDiscount"
                },
                {
                    "absoluteTotalValue": 18.5,
                    "appliedFromGeneralDiscountId": "CRM-10",
                    "appliedFromBalanceId": null,
                    "sourceType": "generalDiscount"
                },
                {
                    "absoluteTotalValue": 18.5,
                    "appliedFromGeneralDiscountId": "CRM-10",
                    "appliedFromBalanceId": null,
                    "sourceType": "generalDiscount"
                }
            ],
            "checkItemId": "2025071121"
        }
    ],
    "loyaltyOfferId": "68230e36eb2894dfc71ed6d7",
    "posMessages": [
        "Please apply discounts"
    ],
    "metadata": ""
}
Previous
Introduction
Next
Report offer validation error
Built with