Update Lead
Use this operation to update any of the writable fields of an existing Lead object. The request body must include all writable fields of the existing object as returned in a read response. Writable fields omitted from the request body are set to NULL.
Parameters
Body Params | |
---|---|
JSON: | json |
XML: | string |
Path Params | |
---|---|
yourCompany: | string |
Header Params | |
---|---|
Accept: | string |
Query Auth | |
---|---|
key: | string |
Header Auth | |
---|---|
apiKey: | string |
Sample Contact Object
{
"Leads": {
"Lead": [{
"Salutation": "--None--",
"FirstName": "Test",
"LastName": "New Lead",
"Company": "Test Company",
"Title": "Test Title",
"Phone": "56412356",
"Mobile": "7412536589",
"Fax": "5689746",
"Email": "[email protected]",
"Website": "",
"Industry": "Recreation",
"SICCode": "10",
"AnnualRevenue": "65",
"NumberOfEmployees": "25",
"ContactType": "Customer",
"LeadSource": "Self Generated",
"LeadStatus": "Contacted",
"Rating": "Acquired",
"EmailOptOut": "No",
"YahooID": "[email protected]",
"CreatedTime": "01-24-2020 05:01:35",
"ModifiedTime": "01-24-2020 05:05:56",
"Street": "1515 Clay Street",
"City": "Oakland",
"State": "CA",
"Zip": "94624",
"Country": "United States",
"Description": "The Description Goes here.",
"AssignedTo": "admin",
"AssignedGroupName": "",
"DefaultCurrency": "USD",
"LeadCustomFields": {
"CustomField": [{
"Name": "CustomFied1",
"Value": "Custom info 1"
},
{
"Name": "CustomFied2",
"Value": "Custom info 2"
}
]
}
}]
}
}
<Leads>
<Lead>
<Salutation>--None--</Salutation>
<FirstName>Test</FirstName>
<LastName>New Lead</LastName>
<Company>Test Company</Company>
<Title>Test Title</Title>
<Phone>56412356</Phone>
<Mobile>7412536589</Mobile>
<Fax>5689746</Fax>
<Email>[email protected]</Email>
<Website />
<Industry>Recreation</Industry>
<SICCode>10</SICCode>
<AnnualRevenue>65</AnnualRevenue>
<NumberOfEmployees>25</NumberOfEmployees>
<ContactType>Customer</ContactType>
<LeadSource>Self Generated</LeadSource>
<LeadStatus>Contacted</LeadStatus>
<Rating>Acquired</Rating>
<EmailOptOut>No</EmailOptOut>
<YahooID>[email protected]</YahooID>
<CreatedTime>01-24-2020 05:01:35</CreatedTime>
<ModifiedTime>01-24-2020 05:05:56</ModifiedTime>
<Street>1515 Clay Street</Street>
<City>Oakland</City>
<State>CA</State>
<Zip>94624</Zip>
<Country>United States</Country>
<Description>The Description Goes here.</Description>
<AssignedTo>admin</AssignedTo>
<AssignedGroupName></AssignedGroupName>
<DefaultCurrency>USD</DefaultCurrency>
<LeadCustomFields>
<CustomField>
<Name>CustomFied1</Name>
<Value>Custom info 1</Value>
</CustomField>
<CustomField>
<Name>CustomFied2</Name>
<Value>Custom info 2</Value>
</CustomField>
</LeadCustomFields>
</Lead>
</Leads>
Sample Response
{
"MCM": {
"response": {
"objectType": "Lead",
"syncTime": "2021-06-10 03:23:14"
},
"parameters": {
"results": {
"message": {
"status": "Success",
"success_message": {
"lead_name": "Test New Lead",
"lead_id": "203060"
}
}
}
}
}
}
<MCM>
<response>
<objectType>Lead</objectType>
<syncTime>2021-06-10 03:23:14</syncTime>
</response>
<parameters>
<results>
<message>
<status>Success</status>
<success_message>
<lead_id>203060</lead_id>
<lead_name>Test New Lead</lead_name>
</success_message>
</message>
</results>
</parameters>
</MCM>
WADL
<?xml version="1.0" encoding="utf-8"?>
<application>
<resources base="https://{yourCompany}.agiliron.net/agiliron/api-40/">
<resource path="Leads">
<method name="PUT">
<request>
<param name="key" type="xsd:string" style="query" required="true"/>
<param name="LeadId" type="xsd:string" style="body" required="true"/>
<param name="Salutation" type="xsd:string" style="body"/>
<param name="FirstName" type="xsd:string" style="body"/>
<param name="LastName" type="xsd:string" style="body" required="true"/>
<param name="Company" type="xsd:string" style="body" required="true"/>
<param name="Title" type="xsd:string" style="body"/>
<param name="Phone" type="xsd:string" style="body"/>
<param name="Mobile" type="xsd:string" style="body"/>
<param name="Fax" type="xsd:string" style="body"/>
<param name="Email" type="xsd:string" style="body"/>
<param name="Website" type="xsd:string" style="body"/>
<param name="Industry" type="xsd:string" style="body"/>
<param name="SICCode" type="xsd:int" style="body"/>
<param name="AnnualRevenue" type="xsd:int" style="body"/>
<param name="NumberOfEmployees" type="xsd:string" style="body"/>
<param name="ContactType" type="xsd:string" style="body"/>
<param name="LeadSource" type="xsd:string" style="body"/>
<param name="LeadStatus" type="xsd:string" style="body"/>
<param name="Rating" type="xsd:string" style="body"/>
<param name="EmailOptOut" type="xsd:string" style="body"/>
<param name="YahooID" type="xsd:string" style="body"/>
<param name="CreatedTime" type="xsd:dateTime" style="body"/>
<param name="ModifiedTime" type="xsd:dateTime" style="body"/>
<param name="Street" type="xsd:decimal" style="body"/>
<param name="City" type="xsd:decimal" style="body"/>
<param name="State" type="xsd:decimal" style="body"/>
<param name="Zip" type="xsd:decimal" style="body"/>
<param name="Country" type="xsd:decimal" style="body"/>
<param name="Description" type="xsd:string" style="body"/>
<param name="AssignedGroupName" type="xsd:string" style="body"/>
</request>
<response status="200">
<representation mediaType="application/xml" element="yn:ResultSet"/>
</response>
<response status="400">
<representation mediaType="application/xml" element="ya:Error"/>
</response>
</method>
</resource>
</resources>
</application>
Updated about 22 hours ago