Between 9pm - 11pm ET this Sat (9/18), we will be doing routine network maintenance. Please avoid usage of our API during this time frame - including any scheduled sync jobs. Thank you in advance for your patience.

Getting error response 404 when deleting lists.

TimG1567
Frequent Participant

Getting error response 404 when deleting lists.

Hi, 

I am trying to delete a contact list. The response object I am getting back is 404 and the text says '[{"error_key":"http.status.not_found","error_message":"No matching resource was found for the supplied URL."}]'

Why is this error being caused? 

Code (python):

headers_deletelist = {

'Authorization': 'Bearer x',
'X-Originating-Ip': 'x',
}


rsp = requests.delete('https://api.constantcontact.com/v2/lists/1?api_key=X', headers = headers_deletelist)
rsp.text

 

Thank you in advance. 

1 REPLY 1
David_B.
Moderator

Hello,

 

Thank you for reaching out to the API Support team here at Constant Contact.

 

That error typically means that there is no list with that ID in the account you are calling. If you were to make a GET call to that endpoint (https://api.constantcontact.com/v2/lists/1?api_key=X), do you get a list in response?

 

Regards,
David Bornstein
Tier II API Support Engineer

Developer Portal

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

Visit Page