Customers API

Mothernode API – Customers

Customers

GET https://api.mothernode.com/customers

Receive a list of all Customers

Sample Response:

{
  "customers": [
    {
      "customer_id": "0000000a-a0a0-00a0-a000-a00a00a0000a",
      "company_name": "Sample Company",
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "state": "KY",
      "zip": "40202",
      "country": "US",
      "tel": "555-625-1199",
      "fax": "",
      "website": "",
      "toll_free": null,
      "billing_name": null,
      "billing_use_default": "1",
      "billing_address1": "",
      "billing_address2": "",
      "billing_city": "",
      "billing_state": "",
      "billing_zip": "",
      "billing_country": "US",
      "billing_tel": "",
      "billing_fax": "",
      "billing_toll_free": null,
      "shipping_name": null,
      "shipping_use_default": "1",
      "shipping_address1": "",
      "shipping_address2": "",
      "shipping_city": "",
      "shipping_state": "",
      "shipping_zip": "",
      "shipping_country": "US",
      "shipping_tel": "",
      "shipping_fax": "",
      "shipping_toll_free": null,
      "customer_number": "9999",
      "sales_user_id": "0",
      "pm1_user_id": "0",
      "contacts": [
        {
          "contact_id": "0000000b-b0b0-00b0-b000-b00b00b0000b",
          "first_name": "John",
          "last_name": "Smith",
          "salutation": "",
          "title": "",
          "department": "",
          "email": "",
          "alt_email": null,
          "company_name": null,
          "use_company_default": "0",
          "address1": "",
          "address2": "",
          "city": "",
          "state": "",
          "zip": "",
          "country": "US",
          "tel": null,
          "fax": null,
          "website": "",
          "toll_free": null,
          "contact_birthday": "0000-00-00",
          "contact_tel": "",
          "contact_tel_ext": "",
          "contact_mobile": "",
          "contact_pager": "",
          "contact_fax": "",
          "contact_home": "",
          "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": ""
        },
        {
          "contact_id": "ea2b7225-0e88-11e4-bbc3-e03f49a0757a",
          "first_name": "Jane",
          "last_name": "Smith",
          "salutation": "",
          "title": "",
          "department": "",
          "email": "",
          "alt_email": null,
          "company_name": null,
          "use_company_default": "0",
          "address1": "",
          "address2": "",
          "city": "",
          "state": "",
          "zip": "",
          "country": "US",
          "tel": null,
          "fax": null,
          "website": "",
          "toll_free": null,
          "contact_birthday": "0000-00-00",
          "contact_tel": "",
          "contact_tel_ext": "",
          "contact_mobile": "",
          "contact_pager": "",
          "contact_fax": "",
          "contact_home": "",
          "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": ""
        }
      ]
    }
  ]
}

Filter records:

GET https://api.mothernode.com/customers?company_name=Large Co.

GET https://api.mothernode.com/customers?country=US&state=TX


GET https://api.mothernode.com/customers/{id}

Receive a single Customer

GET https://api.mothernode.com/customers/0000000a-a0a0-00a0-a000-a00a00a0000a

Sample Response:

{
  "customer": {
    "customer_id": "010a25e4-cdfd-102e-8654-00219b89b785",
    "company_name": "Bill's BBQ",
    "address1": "2222 Dallas Drive",
    "address2": "Suite 201",
    "city": "Denton",
    "state": "TX",
    "zip": "75220",
    "country": "US",
    "tel": "888-888-8888",
    "fax": "",
    "website": "",
    "toll_free": "888-888-8888",
    "billing_name": "Jacks BBQ",
    "billing_use_default": "0",
    "billing_address1": "4545 Fort Worth Drive",
    "billing_address2": "",
    "billing_city": "Dallas",
    "billing_state": "TX",
    "billing_zip": "76210",
    "billing_country": "US",
    "billing_tel": "563-563-5666",
    "billing_fax": "",
    "billing_toll_free": "800-800-8000",
    "shipping_name": "larry's",
    "shipping_use_default": "0",
    "shipping_address1": "4578 Cedar Way",
    "shipping_address2": "",
    "shipping_city": "Jacksonville",
    "shipping_state": "FL",
    "shipping_zip": "45455",
    "shipping_country": "US",
    "shipping_tel": "",
    "shipping_fax": "",
    "shipping_toll_free": "",
    "customer_number": "1998",
    "sales_user_id": "1c7cd30e-21b9-102d-bb27-00219b89b785",
    "pm1_user_id": "ab071d9e-46d2-102d-bb27-00219b89b785",
	"custom_fields": {
      "your_custom_field_1_c10": "Sample 1",
      "your_custom_field_2_c11": "Sample 2"
    },
    "contacts": [
      {
        "contact_id": "26a07f4c-cdfd-102e-8654-00219b89b785",
        "first_name": "Jack",
        "last_name": "Brown",
        "salutation": null,
        "title": "VP of Construction",
        "department": "Sales",
        "email": "jack.brown@any.com",
        "alt_email": null,
        "company_name": null,
        "use_company_default": "0",
        "address1": "2222 Dallas Drive",
        "address2": null,
        "city": "Denton",
        "state": "TX",
        "zip": "75220",
        "country": "US",
        "tel": null,
        "fax": null,
        "website": null,
        "toll_free": null,
        "contact_birthday": "0000-00-00",
        "contact_tel": "(888) 888-8888",
        "contact_tel_ext": null,
        "contact_mobile": null,
        "contact_pager": null,
        "contact_fax": null,
        "contact_home": null,
        "is_decision_maker": "1",
        "is_campaign_participant": "1",
        "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": "Sample 2"
		}
      }
    ]
  }
}

