Sample XML

You can view documentation of XML and JSON requests and responses at the following URL:

https://stageappsp.smashfly.com/contactmanagerservice/v2/ContactManagerRestService.svc/help/operations/SaveContact

Note: When submitting XML calls through the API, make sure that the post “contentType” is set to “text/xml."

Sample XML Success Response (No Errors)

This code sample shows a successful XML response.

Copy

Sample XML Success Response (No Errors)

<SaveContactResponse xmlns="http://schemas.datacontract.org/2004/07/SmashFly.WebServices.ContactManagerService.v2">
    <ContactId>1168255</ContactId>
    <Errors i:nil="true" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
    <HasErrors>false</HasErrors>
</SaveContactResponse>

Sample XML Success Response (With Errors)

This code sample shows a successful response that included errors. In this type of response, the contact data was imported to the given Contact ID, but some errors were encountered. Review the error string for details about the error.

Copy

Sample XML Success Response (With Errors)

<SaveContactResponse xmlns="http://schemas.datacontract.org/2004/07/SmashFly.WebServices.ContactManagerService.v2" 
    <ContactId>2147483647</ContactId>
    <Errors>
        <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">Error 1</string>
        <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">Error 2</string>
    </Errors>
    <HasErrors>true</HasErrors>
</SaveContactResponse>

Sample XML Request

Following is an example of the full XML request.

IMPORTANT: XML requires exact sequential elements. The format and order of fields sent in the request must match the format and order that are shown in the following example. You do not need to include any non-required fields for which you will not be passing data. For field requirements, refer to the Standard and Custom field lists.

Copy

Sample XML Request

<SaveContactRestRequest xmlns="http://schemas.datacontract.org/2004/07/SmashFly.WebServices.ContactManagerService.v2">
    <Contact>
        <Address1>1 Main Street</Address1>
        <Address2>Unit 2</Address2>
        <City>Boston</City>
        <Company>3COM</Company>
        <ContactListId>999999999</ContactListId>
        <Country>US</Country>
        <Education>
            <ContactEducation>
                <Degree>Bachelors</Degree>
                <GradYear>1988</GradYear>
                <HasGraduated>true</HasGraduated>
                <Major>Electrical Engineering</Major>
                <School>MIT</School>
            </ContactEducation>
            <ContactEducation>
                <Degree>Masters</Degree>
                <GradYear>1992</GradYear>
                <HasGraduated>true</HasGraduated>
                <Major>Business</Major>
                <School>Harvard</School>
            </ContactEducation>
        </Education>
        <EducationCurrent>BachelorofScience</EducationCurrent>
        <Email>gwashington7@invalidemail.com</Email>
        <EventListId>999999999</EventListId>
        <Experience>
            <ContactExperience>
                <Company>3COM</Company>
                <EndMonth>2</EndMonth>
                <EndYear>1998</EndYear>
                <JobTitle>Senior Engineer</JobTitle>
                <StartMonth>1</StartMonth>
                <StartYear>1992</StartYear>
                <State>MA</State>
                <Supervisor>Bob Smith</Supervisor>
                <SupervisorTitle>CTO</SupervisorTitle>
            </ContactExperience>
            <ContactExperience>
                <Company>EMC</Company>
                <EndMonth>7</EndMonth>
                <EndYear>2005</EndYear>
                <JobTitle>Business Analyst</JobTitle>
                <StartMonth>1</StartMonth>
                <StartYear>2003</StartYear>
            </ContactExperience>
        </Experience>
        <ExperienceCurrent>Experienced</ExperienceCurrent>
        <ExternalResumeId>9999999</ExternalResumeId>
        <FacebookProfile>https://www.facebook.com/smashflytechnologies</FacebookProfile>
        <FileToFolderPath>Specialized Sourcing/Veterans</FileToFolderPath>
        <FirstName>George</FirstName>
        <HomeEmail>gwashington@aol.com</HomeEmail>
        <IsEmployee>true</IsEmployee>
        <JobCode>19</JobCode>
        <JobId>LOS99710</JobId>
        <JobListStatus>Interviewing</JobListStatus>
        <JobListStatusNote>Great candidate</JobListStatusNote>
        <JobTitle>Senior Engineer</JobTitle>
        <LastName>Washington</LastName>
        <MobileNumber>9787931633</MobileNumber>
        <Notes>
            <ContactNote>
                <Note>George was a good president</Note>
                <Reminder>2013-08-31T11:20:00</Reminder>
            </ContactNote>
        </Notes>
        <Phone>978-342-3442</Phone>
        <PostalCode>01775</PostalCode>
        <ProfileURL>https://www.linkedin.com/company/846055</ProfileURL>
        <Resume>
            <![CDATA[GEORGE WASHINGTON<br /> 3200 Mount Vernon Hwy, Mt Vernon, VA<br />SUMMARY:<br />&bull;Former General<br />
           &bull; First president of United States of America<br />
           &bull; Distiller<br />Remainder of HTML Resume]]>        
        </Resume>
        <ResumeBin>
            <Content xmlns="http://schemas.datacontract.org/2004/07/SmashFly.WebServices.ContactManagerService.v2.DataContracts">
            R0VPUkdFIFdBU0hJTkdUT04NCjMyMDAgTW91bnQgVmVybm9uIEh3eSwgTXQgVmVybm9uLCBWQQ0KU1VNTUFSWToNCuKAokZvcm1lciBHZW5lcmFsDQrigKIgRmlyc3QgcHJlc2lkZW50IG9mIFVuaXRlZCBTdGF0ZXMgb2YgQW1lcmljYQ0K4oCiIERpc3RpbGxlcg0KUmVtYWluZGVyIG9mIEhUTUwgUmVzdW1l
            </Content>
            <Name xmlns="http://schemas.datacontract.org/2004/07/SmashFly.WebServices.ContactManagerService.v2.DataContracts">Resume.txt</Name>
        </ResumeBin>
        <SecondarySource>Indeed</SecondarySource>
        <State>MA</State>
        <TDSearchFolder>Text goes here</TDSearchFolder>
        <Tags>
            <ContactTag>
                <Access>Public</Access>
                <Tag>Engineering</Tag>
            </ContactTag>
            <ContactTag>
                <Access>Public</Access>
                <Tag>Java</Tag>
            </ContactTag>
        </Tags>
        <TwitterProfile>https://twitter.com/smashfly</TwitterProfile>
        <UDF>
            <ContactUDFData>
                <FieldName>ShortTextField4</FieldName>
                <Values>
                    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">CivilEngineering</string>
                    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">ElectricalEngineering</string>
                </Values>
            </ContactUDFData>
            <ContactUDFData>
                <FieldName>ShortTextField7</FieldName>
                <Values>
                    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">Construction</string>
                    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">Facilities_Mgmt</string>
                </Values>
            </ContactUDFData>
        </UDF>
        <UserScore>2.56743233E+15</UserScore>
        <WebURL>http://www.smashfly.com</WebURL>
        <WorkPhone>781-222-4422</WorkPhone>
        <_CanReceiveEmailImpl>true</_CanReceiveEmailImpl>
        <_CanReceiveSMSImpl>true</_CanReceiveSMSImpl>
        <_IsApplicantImpl>true</_IsApplicantImpl>
        <CanReceiveEmail>true</CanReceiveEmail>
        <CanReceiveSMS>true</CanReceiveSMS>
        <IsApplicant>true</IsApplicant>
    </Contact>
    <ContactDBId>99999999</ContactDBId>
    <Password>YourPassword</Password>
    <UserName>YourUsername</UserName>
</SaveContactRestRequest>