Remove Leads from List using SOAP and REST APIs | Community
Skip to main content
March 20, 2015
Solved

Remove Leads from List using SOAP and REST APIs

  • March 20, 2015
  • 2 replies
  • 1243 views
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.
Best answer by Jep_Castelein2
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
March 20, 2015
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. 
March 23, 2015
Hi,
Thanks for your reply, I'll give a try with  "application/json" contentType.