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

Report benefit usage

Testing
Webhook
POST
When a benefit usage occurs, this webhook is triggered.
The request payload contains detailed information including:
Offer and provider: loyaltyOfferId, loyaltyProviderId
Customer and bill: customerId, billId, paidAt, billState, etc.
Purchased items: amounts, applied benefits, VAT details
Payment details: balances used and other payment values

The provider is expected to process this notification and return 200 OK in response.
After receiving a successful 200 OK, the corresponding benefitUsage is marked as synchronized in Storyous.
If the provider does not respond with 200 OK, Storyous applies a retry mechanism.
Retries are attempted multiple times with increasing delayed intervals until the request succeeds or the retry limit is reached.

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
curl --location --request POST 'https://your-api-server.com' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "loyaltyOfferId": "68b43b9ab72957e8ff5a6699",
    "billId": "bill-456",
    "loyaltyProviderId": "68230e36eb2894dfc71ed6d7",
    "deviceNumber": 1,
    "benefitInputs": [
        {
            "inputCode": "13191293454"
        }
    ],
    "customerId": "8ea2591121e636086a4a9c0992-92228",
    "metadata": "{}",
    "currencyCode": "CZK",
    "countryCode": "CZ",
    "paidAt": "2025-08-31T12:10:02.240Z",
    "usedBalances": [
        {
            "balanceId": "SPV123",
            "usedNonControllableValue": 11,
            "prepaidValue": null
        }
    ],
    "usedGeneralDiscounts": [],
    "paidItems": [
        {
            "originalCheckItemId": "svickova_bill_item_id",
            "product": {
                "productId": "prod-123",
                "name": "Svíčková 1",
                "categories": []
            },
            "amount": 4,
            "measure": "pcs",
            "vatRate": 1,
            "totalPriceWithVat": 500,
            "appliedBenefits": [
                {
                    "sourceType": "balance",
                    "appliedFromGeneralDiscountId": null,
                    "appliedFromBalanceId": "SPV123",
                    "absoluteTotalValue": 22,
                    "applicationType": "discount"
                }
            ]
        }
    ],
    "paymentsByBalances": [],
    "otherPaymentsValue": 100,
    "totalWithVat": 200
}'
Response Response Example
{}
Previous
Report offer validation error
Next
Get loyalty benefit usages
Built with