Skip to main content
Mar 20, 2015 10:22 AM UTC
Solved

Remove Leads from List using SOAP and REST APIs

Hi,

Recently we cannot remove leads from list using the RemoveLeadsFromList REST API with a POST request of "application/x-www-form-urlencoded" contentType, listId and leadIds in the request Url, _method=DELETE , the error code is 612(Invalid Content Type), does anyone have the same problem?(the code used to work fine before, I try to check but seems there's nothing change in the code, but I might be not 100% sure).

Then we switched to SOAP to perform the same action using ListOperation API(listOperation=REMOVEFROMLIST, listKey->keyType=MKTOLISTNAME), and encountered another problem: if the listKey->keyValue has some kind of special character( e.g: Chương trình List), an exception occurs: 20111 - List not found

Seems like some encoding is needed here, I've just tried Url encoding the value but it does not work either.

Any help would be greatly appriciated!
Thanks!

 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Jep_Castelein2
Jep_Castelein2Accepted solution
Level 10
Mar 20, 2015 5:01 PM UTC
Hi Tuan, I think the encoding needs to be "application/json" for the REST API. I've never used "application/x-www-form-urlencoded", so I can't say whether anything changed. 

2 replies

Jep_Castelein2
Jep_Castelein2Accepted solution
Level 10
Mar 20, 2015 5:01 PM UTC
Hi Tuan, I think the encoding needs to be "application/json" for the REST API. I've never used "application/x-www-form-urlencoded", so I can't say whether anything changed. 
Translate
Mar 23, 2015 2:36 AM UTC
Hi,
Thanks for your reply, I'll give a try with  "application/json" contentType.
Translate