Felice_Vittoria | 2016-06-28 17:59:26 UTC | #1
I am getting the following error when attempting to load a record into a contact list.
<img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/b1ca0abb3b9870ddc3297d788890581b858d89f6.png" width="690" height="388">
Here's the code snippet that I'm using:
var body = new List<DialerContact>();
Dictionary<string, object> recordData = new Dictionary<string, object>(); recordData.Add("AccountNumber", "9999999999"); recordData.Add("FirstName", "9999999999"); recordData.Add("LastName", "9999999999"); recordData.Add("Phone", "9999999999");
DialerContact nr = new DialerContact("Test1", contactListId); nr.Data = recordData;
body.Add(nr);
DialerContact dc = apiInstance.PostContactlistsContactlistIdContacts(contactListId, body, false);
tim.smith | 2016-06-28 18:59:41 UTC | #2
Make sure you're using the latest SDK. It's possible that the contract changed and you're out of date.
Felice_Vittoria | 2016-06-29 00:57:30 UTC | #3
Thanks Tim. I am using version 0.60.312 and still get the same issue.
vrvoice1 | 2016-07-05 12:00:19 UTC | #4
Hi, that's interesting, I have the same issue but with a different function: <code> presensceApi.GetSystempresences(); </code>
NuGet Version 0.61.0.313
Kind regards
Felice_Vittoria | 2016-07-08 14:57:52 UTC | #5
I tried again with the 0.62.0.314 w/o any luck.
tim.smith | 2016-07-11 17:40:56 UTC | #6
The resource POST /api/v2/outbound/contactlists/{contactListId}/contacts specifies a single contact as the response in swagger, but the API actually returns a collection of contacts. This breaks the SDKs because they cannot parse the response (actual: collection vs. expected: json object). I've logged API-1705 to fix the API contract and regenerate the SDKs once the fix is in prod.
Felice_Vittoria | 2016-07-22 12:19:31 UTC | #7
Updated the project with the latest api ( 0.65.0.319 ) and get the same error.
tim.smith | 2016-07-22 15:02:35 UTC | #8
I apologize for the confusion. API-1705 was resolved, but the issue was not fixed correctly and the documented type still does not match the actual return type. I have reopened the issue and clarified the issue further.
system | 2017-08-28 19:25:05 UTC | #9
This post was migrated from the old Developer Forum.
ref: 104