Can't Add Coupons via API (Stopped Working)

ChristopheS6
Regular Participant

Can't Add Coupons via API (Stopped Working)

I sent an email to manager Jim Mariano, but thought I would post here as well. 

 

For some reason, things stopped working in terms of us being able to add EventSpot coupons via the CTCT API. It was working and now it doesn't, and we didn't change anything on our end in terms of how we call the CTCT API.

 

Example coupon data [from our debug log file - serialized PHP array]:

 

2015-02-03 16:48:30 Debug: $coupon_data: a:6:{s:9:"code_type";s:8:"DISCOUNT";s:9:"code_name";s:6:"TNCUHW";s:14:"quantity_total";i:-1;s:9:"is_paused";b:0;s:14:"discount_scope";s:11:"ORDER_TOTAL";s:15:"discount_amount";i:50;}
 
This is the response we get back when trying to add a new coupon via the API:
 
2015-02-03 16:48:31 Debug: $cc->addCoupon exc: [{"error_key":"json.field.promocode_unpause_depleted_code","error_message":"#/paused: Cannot enable/activate a depleted promo code. Promo code RHONDA has quantity total 1 and quantity used 1"}]
 
But the coupon we are adding is "TNCUHW" not "RHONDA".
2 REPLIES 2
Elijah_G
Member

Hello,

 

Based on the info you've provided, there are a couple things that would help us a lot with looking into this:

  1. A sample of the PHP code being used to create the coupon data that is being sent to the addCoupon method
  2. It would also greatly help if you could email us some of the specific detials of this error. This would include account name and event name that you were working on when you ran into this. You can email that info to webservices@constantcontact.com so that it does not need to be posted publically.

Let us know if there are any other unusual behaviors that you are seeing!

 

Sincerely,

Elijah G.
API Support Engineer

Thank you so much Elijah! I will send a detailed email.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page