Platform Docs

Read-Only Database 2015

Over the course of the next several weeks, Clover will be rolling out a read-only database for merchant data, using MySQL replication to reduce API response time across the board. Our read-only database will be near real-time, generally updated within milliseconds of a change. With this addition, HTTP GET requests will access this database unless specially flagged. In cases where real-time data is absolutely necessary, the forceRealTime=true flag may be used as a query parameter on GET requests. Typically this should only be used when fetching and displaying complex objects that are being edited live. Please note that excessive use of the forceRealTime=true flag may result in the flag being ignored for some or all of your app(s) requests.

Example flag usage: v3/merchants/PWPH981CWGAX6?forceRealTime=true Since all POST requests will access the primary database, any response objects returned by a POST request will be real-time, and will not require the forceRealTime=true flag. The data returned in these responses can also be enhanced using any of the expansion parameters available for the returned object. In most cases this response should be sufficient to update your records, and any live display information.

Example POST request to update item price, with expansions:

POST /v3/merchants/{merchantId}/items/{itemId}?expand=tags,categories,taxRates,modifierGroups,itemStock HTTP/1.1
Host: api.clover.com
Authorization: Bearer {secureToken}

{ "price": 300 }

Important

If your app fetches data in response to a WebHook, please allow for a delay in the cached data. Include checks for if the object identified by a CREATE WebHook_Name cannot be found, or the modified time of the object identified by an UPDATE WebHook_Name has not been updated. In these cases please query the API after a brief delay.

Updated about a year ago


Read-Only Database 2015


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.