SOLVED

Remove Leads from List using SOAP and REST APIs

Go to solution
Anonymous
Not applicable

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!

 
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Jep_Castelein2
Level 10

Re: Remove Leads from List using SOAP and REST APIs

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. 

View solution in original post

2 REPLIES 2
Jep_Castelein2
Level 10

Re: Remove Leads from List using SOAP and REST APIs

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. 
Anonymous
Not applicable

Re: Remove Leads from List using SOAP and REST APIs

Hi,
Thanks for your reply, I'll give a try with  "application/json" contentType.