How to Make Sure You’re Getting the Most Current Deals
Written by Josh Hutter
Full vs. Incremental API Call
Welcome back to FMTC’s Tech Corner, where we take a deep dive into our tools and technology. Today, we’re reviewing the differences between a full and incremental API call and providing best practices and recommendations on these API calls.
What data comes through when making an API call?
Regardless if you are pulling a getDeals call or a getMerchants call, you will be getting back data per your account settings in the FMTC portal. To start receiving data, you first need to become an FMTC subscriber and set up MerchantSync or manually select the merchants from whom you wish to receive the data. The getMerchants call will then return all the merchants you have selected, whether that be one or 500. From there, the getDeals call will return deals from those same selected merchants. Visit the Tech Corner articles on getMerchants and getDeals to learn how to do full or incremental calls on those APIs.
What is a “full” API call?
A full call is when you call one of FMTC’s API endpoints, requesting to get a full copy of all deal data in the system for your selected merchants. For example, if your feed has 100,000 records, this call will return all 100,000 records for processing.
What is an “incremental” API call?
An incremental call is when you call one of FMTC’s API endpoints and are only requesting the changes from your previous call. For example, if you make this call one hour after the last call and only one record has been updated, you will only receive the one record that has been updated. The previous call can either be a full or incremental call; the current incremental call will still determine what has changed from the last call.
Why should I make a full API call?
A full call should be made to ensure you are grabbing every possible record (a deal or merchant) available to you. This will not take into account any previous calls; it will return all the information you have set up in the FMTC Portal.
Why should I make an incremental API call?
An incremental call should be made to only pull the records that have been updated since your last call, whether that call was a full or incremental call. These calls will be faster than full calls and ensure that you are only getting updated records since the last call you made. It will also keep you from having to reprocess anything for which you already have correct information.
Should I only make one full API call and the rest incremental API calls?
In theory, this would be correct. Once a full call has been made, incremental calls could be made after that, and you would only get the information that was updated. However, in the event of an error — such as a network issue, database failure, or another external error out of your control — the calls could fall out of sync, which would cause deals to be missed on follow-up calls.
What is FMTC’s recommendation?
FMTC recommends that you run a full call every two hours and run incremental calls every 30 minutes between those calls. This is to ensure you don’t lose any data in between those full calls. Pulling incremental calls every 30 minutes will allow you to have quick calls to make sure you have the most up-to-date deals, and a full proper sync every two hours will confirm it.
As always, our team is ready to help you! If you have any questions or concerns, feel free to contact your account manager or email us at [email protected] Curious about other FMTC technologies? Find more information on FMTC’s tools in Tech Corner:
- FMTC Tech Corner: getDeals Deep Dive
- FMTC Tech Corner: getMerchants Deep Dive
- FMTC Tech Corner: Get Deals and Get Merchants
- FMTC Tech Corner: Deal Types and the getTypes API
- FMTC Tech Corner: getNetworks
- FMTC Tech Corner: getLogos
- FMTC Tech Corner: The Product Feed
- FMTC Tech Corner: Pushed Deals
- FMTC Tech Corner: Program Directory