PDA

View Full Version : How to get fresh working coupon data?



rjf
04-25-2012, 05:04 AM
I pulled all the coupons for all the merchants and there are a ton of problems with the data.

1) Tons of non working coupons. For example:
http://prosperent.com/coupon/401244-2080-0/?k=Spir

2) Coupons that work but go to the wrong merchant.
http://prosperent.com/coupon/401244-2080-0/?k=Seas

3) Duplicate coupons. There are 643 occurrences of this coupon spread all throughout various merchants.
http://prosperent.com/coupon/401244-2080-0/?k=Free
Tons of coupons have 100+ duplicates.

I made a video that shows all the coupons on one page and some of the duplicate problems. https://vimeo.com/40995752

How are people working with this data? I guess it's possible to go through the data without too much trouble and filter out all the stuff thats not working, but it doesn't seem like that should be necessary.

AcidRaZor
04-25-2012, 06:05 AM
Those url's look broken dude...



http://prosperent.com/coupon/214671-39-0/?k=Shop+MisterArt+Now&m=MisterArt.com&d=Shop+MisterArt.com+for+thousands+of+brand+name+a rt+%26+craft+supplies+at+up+to+75%25+off%21&referrer=http%3A%2F%2Fwww.shoppersavvysave.com%2F&location=http%3A%2F%2Fwww.example.com%2Fp%2Fsketch-kits&query=sketch+kits


That's how they should look like

prosperent brian
04-25-2012, 07:07 AM
That's definitely an error on your end. Those url's are not complete at all. Coupon data is refreshed daily.

rjf
04-25-2012, 07:34 AM
Oh ok weird. I'll try it again.

edit: some of the coupons work with a broken url to super confuse me haha..

prosperent brian
04-25-2012, 07:46 AM
If your url's are missing the main parameters, we attempt to find a loose match based on what is there. So that is probably why you are seeing that.

rjf
04-25-2012, 08:07 AM
I used the example code from the api doc's, pretty much thinking it must work lol. Anyway theres this thing in there:


substr($value, 0, 50)

I made the 50 higher and it seems to be working fine now.

BTW why's that in there? Why would anyone want the results purposely shorter?

AcidRaZor
04-25-2012, 11:19 AM
I used the example code from the api doc's, pretty much thinking it must work lol. Anyway theres this thing in there:


substr($value, 0, 50)

I made the 50 higher and it seems to be working fine now.

BTW why's that in there? Why would anyone want the results purposely shorter?

Many reasons really. But I guess it's for aesthetics when displaying the merchant name and if it's longer than 50 characters. You don't have to have substr() in there at all, just use $value.

Prosperent Andrew
04-25-2012, 01:13 PM
The code that was used here was from our example on how to use the API. It's main purpose is to give the user an idea of how to make a request; how to display the data thereafter is entirely up to the user. I guess having the substr in there can make is a little confusing, so that will be removed on the next update. If you actually look at the data returned, the full working urls are there.

kotfare
05-04-2012, 05:05 PM
can we have that code AcidRazor / Andrew?
and dont look to me like that :)

Prosperent Andrew
05-04-2012, 05:24 PM
The example code is in the API documentation, just login and click 'API' in the menu.