Storyous Public APIs
    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
      • Report offer validation error
      • Report benefit usage
      • Get loyalty benefit usages
      • Mark benefit usages as synchronized
    • 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

    DataSync

    The Data Sync feature serves to synchronize merchant's data from Storyous to third-party systems.
    The third-party integrator implements an endpoint (webhook receiver).
    Storyous then regularly sends the changed data (if any) to the endpoint in the form of a webhook payload.
    Data are separated to domains, each domain has its own schema and is sent in a separate request.

    Setup#

    The data sync feature has to be enabled on Storyous side for each place (store). New data are then regularly sent to a custom webhook URL.
    To set it up, we need to know:
    the webhook URL
    a secret string that’s sent in the Authorization header with each request
    method used to sync data (POST or PUT)
    the date from which the data should be synced
    The receiver of the data has to implement the endpoint, Storyous Data Sync then sends following payload to that endpoint.
    The synced entities are separated to various “data domains”, each request sends entities of a single domain (defined in the dataDomain field).
    The data field contains array of entities that were created / updated since the last successful sync. The entity schema vary for each data domain and is documented bellow.
    One record can be synced multiple times on change and some domains' data are even shared across all the places (stores) of the merchant (items, stocks, etc.), so the receiver has to handle the data accordingly based on the id.
    Previous
    Mark benefit usages as synchronized
    Next
    Webhook receiving endpoint
    Built with