API

for when you want the ultimate control over how to display your coupon offers

  • Sample Code to call API (COLDFUSION EXAMPLE):

    						
    	<cfhttp throwonerror="true" url="https://www.couponsindemand.com/api/v1/index.cfm/coupons" method="get" result="result" timeout="10">
    		<cfhttpparam type="header" name="Content-Type" value="application/json" />
    		<cfhttpparam type="URL" name="subdomain" value="sample" />
    	</cfhttp>
    	

    coupons
    URI: /coupons
    Description: returns coupon offers for subdomain of CouponsInDemand.com
    get
    Required Param Type Default Description
    optional numeric page 1 this numeric value represents the page number to return records
    optional numeric limit 18 this numeric value represents how many offers to display per page
    optional string sort recent DEPRICATED - accepted values are (recent, expiring, popular)
    optional string group [NULL] only valid if using Agency Plan
    (Returns coupons for all your clients that belong to a specific group)
    optional string client [NULL] only valid if using Agency Plan
    (Returns coupons for a single client by their subdomain)
    optional string subcategory [NULL] Returns coupons that belong to a specific sub-category.
    For example ('dessert' or 'seafood')
    optional string city [NULL] Returns coupons that have a location set to accept offer by city name.
    For example ('miami')
    optional string state [NULL] Returns coupons that have a location set to accept offer by state abbr.
    For example ('fl')
    optional string category [NULL] Returns coupons that belong to a specific category.
    For example ('restaurant' or 'home-family'))
    optional numeric couponid 0 Returns specific coupon by couponID.
    For example ('1001234')
    post Not Allowed
    delete Not Allowed
    put Not Allowed

    Sample generated JSON below:

    						[
    {
    	"SUBCATLIST":"",
    	"SUBTITLE":"FREE",
    	"UPDATEDATE":"02\/16\/2017",
    	"DETAILS":"Welcome to CouponsInDemand.com,
    	 This is your first sample coupon.  You may begin by either editing this coupon offer or deleting this coupon and creating a new coupon from scratch.",
    	"SUBCATSEOLIST":"",
    	"IMAGES":[
    		{
    			"IMAGE":"http:\/\/sample.couponsindemand.com\/MemberImages\/149\/logos\/YourLogoTall.png"
    		}
    	],
    	"EXPIRYDATE":"12\/31\/2020",
    	"PROMOCODE":"",
    	"LOCATIONS":[
    		{
    			"ADDR2":"",
    			"ADDR1":"",
    			"LOCATIONID":28.0,
    			"POSTALCODE":32246,
    			"ADDR3":"",
    			"NAME":"Coupons In Demand",
    			"LONGITUDE":-81.50477719999998,
    			"STATEABBR":"FL",
    			"CITY":"Jacksonville",
    			"URL":"",
    			"PHONEMAIN":"555-555-5555",
    			"LATITUDE":30.3093218
    		},
    		{
    			"ADDR2":"",
    			"ADDR1":"",
    			"LOCATIONID":27.0,
    			"POSTALCODE":32246,
    			"ADDR3":"",
    			"NAME":"test co",
    			"LONGITUDE":-81.50477719999998,
    			"STATEABBR":"FL",
    			"CITY":"Jacksonville",
    			"URL":"",
    			"PHONEMAIN":"555-5551234",
    			"LATITUDE":30.3093218
    		}
    	],
    	"COUPONTYPE":"PRINTABLE",
    	"STARTDATE":"",
    	"DISCLAIMER":"CONSUMER:  Limit one coupon per purchase. No duplication,
    	 reproduction or facsimile will be accepted.",
    	"ISDISTRIBUTE":0,
    	"COUPONID":1000287,
    	"COUPONTEMPLATEID":12,
    	"COMPANYNAME":"Sample",
    	"COUPONDETAILURL":"http:\/\/sample.Couponsindemand.com\/1000287",
    	"CREATEDATE":"09\/29\/2012",
    	"COUPONPRINTLOWRESURL":"http:\/\/sample.Couponsindemand.com\/membercoupons\/view-png\/1000287.png",
    	"MAXPAGES":1.0,
    	"ISEZ":0,
    	"SEARCHABLE":1,
    	"COUPONPRINTHIGHRESURL":"http:\/\/sample.Couponsindemand.com\/membercoupons\/view-pdf\/1000287.pdf",
    	"COUPONNAME":"Sample Coupon",
    	"ISACTIVE":1,
    	"TITLE":"BUY ONE\nGET ZERO"
    }
    						

    Sample output from COUPONS API


  • Sample Code to call API (COLDFUSION EXAMPLE):

    						
    		<cfhttp throwonerror="true" url="https://www.couponsindemand.com/api/v1/index.cfm/coupon/1000287" method="get" result="result" timeout="10">
    			<cfhttpparam type="header" name="Content-Type" value="application/json" />
    			<cfhttpparam type="URL" name="subdomain" value="sample" />
    		</cfhttp>
    	

    Sample generated JSON below:

    						[
    {
    	"COUPONTEMPLATEID":12,
    	"UPDATEDATE":"02\/16\/2017",
    	"SUBTITLE":"FREE",
    	"DETAILS":"Welcome to CouponsInDemand.com,
    	 This is your first sample coupon.  You may begin by either editing this coupon offer or deleting this coupon and creating a new coupon from scratch.",
    	"IMAGES":[
    		{
    			"IMAGE":"http:\/\/sample.couponsindemand.com\/MemberImages\/149\/logos\/YourLogoTall.png"
    		}
    	],
    	"EXPIRYDATE":"12\/31\/2020",
    	"PROMOCODE":"",
    	"LOCATIONS":[
    		{
    			"ADDR2":"",
    			"ADDR1":"",
    			"LOCATIONID":28.0,
    			"POSTALCODE":32246,
    			"ADDR3":"",
    			"NAME":"Coupons In Demand",
    			"STATEABBR":"FL",
    			"CITY":"Jacksonville",
    			"PHONEMAIN":"555-555-5555"
    		},
    		{
    			"ADDR2":"",
    			"ADDR1":"",
    			"LOCATIONID":27.0,
    			"POSTALCODE":32246,
    			"ADDR3":"",
    			"NAME":"test co",
    			"STATEABBR":"FL",
    			"CITY":"Jacksonville",
    			"PHONEMAIN":"555-5551234"
    		}
    	],
    	"COUPONTYPE":"PRINTABLE",
    	"COUPONPRINTLOWRESURL":"http:\/\/sample.couponsindemand.com\/membercoupons\/ApiView\/1000287.png",
    	"CREATEDATE":"09\/29\/2012",
    	"STARTDATE":"",
    	"DISCLAIMER":"CONSUMER:  Limit one coupon per purchase. No duplication,
    	 reproduction or facsimile will be accepted.",
    	"COUPONPRINTHIGHRESURL":"http:\/\/sample.couponsindemand.com\/membercoupons\/view-pdf\/1000287.pdf",
    	"SEARCHABLE":1,
    	"COUPONNAME":"Sample Coupon",
    	"ISDISTRIBUTE":0,
    	"ISACTIVE":1,
    	"COUPONID":1000287,
    	"TITLE":"BUY ONE\nGET ZERO"
    }
    						

    Sample output from COUPONS API