FMTC Tech Corner: Deal Types and the getTypes API

We may earn money or products from the companies mentioned in this post.

 

Deal Type and getTypes API

Deal Types and the getTypes API

 

A defining characteristic of any FMTC deal is its deal type. This refers to the kind of discount or offer being given with the deal.

For example, “Sale” is one of our most common deal types. “Sale” can be further broken down into more specific deal types, such as “Product Sale” or “Category Sale,” allowing for greater flexibility when categorizing individual deals. Some of our other popular deal types are “Percent Off,” “Dollar Off,” and “Coupon.”

Deal types are not mutually exclusive. For example, a deal offering “20% Off Men’s Outerwear With Code FALL” would have several deal types, including “Sale,” “Category Sale,” “Percent Off,” and “Coupon.”

You can find a list of deal types in the “Common Deal Types” section of our getDeals documentation.

We also provide an API endpoint called getTypes that returns the full list of supported deal types for your account level, along with the slug used to identify the type. To call this API, simply put your own API key into this URL:

https://services.fmtc.co/v2/getTypes?key=YOURKEYHERE

 

The getTypes API returns output like this:

<type>
     <slug>apofreeshipping</slug>
     <name>APO Free Shipping</name>
</type>
<type>
     <slug>bogo</slug>
     <name>BOGO</name>
</type>
<type>
     <slug>dod</slug>
     <name>Deal Of The Day</name>
</type>
<type>
     <slug>percent</slug>
     <name>Percent Off</name>
</type>

The slugs are the same values that you’ll receive in the output of your getDeals API calls, allowing you to easily identify deals by type.

Deal type slugs and names are also useful for generating a set of pages on your website to offer deals organized by type to your visitors.

For more details on the getTypes API call, refer to our getTypes documentation.

-Josh Hutter

 

Follow and like FMTC: