Accounting » AccountingIntegration/Refresh

AccountingIntegration/Refresh

Introduction

For reasons of performance and keeping our services as robust as possible, all configuration data from a third-party integrator is cached. If the integrator(s) your app is working with do not expose change events, it can be possible for the cache to become out of date. The Refresh endpoint allows your app to initiate a manual refresh (or hydration) of the cached data.

How It Works

This endpoint events out the process of querying the third-party for the latest information and storing it in the cache. When that process is complete, it adds a timestamp into the InspectionTimes property on the IntegrationConfiguration object.

Currently, only users with the role of MINDBODY Owner have permission to access the Refresh endpoint.

How To Use It

  • Scoping

    URL conventions are used to specify the request scope. Every request must provide 2 scope parameters: the subscriber domain scope (Subscriber/Region/Custom) and the accounting integration type scope. Currently the only supported domain scope type is subscriber, so every request must include the subscriber id. All currently supported integration types are specified in EAccountingIntegrationType.

    All requests should look like:
    https://subscriber.mindbodyonline.com/Subscriber_{subscriberId}/AccountingIntegration/Type_{integrationType}/Refresh, where {subscriberId} is the supplied subscriber id and {integrationType} is a value from EAccountingIntegrationType.

  • Determining the Refresh is Complete

    If your app needs to know when Refresh has finished, you should keep track of the time at which you sent the Refresh request. Then, you'll need to poll the Initialize endpoint and compare the most recent entry in InspectionTimes on the IntegrationConfiguration object with your stored timestamp; once an InspectionTime exists that is later than your request time, you know that Refresh has completed.

    If you poll, we recommend the interval be no less than 5 seconds, with an exponential backoff.

Helpful Links