1. Home
  2. API v2.0
  3. Accounts
  4. List & Search Accounts

List & Search Accounts

Method: /customers.[format]

Parameters: (optional)

Param Name: Description:
contextId (required) Defines what type of account you’re retrieving (2, 8, 10)
page Which page to retrieve from paginated results (numeric)
pageLimit How many records per result set (numeric between 1 – 200)
emailAddress Get data for specific account by primary email address (string)
accountNumber Get data for specific account by accountNumber (numeric)
modifiedSince Return anything modified since timestamp (epoch timestamp)
s Search parameter
field Search a specific data field (name, customer_number, office_email, billing_country)
exact Only return exact matches in your search results (true or blank)
compact Reduces returned results’ object nested depth (true or blank)

Contexts:

SalesBinder Accounts have 3 different “context” values to determine what type of account list you want to retrieve:

Customers Context ID: 2 Prospects Context ID: 8 Suppliers Context ID: 10

Note:
– although the method used is named “/customers.[format]”, this works for all 3 context types
– all three contexts share the same fields and data types outlined below
– including a context in your parameters is required (see examples below)

Permissions Required:

  • View Customers and/or Prospects and/or Suppliers

Syntax

https://[subdomain].salesbinder.com/api/2.0/customers.json?page=[number]&contextId=[contextId]

HTTP Request Type: GET

Sample Returned JSON Data

{
    "count": "99",
    "page": "32",
    "pages": "33",
    "customers": [
        [
            {
                "name": "Widgets Emporium",
                "customer_number": 516,
                "office_email": "widgets@testing.com",
                "office_phone": "604-968-9588",
                "office_fax": "",
                "url": "www.widgets.com",
                "billing_address_1": "4567 Testing Avenue",
                "billing_address_2": "",
                "billing_city": "Montreal",
                "billing_region": "British Columbia",
                "billing_postal_code": "M5H 2G5",
                "billing_country": "",
                "shipping_address_1": "4567 Testing Avenue",
                "shipping_address_2": "",
                "shipping_city": "Montreal",
                "shipping_region": "British Columbia",
                "shipping_postal_code": "M5H 2G5",
                "shipping_country": "",
                "id": "549490bc-e910-41a4-b83f-03d8a2d10228",
                "created": "2014-12-19T20:55:24+00:00",
                "modified": "2016-11-11T00:13:12+00:00"
            },
            {
                "name": "Interior Decorators LLC",
                "customer_number": 507,
                "office_email": "design@interior-decor.com",
                "office_phone": "604-874-8887",
                "office_fax": "",
                "url": "www.interior-decor.com",
                "billing_address_1": "",
                "billing_address_2": "",
                "billing_city": "Las Vegas",
                "billing_region": "",
                "billing_postal_code": "",
                "billing_country": "",
                "shipping_address_1": "",
                "shipping_address_2": "",
                "shipping_city": "",
                "shipping_region": "",
                "shipping_postal_code": "",
                "shipping_country": "",
                "id": "549490bc-ed88-4dd0-be6f-03d8a2d10228",
                "created": "2014-12-19T20:55:24+00:00",
                "modified": "2016-11-11T00:13:59+00:00"
            },
            {
                "name": "ABCD Widgets Corp.",
                "customer_number": 501,
                "office_email": "janesmith@widgetscorp.com",
                "office_phone": "555-324-9987",
                "office_fax": "",
                "url": "",
                "billing_address_1": "#210 - 1080 Mainland Street",
                "billing_address_2": "",
                "billing_city": "Vancouver",
                "billing_region": "British Columbia",
                "billing_postal_code": "V6B 2T4",
                "billing_country": "Canada",
                "shipping_address_1": "#210 - 1080 Mainland Street",
                "shipping_address_2": "",
                "shipping_city": "Vancouver",
                "shipping_region": "British Columbia",
                "shipping_postal_code": "V6B 2T4",
                "shipping_country": "Canada",
                "id": "549490bc-eda0-4bf6-be59-03d8a2d10228",
                "created": "2014-12-19T20:55:24+00:00",
                "modified": "2016-11-11T00:14:53+00:00"
            }
        ]
    ]
}

Sample Returned XML Data

<?xml version="1.0" encoding="UTF-8" ?>
<response>
    <customer>
        <name>Widgets Emporium</name>
        <customer_number>516</customer_number>
        <office_email>widgets@testing.com</office_email>
        <office_phone>604-968-9588</office_phone>
        <office_fax/>
        <url>www.widgets.com</url>
        <billing_address_1>4567 Testing Avenue</billing_address_1>
        <billing_address_2/>
        <billing_city>Montreal</billing_city>
        <billing_region>British Columbia</billing_region>
        <billing_postal_code>M5H 2G5</billing_postal_code>
        <billing_country/>
        <shipping_address_1>4567 Testing Avenue</shipping_address_1>
        <shipping_address_2/>
        <shipping_city>Montreal</shipping_city>
        <shipping_region>British Columbia</shipping_region>
        <shipping_postal_code>M5H 2G5</shipping_postal_code>
        <shipping_country/>
        <id>549490bc-e910-41a4-b83f-03d8a2d10228</id>
        <created>12/19/14, 8:55 PM</created>
        <modified>11/11/16, 12:13 AM</modified>
    </customer>
    <customer>
        <name>Interior Decorators LLC</name>
        <customer_number>507</customer_number>
        <office_email>design@interior-decor.com</office_email>
        <office_phone>604-874-8887</office_phone>
        <office_fax/>
        <url>www.interior-decor.com</url>
        <billing_address_1/>
        <billing_address_2/>
        <billing_city>Las Vegas</billing_city>
        <billing_region/>
        <billing_postal_code/>
        <billing_country/>
        <shipping_address_1/>
        <shipping_address_2/>
        <shipping_city/>
        <shipping_region/>
        <shipping_postal_code/>
        <shipping_country/>
        <id>549490bc-ed88-4dd0-be6f-03d8a2d10228</id>
        <created>12/19/14, 8:55 PM</created>
        <modified>11/11/16, 12:13 AM</modified>
    </customer>
    <customer>
        <name>ABCD Widgets Corp.</name>
        <customer_number>501</customer_number>
        <office_email>janesmith@widgetscorp.com</office_email>
        <office_phone>555-324-9987</office_phone>
        <office_fax/>
        <url/>
        <billing_address_1>#210 - 1080 Mainland Street</billing_address_1>
        <billing_address_2/>
        <billing_city>Vancouver</billing_city>
        <billing_region>British Columbia</billing_region>
        <billing_postal_code>V6B 2T4</billing_postal_code>
        <billing_country>Canada</billing_country>
        <shipping_address_1>#210 - 1080 Mainland Street</shipping_address_1>
        <shipping_address_2/>
        <shipping_city>Vancouver</shipping_city>
        <shipping_region>British Columbia</shipping_region>
        <shipping_postal_code>V6B 2T4</shipping_postal_code>
        <shipping_country>Canada</shipping_country>
        <id>549490bc-eda0-4bf6-be59-03d8a2d10228</id>
        <created>12/19/14, 8:55 PM</created>
        <modified>11/11/16, 12:14 AM</modified>
    </customer>
</response>

Was this article helpful to you? Yes No