I've been trying out your api and seem to have run into an issue. When I fire: https://api.cc.email/v3/contacts?status=unsubscribed&updated_after=2022-05-01&limit=500
It only shows 10 or 15 contacts who have unsubscribed. However, we have had a large amount unsubscribe since the 1st of May, so much so that it was in the 100s. How come there is a "updated_after" parameter, but no "unsubscribed_after" or anything that would just let me see the LAST 500 starting from TODAY backwards until we hit 500?
I've read all of your API documentation and there doesn't seem to be a solution.
Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.
Our API is not able to directly retrieve opt outs from after a certain date.The "updated_at" value displayed for contacts in the section beginning with "create_source" refers to the last time the contact details were updated. As you can see in the Response Schema example in the right-hand side of the API Reference Page, this is grouped in with other contact details such as name and address. These are stored in a different area of the database than the "updated_at" for "email_address" details, which includes the "opt_out_date".
API Reference Page - GET Contacts Collection
The “updated_after” query parameter that can be used with the Contacts endpoint only applies to the "updated_at" value that identifies who last updated the contact’s personal information, and the "update_source" will only appear for contacts who’s contact information has been updated since they were added (examples: "first_name", "last_name", "job_title", "company_name", "birthday_month", etc…).
The "updated_at" value that displays for email addresses in the section starting with "contact_id" does reflect when an email address unsubscribes or is put into another status, but there’s not a parameter available for narrowing by this value when making calls. You can only query for the "updated_at" value for when contact details were last updated.
If you just want the last 500 unsubscribes, you’d want to shorten your request to:
In order to retrieve opt outs after a certain date, your best option would be to send a GET call to the Contacts endpoint with the status parameter set to OPTOUT and then program your application to parse the results and display only values within the desired range as the API cannot call them directly.
"updated_at": This identifies the last time the status of the contact was updated (if "permission_to_send" changes), and there is not a direct parameter in the API that can call this value, it is just included in the response when making other calls.
"update_source": This identifies who last updated the contact’s personal information. The "update_source" value will only appear for contacts who’s contact information has been updated since they were added (examples: "first_name", "last_name", "job_title", "company_name", "birthday_month", etc…)
"updated_at": The “updated_after” query parameter only applies to this value. The "updated_at" value here only applies to when a contact’s personal information was last updated (examples: "first_name", "last_name", "job_title", "company_name", "birthday_month", etc…)
Please have a look and let us know if you have any other questions!