I am getting the following error:
[{
"error_key": "json.field.invalid.enum",
"error_message": "Unsupported value for an enum, please refer to documentation for valid enum values"
}]
For this request:
POST https://api.constantcontact.com/v2/eventspot/events/a07eavl32l0834843a3/promocodes?api_key=<my api key> HTTP/1.1
Authorization: Bearer <my token>
Content-Type: application/json
Accept: application/json
Host: api.constantcontact.com
Content-Length: 193
Expect: 100-continue
Connection: Keep-Alive
{
"discount_amount":5.0,
"code_name":"EarlyReg",
"code_type":"DISCOUNT",
"discount_scope":"FEE_LIST",
"fee_ids":["QFhHPRn8Ile5AQwM5QBe2uPPZtIUTEXxcjpb84MZb3w"],
"is_paused":false,
"quantity_total":-1
}
Any ideas?
Hello,
After looking into this, it appears that the issue here is that the feeId being sent to the API is likely incorrect. It could be as simple as a single missing character that could cause this. I also did notice on our API logs that you succeeded shortly after posting this question. Would you be able to share what you changed to achieve success?
Sincerely,
For the succeeding request, I changed the discount_scope to ORDER_TOTAL and removed the fee_ids and that is the request that succeeded.
I did verify that the fee id was incorrect, and now the request is succeeding with the discount_scope of FEE_LIST
As a point of feedback, the error message could be more descriptive to help point out the real cause of the error was that the fee_id provided did not match an existing fee for the provided event.
Thanks for your help.
Scott
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article