Leads & Opportunities
GET https://api.mothernode.com/leads
Receive a list of all Leads
Sample Response:
{
"leads": [
{
"lead_number": "8160",
"lead_id": "448f18aa-a98c-11e5-ab45-e03f49a0757a",
"l_working_title": "Somthing 4",
"l_company_name": "Lead company 4",
"is_individual": "1",
"primary_contact": "ac86591e-a996-11e5-ab45-e03f49a0757a",
"customer_id": "449a3c12-a98c-11e5-ab45-e03f49a0757a",
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"l_tel": null,
"o_fax": null,
"l_website": null,
"o_toll_free": null,
"twitter": "",
"opp_status": "Open",
"assigned_to": null,
"next_steps": null,
"opp_probability_id": "50",
"o_project_cost": "0.00",
"o_close_date": null,
"o_invoice_date": null,
"bid_date": null,
"bid_time": null,
"l_source_description": "Description text",
"clean_up": "0",
"is_opportunity": "0",
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"contacts": [
{
"contact_id": "44b5ef1e-a98c-11e5-ab45-e03f49a0757a",
"first_name": "Bob",
"last_name": "Kelly",
"salutation": "Mr.",
"title": null,
"department": null,
"email": "bob@ktest.com",
"alt_email": null,
"company_name": "",
"use_company_default": "0",
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"tel": null,
"fax": null,
"website": null,
"toll_free": null,
"contact_birthday": "0000-00-00",
"contact_tel": null,
"contact_tel_ext": null,
"contact_mobile": null,
"contact_pager": null,
"contact_fax": null,
"contact_home": null,
"is_decision_maker": "0",
"is_campaign_participant": "0",
"is_survey_participant": "0",
"do_not_call": "0",
"do_not_email": "0",
"exclude_from_campaign": "0",
"twitter": "",
"linkedin": "",
"assistant": "",
"contact_ass_email": "",
"contact_ass_tel": ""
}
]
}
]
}
GET https://api.mothernode.com/leads/{id}
Receive a single Lead
GET https://api.mothernode.com/leads/0000000a-a0a0-00a0-a000-a00a00a0000a
Sample Response:
{
"lead": {
"lead_number": "8172",
"lead_id": "a7d42712-aa17-11e5-ab45-e03f49a0757a",
"l_working_title": "Something 9",
"l_company_name": "Ben Keller",
"is_individual": "1",
"primary_contact": "a7f3790f-aa17-11e5-ab45-e03f49a0757a",
"customer_id": "a7e1f422-aa17-11e5-ab45-e03f49a0757a",
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"l_tel": null,
"o_fax": null,
"l_website": null,
"o_toll_free": null,
"twitter": "",
"opp_status": "Open",
"assigned_to": null,
"next_steps": null,
"opp_probability_id": "50",
"o_project_cost": "0.00",
"o_close_date": null,
"o_invoice_date": null,
"bid_date": null,
"bid_time": null,
"l_source_description": "Description text",
"clean_up": "0",
"is_opportunity": "0",
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
},
"contacts": [
{
"contact_id": "a7f3790f-aa17-11e5-ab45-e03f49a0757a",
"first_name": "Ben",
"last_name": "Keller",
"salutation": "Mr.",
"title": null,
"department": null,
"email": "ben2@ktest.com",
"alt_email": null,
"company_name": "Ben Keller",
"use_company_default": "0",
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"tel": null,
"fax": null,
"website": null,
"toll_free": null,
"contact_birthday": "0000-00-00",
"contact_tel": null,
"contact_tel_ext": null,
"contact_mobile": null,
"contact_pager": null,
"contact_fax": null,
"contact_home": null,
"is_decision_maker": "0",
"is_campaign_participant": "0",
"is_survey_participant": "0",
"do_not_call": "0",
"do_not_email": "0",
"exclude_from_campaign": "0",
"twitter": "",
"linkedin": "",
"assistant": "",
"contact_ass_email": "",
"contact_ass_tel": "",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
}
}
]
}
}
POST https://api.mothernode.com/leads
Create a new Lead
{
"lead":
{
"l_working_title":"My Woking Title",
"l_company_name":"Some Company",
"is_individual":0,
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
},
"contact":
[
{
"salutation":"Mr.",
"first_name":"Bob",
"last_name":"Kelly",
"email":"bob@ktest.com",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
}
}
]
}
}
or create for individual
{
"lead":
{
"l_working_title":"My Woking Title",
"is_individual":1,
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
},
"contact":
[
{
"salutation":"Mr.",
"first_name":"Bob",
"last_name":"Smith",
"email":"bob.smith@ktest.com",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
}
}
]
}
}
On success will return status code 201 with response:
{
"lead": {
"lead_number": "8177",
"lead_id": "2a5a91f5-aa21-11e5-ab45-e03f49a0757a",
"l_working_title": "My Woking Title",
"l_company_name": "Some Company",
"is_individual": "0",
"primary_contact": "2a79b1b3-aa21-11e5-ab45-e03f49a0757a",
"customer_id": "2a67b629-aa21-11e5-ab45-e03f49a0757a",
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"l_tel": null,
"o_fax": null,
"l_website": null,
"o_toll_free": null,
"twitter": "",
"opp_status": "Open",
"assigned_to": null,
"next_steps": null,
"opp_probability_id": "50",
"o_project_cost": "0.00",
"o_close_date": null,
"o_invoice_date": null,
"bid_date": null,
"bid_time": null,
"l_source_description": "Description text",
"clean_up": "0",
"is_opportunity": "0",
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
},
"contacts": [
{
"contact_id": "2a79b1b3-aa21-11e5-ab45-e03f49a0757a",
"first_name": "Bob",
"last_name": "Kelly",
"salutation": "Mr.",
"title": null,
"department": null,
"email": "bob@ktest.com",
"alt_email": null,
"company_name": "Some Company",
"use_company_default": "0",
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"tel": null,
"fax": null,
"website": null,
"toll_free": null,
"contact_birthday": "0000-00-00",
"contact_tel": null,
"contact_tel_ext": null,
"contact_mobile": null,
"contact_pager": null,
"contact_fax": null,
"contact_home": null,
"is_decision_maker": "0",
"is_campaign_participant": "0",
"is_survey_participant": "0",
"do_not_call": "0",
"do_not_email": "0",
"exclude_from_campaign": "0",
"twitter": "",
"linkedin": "",
"assistant": "",
"contact_ass_email": "",
"contact_ass_tel": "",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
}
}
]
}
}
Create more than one lead in a single request
{
"leads": [
{
"l_working_title":"Lead 1",
"l_company_name":"Some Company 1",
"is_individual":0,
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"contact":
[
{
"salutation":"Mr.",
"first_name":"Bob1",
"last_name":"Kelly1",
"email":"bob1@ktest.com"
}
]
},
{
"l_working_title":"Lead 2",
"l_company_name":"Some Company 2",
"is_individual":0,
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"contact":
[
{
"salutation":"Mr.",
"first_name":"Bob2",
"last_name":"Kelly2",
"email":"bob1@ktest.com"
}
]
},
{
"l_working_title":"Lead 3",
"l_company_name":"Some Company 3",
"is_individual":0,
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"contact":
[
{
"salutation":"Mr.",
"first_name":"Bob3",
"last_name":"Kelly3",
"email":"bob1@ktest.com"
}
]
},
{
"l_working_title":"Lead 4",
"l_company_name":"Some Company 4",
"is_individual":0,
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"contact":
[
{
"salutation":"Mr.",
"first_name":"Bob4",
"last_name":"Kelly4",
"email":"bob4@ktest.com"
}
]
},
{
"l_working_title":"Lead 5",
"l_company_name":"Some Company 5",
"is_individual":0,
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"contact":
[
{
"salutation":"Mr.",
"first_name":"Bob5",
"last_name":"Kelly5",
"email":"bob5@ktest.com"
}
]
},
{
"l_working_title":"Lead 6",
"l_company_name":"Some Company 6",
"is_individual":0,
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"contact":
[
{
"salutation":"Mr.",
"first_name":"Bob6",
"last_name":"Kelly6",
"email":"bob6@ktest.com"
}
]
}
]
}
PUT https://api.mothernode.com/customers/{id}
Modify an existing Lead
{
"lead": {
"address1": "Chestnut Street 92",
"address2": "Appt. 2",
"city": "Louisville",
"state": "Kentucky",
"zip": "40202",
"country": "US",
"tel": "222-112-1122",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
}
}
}
On success will return status code 200 with response:
{
"lead": {
"lead_number": "8177",
"lead_id": "2a5a91f5-aa21-11e5-ab45-e03f49a0757a",
"l_working_title": "My Woking Title",
"l_company_name": "Some Company",
"is_individual": "0",
"primary_contact": "2a79b1b3-aa21-11e5-ab45-e03f49a0757a",
"customer_id": "2a67b629-aa21-11e5-ab45-e03f49a0757a",
"address1": "Chestnut Street 92",
"address2": "Appt. 2",
"city": "Louisville",
"state": "Kentucky",
"zip": "40202",
"country": "US",
"l_tel": null,
"o_fax": null,
"l_website": null,
"o_toll_free": null,
"twitter": "",
"opp_status": "Open",
"assigned_to": null,
"next_steps": null,
"opp_probability_id": "50",
"o_project_cost": "0.00",
"o_close_date": null,
"o_invoice_date": null,
"bid_date": null,
"bid_time": null,
"l_source_description": "Description text",
"clean_up": "0",
"is_opportunity": "0",
"v_lead_source": "Website",
"v_territory": "Northeast",
"v_phase_name": "2. Pre-planning",
"v_stage_name": "3. Discovery",
"v_type_name": "Expansion",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
},
"contacts": [
{
"contact_id": "2a79b1b3-aa21-11e5-ab45-e03f49a0757a",
"first_name": "Bob",
"last_name": "Kelly",
"salutation": "Mr.",
"title": null,
"department": null,
"email": "bob@ktest.com",
"alt_email": null,
"company_name": "Some Company",
"use_company_default": "0",
"address1": null,
"address2": null,
"city": null,
"state": null,
"zip": null,
"country": null,
"tel": null,
"fax": null,
"website": null,
"toll_free": null,
"contact_birthday": "0000-00-00",
"contact_tel": null,
"contact_tel_ext": null,
"contact_mobile": null,
"contact_pager": null,
"contact_fax": null,
"contact_home": null,
"is_decision_maker": "0",
"is_campaign_participant": "0",
"is_survey_participant": "0",
"do_not_call": "0",
"do_not_email": "0",
"exclude_from_campaign": "0",
"twitter": "",
"linkedin": "",
"assistant": "",
"contact_ass_email": "",
"contact_ass_tel": "",
"custom_fields": {
"your_custom_field_1_c10": "Sample 1",
"your_custom_field_2_c11": "Option 1, Option 2"
}
}
]
}
}
DELETE https://api.mothernode.com/leads/{id}
Remove a Lead from the database
Response:
HTTP/1.1 200 OK
{}
GET https://api.mothernode.com/leads/count
Receive a count of all Leads
Response:
{
"record_count": "658"
}