0

When I try to add new campaigns, I get the error saying:

"The following venues already have 2 active specials"

Here is a piece of my code:

var add_campaign_url = 'https://api.foursquare.com/v2/campaigns/add';
var params = 'campaignId='+ bomonti_campaign_id+
            '&venueId='+venue1+','+venue2+ 
            '&endAt=1339621140' + 
            '&startAt=1339603140'+
            '&oauth_token=' + ACCESS_TOKEN;

var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
    if(xmlhttp.readyState == 4){
        var response = jQuery.parseJSON(xmlhttp.responseText);
        console.log(response);
    }
};
xmlhttp.open("POST",add_campaign_url,true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(params);

Actually there is no active campaigns for the venues now, but there are some pending actives. Is there a limit when using Merchant API? Or am I doing something wrong?

knshn
  • 3,401
  • 1
  • 21
  • 22

1 Answers1

0

Yes there is a limit. Foursquare only allows two active specials per venue at a time :

Currently we only allow two active specials per venue at a time. If any venue in the group associated with this campaign already has two active specials, this call will fail (with a helpful error message).

https://developer.foursquare.com/docs/campaigns/start.html

You may contact Foursquare to explain your situation. They'll let you know whether it's possible to change the limits on your Merchant key.

Emmanuel Tabard
  • 696
  • 5
  • 14