<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Adding Campaign Contacts</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=11327990" />
  <subtitle>Adding Campaign Contacts</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=11327990</id>
  <updated>2013-05-25T22:21:56Z</updated>
  <dc:date>2013-05-25T22:21:56Z</dc:date>
  <entry>
    <title>RE: Adding Campaign Contacts</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11396106" />
    <author>
      <name>Aaron Harrison</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11396106</id>
    <updated>2013-02-01T09:39:57Z</updated>
    <published>2013-02-01T09:39:57Z</published>
    <summary type="html">Hi Kavitha
Great!
I'm looking forward to getting a lot of stuff done with this API, it has been wanted for a long time!
Thanks
Aaron</summary>
    <dc:creator>Aaron Harrison</dc:creator>
    <dc:date>2013-02-01T09:39:57Z</dc:date>
  </entry>
  <entry>
    <title>RE: Adding Campaign Contacts</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11395304" />
    <author>
      <name>Kavitha Prakash</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11395304</id>
    <updated>2013-02-01T09:28:27Z</updated>
    <published>2013-02-01T09:28:27Z</published>
    <summary type="html">Hi Aaron,
The developer guide is updated to correct the refURL. It will be posted to CDN shortly. Thanks!
Kavitha</summary>
    <dc:creator>Kavitha Prakash</dc:creator>
    <dc:date>2013-02-01T09:28:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: Adding Campaign Contacts</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11330924" />
    <author>
      <name>Aaron Harrison</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11330924</id>
    <updated>2013-01-30T22:39:30Z</updated>
    <published>2013-01-30T22:39:30Z</published>
    <summary type="html">Right - figured it out, eventually!
The documentation has an error on the sample input:
&lt;refURL&gt;URL&lt;refURL&gt;
Should (of course) be 
&lt;refURL&gt;URL&lt;/refURL&gt;
I was sure I tried submitting the result of a GET campaign/id/contacts, but I evidently didn't do that properly earlier.
Happy days!</summary>
    <dc:creator>Aaron Harrison</dc:creator>
    <dc:date>2013-01-30T22:39:30Z</dc:date>
  </entry>
  <entry>
    <title>Adding Campaign Contacts</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11327989" />
    <author>
      <name>Aaron Harrison</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11327989</id>
    <updated>2013-01-30T22:30:22Z</updated>
    <published>2013-01-30T21:48:18Z</published>
    <summary type="html">I had hoped my first post on this subject was going to be of the 'look at this clever thing I did' variety, but I'm afraid it's going to be the other kind.
I've played with this API some today, and I'm able to retrieve and add campaigns to the system no problem.
I've added one, which I can retrieve like so:
GET http://192.168.0.92:8080/adminapi/campaign/
Returns:
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;campaigns&gt;&lt;campaign&gt;&lt;self&gt;http://192.168.0.92:8080/adminapi/campaign/2&lt;/self&gt;&lt;campaignId&gt;2&lt;/campaignId&gt;&lt;campaignName&gt;test&lt;/campaignName&gt;&lt;enabled&gt;false&lt;/enabled&gt;&lt;description&gt;tset&lt;/description&gt;&lt;startTime&gt;02:00&lt;/startTime&gt;&lt;endTime&gt;23:59&lt;/endTime&gt;&lt;timeZone&gt;Greenwich Mean Time&lt;/timeZone&gt;&lt;campaignType&gt;AGENT&lt;/campaignType&gt;&lt;dialerType&gt;DIRECT_PREVIEW&lt;/dialerType&gt;&lt;pendingContacts&gt;0&lt;/pendingContacts&gt;&lt;/campaign&gt;&lt;/campaigns&gt;
Now... I can't seem to submit any sort of campaignContacts object without it falling over.
For example, I try to add the sample call from the developer guide, but with 'URL' substituted for the URL of my campaign (presuming that's what I'm supposed to do - it seems to work in other requests):
POST http://192.168.0.92:8080/adminapi/campaign/2/contacts
Content:
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;campaignContacts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="campaignContacts.xsd"&gt;
&lt;campaign name="Campaign1"&gt;
&lt;refURL&gt;http://192.168.0.92:8080/adminapi/campaign/2&lt;refURL&gt;
&lt;/campaign&gt;
&lt;csvdata&gt;
Account Number, First Name, Last Name ,Phone1, Phone2, Phone3, Dial Time
ABCD1234, John , Doe, 1401111, 1402222, 1403333, 12:35
ABCD1235, Jane , Smith, 1504444, 1505555, 1506666, 12:35
&lt;/csvdata&gt;
&lt;/campaignContacts&gt;
This returns a HTML error 400:
 
