POST Create Lead

This creates a new lead in the partner lead hub. A lead must have at least a first name, last name, or company to be created.

Endpoint /partnerapi/v1.0/Leads
Method POST
Request Headers Content-Type : application/json

Request Sample Body

{
"FirstName" : "Tarun",
"LastName" : "Chawla",
"Company" : "Aprimo DM",
"Title" : "Director",
"Email" : "tarun.chawla@aprimo.com",
"Phone" : "555-555-5555",
"Country" : "USA",
"Address 1" : "123 Main St",
"Address 2" : "Suite 489",
"City" : "Chicago",
"State" : "IL",
"PostalCode" : "60601",
"Source" : "Website",
"Score" : "48",
"CustomField1" : "Product 1",
"CustomField2" : "Yes",
"CustomField3" : "Category",
“Description” : “”
}

Response Body Sample

{
“LeadId” : “1910”,
"FirstName" : "Tarun",
"LastName" : "Chawla",
"Company" : "Aprimo DM",
"Title" : "Director",
"Email" : "tarun.chawla@aprimo.com",
"Phone" : "555-555-5555",
"Country" : "USA",
"Address 1" : "123 Main St",
"Address 2" : "Suite 489",
"City" : "Chicago",
"State" : "IL",
"PostalCode" : "60601",
"Source" : "Website",
"Score" : "48",
"CustomField1" : "Product 1",
"CustomField2" : "Yes",
"CustomField3" : "Category",
“Description” : “”
"LastModifiedDate": "2013-02-26T00:00:00Z"
}

GET All Leads

This returns any leads the partner has visibility to:
• Leads that are partner-generated and owned by that partner.
• Leads that have been routed to the partner by that brand.
By default, only leads whose status is NOT “Closed – Converted” or “Closed – Not Converted” are returned.

Endpoint /partnerapi/v1.0/Leads
Method GET
Query String Parameters &lastmodified={date}: Optional. If this is supplied, only return leads that have a last modified date greater than or equal to the passed in date.
&includeclosed={true/false}: Optional. If this is supplied, return leads in any status.
Request Headers Content-Type : application/json
Request Body Sample N/A

Response Body Sample

[{
“LeadId” : “1910”,
"FirstName" : "Tarun",
"LastName" : "Chawla",
"Company" : "Aprimo DM",
"Title" : "Director",
"Email" : "tarun.chawla@aprimo.com",
"Phone" : "555-555-5555",
"Country" : "USA",
"Address 1" : "123 Main St",
"Address 2" : "Suite 489",
"City" : "Chicago",
"State" : "IL",
"PostalCode" : "60601",
"Source" : "Website",
"Score" : "48",
"CustomField1" : "Product 1",
"CustomField2" : "Yes",
"CustomField3" : "Category",
“Description” : “”
"LastModifiedDate": "2013-02-26T00:00:00Z"
},
{“LeadId” : “1911”,
"FirstName" : "Kevin",
"LastName" : "Souers",
"Company" : "Aprimo DM",
"Title" : "CTO",
"Email" : "kevin.souers@aprimo.com",
"Phone" : "555-555-5555",
"Country" : "USA",
"Address 1" : "123 Main St",
"Address 2" : "Suite 489",
"City" : "Chicago",
"State" : "IL",
"PostalCode" : "60601",
"Source" : "Website",
"Score" : "48",
"CustomField1" : "Product 1",
"CustomField2" : "Yes",
"CustomField3" : "Category",
“Description” : “”
"LastModifiedDate": "2013-02-26T00:00:00Z"
}]

GET Single Leads

Get an existing lead and its supplemental information.

Endpoint /partnerapi/v1.0/Leads/{id}
Method GET
Request Headers Content-Type : application/json
Request Body Sample N/A

Response Body Sample

{
"LeadId": "1910",
"FirstName": "Tarun",
"LastName": "Chawla",
"Company": "Aprimo DM",
"Title": "Director",
"Email": "tarun.chawla@aprimo.com",
"Phone": "555-555-5555",
"Country": "USA",
"Address 1": "123 Main St",
"Address 2": "Suite 489",
"City": "Chicago",
"State": "IL",
"PostalCode": "60601",
"Source": "Website",
"Score": "48",
"CustomField1": "Product 1",
"CustomField2": "Yes",
"CustomField3": "Category",
"Description": "",
"Brand": "NewCo It",
"Owner": "Jack McGee",
"DistributionStatus": "Routed",
"AcceptanceStatus": "Accepted",
"AcceptanceModified": "2013-02-26T00:00:00Z",
"LastModifiedDate": "2013-02-26T00:00:00Z",
"AdditionalContacts": [{
"FirstName": "FName",
"LastName": "LName",
"Title": "Title",
"Email": "Email",
"Phone": "Phone"
}, {
"FirstName": "Tarun",
"LastName": "Chawla",
"Title": "Director",
"Email": "tarun.chawla@aprimo.com",
"Phone": "555-555-5555"
}],
"Comments": [{
"Comment": "This is the comment.",
"AddedBy": "Tarun Chawla",
"Date": "2013-02-26T00:00:00Z"
}, {
"Comment": "This is another comment.",
"AddedBy": "Tarun Chawla",
"Date": "2013-02-27T00:00:00Z "
}],
"Opportunities": [{
"Name": "OppName",
"Value": "4000",
"Status": "Qualification",
"TargetClose": "2013-02-26",
"Description": "This is a hot opportunity."
}],
"Tasks": [{
"Title": "Call Lead",
"AssignTo": "Tarun Chawla",
"TaskDate": "2015-04-12",
"TaskType": "Appointment Set",
"TaskDetails": "Call this lead and see if they are interested in ACME Proset."
}]
}

PUT Update Lead

Endpoint /partnerapi/v1.0/Leads/{id}
Method PUT
Request Headers Content-Type : application/json

Request Body Sample

{
"FirstName": "Tarun",
"LastName": "Chawla",
"Company": "Aprimo DM",
"Title": "Director",
"Email": "tarun.chawla@aprimo.com",
"Phone": "555-555-5555",
"Country": "USA",
"Address 1": "123 Main St",
"Address 2": "Suite 489",
"City": "Chicago",
"State": "IL",
"PostalCode": "60601",
"Source": "Website",
"Score": "48",
"CustomField1": "Product 1",
"CustomField2": "Yes",
"CustomField3": "Category",
"Description": "",
"Brand": "NewCo It",
"Owner": "Jack McGee",
"DistributionStatus": "Routed",
"AcceptanceStatus": "Accepted",
"AcceptanceModified": "2013-02-26T00:00:00Z",
}

 

Response Body Sample

// Same response as GET Single Lead.

DELETE Single Lead

Deletes a single lead and all associated child data (additional contacts, comments, tasks, distribution history, and opportunities).

Endpoint /partnerapi/v1.0/Leads/{id}
Method DELETE
Request Headers Content-Type : application/json
Request Body Sample N/A
Response Body Sample Empty