Ajax subscription form and data.Status

So... the code for the Ajax form references data.Status:

                function (data) {
                if (data.Status === 400) {

                } else { // 200

400 is error, presumably 200 is success. Are there others? Like specific data.Status's that align to such things as; error duplicate email? Or error, email address is not formatted correctly? Or would these more specific responses be a product of a form validation plugin?


roshodgekiss roshodgekiss, 5 years ago

Hi jesseyuen, so far, these are the only response codes. A 400 is returned for incorrectly formatted email address. There isn't an error for duplicates as if the email address is already marked as active, the submission won't change things, anyway. Scoot over to our downloads page or Github for a more detailed explanation.

Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free