&lt;!-- custom Cisco error page --&gt;&lt;html&gt;    &lt;head&gt;        &lt;title&gt;            Cisco System - Error report        &lt;/title&gt;        &lt;style type="text/css"&gt;            a {                color: #316984;                text-decoration: none;            }            a:hover {                color: #316984;                text-decoration: underline;            }            a:visted {                color: #316984;                text-decoration: none;            }            body {                background-attachment: fixed;                background-color: #ffffff;                background-repeat: no-repeat;                color: #316984;                font-family: arial,helvetica,sans-serif;            }            #content {                border: 1px solid #d6d7d6;                font-size: 93.5%;                margin: 0px 10% 30px 10%;            }            #content-header {                background-color: #eeeeee;                border-bottom: 1px solid #666666;                color: #666666;                font-size: 124.5%;                padding: 5px 15px 5px 15px;            }            #copyright {                font-size: 75%;                margin: 0px 10% 0px 10%;                padding: 3px 0px 0px 0px;                text-align: right;            }            img {                display: block;                margin: 0px 0px 20px 0px;            }            #logo {                margin: 30px 10% 0px 10%;            }            p {                padding: 5px 15px 5px 15px;            }            pre {                padding: 5px 15px 5px 30px;            }        &lt;/style&gt;    &lt;/head&gt;    &lt;body&gt;        &lt;div id="logo"&gt;            &lt;img src="http://developer.cisco.com/ciscologo.gif" alt="Cisco Systems, Inc." /&gt;        &lt;/div&gt;        &lt;div id="content"&gt;            &lt;div id="content-header"&gt;HTTP Status 400 - Bad Request            &lt;/div&gt;            &lt;p&gt;                &lt;b&gt;                    type:               &lt;/b&gt; Status report            &lt;/p&gt;            &lt;p&gt;                &lt;b&gt;message:               &lt;/b&gt; Bad Request            &lt;/p&gt;            &lt;p&gt;                &lt;b&gt;description:               &lt;/b&gt; The request sent by the client was syntactically incorrect (Bad Request).            &lt;/p&gt;        &lt;/div&gt;    &lt;/body&gt;&lt;/html&gt;
 
If I remove the campaign section like so:
 
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;campaignContacts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="campaignContacts.xsd"&gt;
 
&lt;csvdata&gt;
Account Number, First Name, Last Name ,Phone1, Phone2, Phone3, Dial Time
ABCD1234, John , Doe, 1401111, 1402222, 1403333, 12:35
ABCD1235, Jane , Smith, 1504444, 1505555, 1506666, 12:35
&lt;/csvdata&gt;
&lt;/campaignContacts&gt;
I get a parse error which seems reasonable:
&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;apiErrors&gt;&lt;apiError&gt;&lt;errorData&gt;&lt;/errorData&gt;&lt;errorMessage&gt;cvc-complex-type.2.4.a: Invalid content was found starting with element 'csvdata'. One of '{campaign}' is expected.&lt;/errorMessage&gt;&lt;errorType&gt;InvalidInput&lt;/errorType&gt;&lt;/apiError&gt;&lt;/apiErrors&gt;
But as soon as I enter any campaign info it breaks.
 
Thanks for any input...
 
Aaron</summary>
    <dc:creator>Aaron Harrison</dc:creator>
    <dc:date>2013-01-30T21:48:18Z</dc:date>
  </entry>
</feed>