POST https://api.mothernode.com/customers

Create a new Customer

{
  "customer": {
      "company_name": "Sample Company",
      "address1": "Chestnut Street 92",
      "address2": "",
      "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 201 with response:

{
  "customer": {
    "customer_id": "efbcd1d3-aa25-11e5-ab45-e03f49a0757a",
    "company_name": "Sample Company",
    "address1": "Chestnut Street 92",
    "address2": "",
    "city": "Louisville",
    "state": "Kentucky",
    "zip": "40202",
    "country": "US",
    "tel": "222-112-1122",
    "fax": "",
    "website": "",
    "toll_free": null,
    "billing_name": null,
    "billing_use_default": "1",
    "billing_address1": "",
    "billing_address2": "",
    "billing_city": "",
    "billing_state": "",
    "billing_zip": "",
    "billing_country": "",
    "billing_tel": "",
    "billing_fax": "",
    "billing_toll_free": null,
    "shipping_name": null,
    "shipping_use_default": "1",
    "shipping_address1": "",
    "shipping_address2": "",
    "shipping_city": "",
    "shipping_state": "",
    "shipping_zip": "",
    "shipping_country": "",
    "shipping_tel": "",
    "shipping_fax": "",
    "shipping_toll_free": null,
    "customer_number": "7624",
    "sales_user_id": null,
    "pm1_user_id": null,
	"custom_fields": {
      "your_custom_field_1_c10": "Sample 1",
      "your_custom_field_2_c11": "Option 1, Option 2"
    },
    "contacts": []
  }
}


PUT https://api.mothernode.com/customers/{id}

Modify an existing Customer

{
  "customer": {
      "address2": "Suite 201"
    }
}

On success will return status code 200 with response:

{
  "customer": {
    "customer_id": "010a25e4-cdfd-102e-8654-00219b89b785",
    "company_name": "Bill's BBQ",
    "address1": "2222 Dallas Drive",
    "address2": "",
    "city": "Denton",
    "state": "TX",
    "zip": "75220",
    "country": "US",
    "tel": "888-888-8888",
    "fax": "",
    "website": "",
    "toll_free": "888-888-8888",
    "billing_name": "Jacks BBQ",
    "billing_use_default": "0",
    "billing_address1": "4545 Fort Worth Drive",
    "billing_address2": "",
    "billing_city": "Dallas",
    "billing_state": "TX",
    "billing_zip": "76210",
    "billing_country": "US",
    "billing_tel": "563-563-5666",
    "billing_fax": "",
    "billing_toll_free": "800-800-8000",
    "shipping_name": "larry's",
    "shipping_use_default": "0",
    "shipping_address1": "4578 Cedar Way",
    "shipping_address2": "",
    "shipping_city": "Jacksonville",
    "shipping_state": "FL",
    "shipping_zip": "45455",
    "shipping_country": "US",
    "shipping_tel": "",
    "shipping_fax": "",
    "shipping_toll_free": "",
    "customer_number": "1998",
    "sales_user_id": "1c7cd30e-21b9-102d-bb27-00219b89b785",
    "pm1_user_id": "ab071d9e-46d2-102d-bb27-00219b89b785",
	"custom_fields": {
      "your_custom_field_1_c10": "Sample 1",
      "your_custom_field_2_c11": "Option 1, Option 2"
    },
    "contacts": [
      {
        "contact_id": "26a07f4c-cdfd-102e-8654-00219b89b785",
        "first_name": "Jack",
        "last_name": "Brown",
        "salutation": null,
        "title": "VP of Construction",
        "department": "Sales",
        "email": "jack.brown@any.com",
        "alt_email": null,
        "company_name": null,
        "use_company_default": "0",
        "address1": "2222 Dallas Drive",
        "address2": null,
        "city": "Denton",
        "state": "TX",
        "zip": "75220",
        "country": "US",
        "tel": null,
        "fax": null,
        "website": null,
        "toll_free": null,
        "contact_birthday": "0000-00-00",
        "contact_tel": "(888) 888-8888",
        "contact_tel_ext": null,
        "contact_mobile": null,
        "contact_pager": null,
        "contact_fax": null,
        "contact_home": null,
        "is_decision_maker": "1",
        "is_campaign_participant": "1",
        "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": ""
      }
    ]
  }
}

DELETE https://api.mothernode.com/customers/{id}

Remove a Customer from the database

Response:

HTTP/1.1 200 OK
{}

GET https://api.mothernode.com/customers/count

Receive a count of all Customers

Response:

{
  "record_count": "658"
}

Filter records count:

GET https://api.mothernode.com/customers/count?country=US
Print Friendly, PDF & Email

Was this article helpful?

Related Articles