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

Mark benefit usages as synchronized

Developing
POST
https://api.storyous.com/loyaltyAdvanced/byProvider/{provider}/benefitUsages/sync
Description
Marks loyalty benefit usages as synchronized.
This endpoint should be called by the partner after retrieving benefit usages via the GET /benefitUsages endpoint.
Each benefitUsage document is uniquely identified by the loyaltyOfferId of the accepted offer.
As input, use the loyaltyOfferIds you receive via webhook or retrieve through the GET loyalty benefit usages endpoint
Responses
On complete success, the API responds with 204.
On invalid request (malformed payload, missing required fields, etc.), the API responds with 400 Bad Request.
The response body contains a general error message describing the problem.
On partial success (some updates succeeded, some failed), the API responds with 207 Multi-Status.
The response body contains per-item results, each marked as success or failure, with an optional error message for failures.
Even if all updates individually failed, it will still return 207 Multi-Status

Callbacks

syncNotification

Request

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

Body Params application/json

Examples

Responses

🟢204No Content
application/json
Successfully updated synchronization status
Body

🟠400Bad Request
🟠401Unauthorized
🟢207Multiple status
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.storyous.com/loyaltyAdvanced/byProvider//benefitUsages/sync' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "loyaltyOfferIds": [
        "fc375aceec5eaec83aa2a39a",
        "fc375aceec5eaec83aa2a39b"
    ],
    "status": "success"
}'
Response Response Example
204 - Example 1
{
    "results": [
        {
            "loyaltyOfferIds": "fc375aceec5eaec83aa2a39a",
            "status": "failure",
            "message": "Provider not activated on store"
        },
        {
            "loyaltyOfferIds": "fc375aceec5eaec83aa2a39b",
            "status": "success"
        }
    ]
}
Previous
Get loyalty benefit usages
Next
DataSync
Built with