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 loyalty benefit usages

Developing
GET
https://api.storyous.com/loyaltyAdvanced/byProvider/{provider}/benefitUsages
Description
Retrieves loyalty benefit usages with cursor-based pagination.
Page size: fixed at 20 items per request.
After pulling unsynchronized benefit usage mark them as synchronized
Two ways to query:
1.
Use a cursor for sequential iteration over all records.
On the first call, do not include any query parameters.
The server will return the initial cursor, which you can then use to iterate through subsequent pages.
2.
Use query parameters (without cursor) for filtered retrieval.
⚠️ Important: Do not mix cursor with other query parameters.
When using a cursor:
The response includes a nextCursor value.
This guarantees that all records can be retrieved reliably by following the cursor chain
Once there is no more data to retrieve, the response contains hasNext: false.

Request

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

Query Params

Responses

🟢200OK
application/json
Successfully retrieved benefit usages
Body

🟠401Unauthorized
🟠400Bad Request
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.storyous.com/loyaltyAdvanced/byProvider//benefitUsages?cursor&fromDate&merchantId=&placeId=&status=pending,failed' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "data": [
        {
            "loyaltyOfferId": "string",
            "status": "success",
            "loyaltyProviderId": "string",
            "deviceNumber": 0,
            "benefitInputs": [
                {
                    "inputCode": "string"
                }
            ],
            "customerId": "string",
            "billId": "string",
            "paidAt": "2019-08-24T14:15:22Z",
            "currencyCode": "string",
            "keepLoyaltyBenefitsUsed": true,
            "billState": "issued",
            "paidItems": [
                {
                    "originalCheckItemId": "string",
                    "product": {
                        "productId": "string",
                        "name": "string",
                        "categories": [
                            {
                                "categoryId": "string",
                                "parentCategoryId": "string",
                                "name": "string"
                            }
                        ]
                    },
                    "amount": 0,
                    "measure": "string",
                    "vatRate": 0,
                    "totalPriceWithVat": 0,
                    "appliedBenefits": [
                        {
                            "sourceType": "balance",
                            "appliedFromBalanceId": "string",
                            "appliedFromGeneralDiscountId": "string",
                            "absoluteTotalValue": 0,
                            "applicationType": "discount",
                            "negativeCheckItemId": "string"
                        }
                    ]
                }
            ],
            "paymentsByBalances": [
                {
                    "sourceType": "balance",
                    "appliedFromBalanceId": "string",
                    "valueUsed": 0,
                    "paymentMethodCode": "string"
                }
            ],
            "usedBalances": [
                {
                    "balanceId": "string",
                    "usedControllableValue": 0,
                    "usedNonControllableValue": 0,
                    "prepaidValue": 0
                }
            ],
            "usedGeneralDiscounts": [
                {
                    "generalDiscountId": "string",
                    "usedValue": 0
                }
            ],
            "otherPaymentsValue": 0,
            "totalWithVat": 0,
            "countryCode": "string"
        }
    ],
    "nextCursor": "string",
    "hasNext": true
}
Previous
Report benefit usage
Next
Mark benefit usages as synchronized
Built with