API Documentation

    AccountsAdd Account

    Method: /customers.[format]
    Contexts:

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

    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 is required for successfully saving a new account (see examples below)

    Fields:
    NameData TypeDescription
    nameStringBusiness Name
    office_emailStringOffice Email Address
    office_numberStringOffice Phone Number
    office_faxStringOffice Fax
    urlStringCompany Website Address
    billing_address_1StringBilling Address Line 1
    billing_address_2StringBilling Address Line 2
    billing_cityStringBilling City
    billing_regionStringBilling Region (Province or State)
    billing_countryStringBilling Country
    billing_postal_codeStringBilling Postal Code or Zip Code
    shipping_address_1StringShipping Address Line 1
    shipping_address_2StringShipping Address Line 2
    shipping_cityStringShipping City
    shipping_region StringShipping Region (Province or State)
    shipping_countryStringShipping Country
    shipping_postal_codeStringShipping Postal Code or Zip Code
    Permissions Required:
    • View Customers and/or Prospects and/or Suppliers
    • Modify Customers and/or Prospects and/or Suppliers
    Syntax:
    https://[subdomain].salesbinder.com/api/2.0/customers.json
    HTTP Request Type: POST
    Example JSON Data to Submit
    1{
    2  "customer":{
    3    "context_id":"2",
    4    "name":"API Created Customer",
    5    "office_email":"sales@acme-company.com",
    6    "office_phone":"(604) 555-5555",
    7    "office_fax":"",
    8    "url":"acme-company.com",
    9    "billing_address_1":"Suite 100 - 1234 West 4th Avenue",
    10    "billing_city":"Vancouver",
    11    "billing_region":"BC",
    12    "billing_country":"Canada",
    13    "billing_postal_code":"V6P 6W5",
    14    "shipping_address_1":"Suite 100 - 1234 West 4th Avenue",
    15    "shipping_city":"Vancouver",
    16    "shipping_region":"BC",
    17    "shipping_country":"Canada",
    18    "shipping_postal_code":"V6P 6W5"
    19  }
    20}
    Example XML Data to Submit
    1<?xml version="1.0" encoding="UTF-8" ?>
    2<customer>
    3  <context_id>2</context_id>
    4  <name>API Created Customer</name>
    5  <office_email>sales@acme-company.com</office_email>
    6  <office_phone>(604) 555-5555</office_phone>
    7  <office_fax></office_fax>
    8  <url>acme-company.com</url>
    9  <billing_address_1>Suite 100 - 1234 West 4th Avenue</billing_address_1>
    10  <billing_city>Vancouver</billing_city>
    11  <billing_region>BC</billing_region>
    12  <billing_country>Canada</billing_country>
    13  <billing_postal_code>V6P 6W5</billing_postal_code>
    14  <shipping_address_1>Suite 100 - 1234 West 4th Avenue</shipping_address_1>
    15  <shipping_city>Vancouver</shipping_city>
    16  <shipping_region>BC</shipping_region>
    17  <shipping_country>Canada</shipping_country>
    18  <shipping_postal_code>V6P 6W5</shipping_postal_code>
    19</customer>
    Success:

    If you have been successful in saving a new account, the response will return the newly created data object along with a “message” value of “Saved” as seen below.

    Example JSON Returned Response
    1{
    2    "message": "Saved",
    3    "customer": {
    4        "context_id": 2,
    5        "name": "API Created Customer",
    6        "office_email": "sales@acme-company.com",
    7        "office_phone": "(604) 555-5555",
    8        "office_fax": "",
    9        "url": "acme-company.com",
    10        "billing_address_1": "Suite 100 - 1234 West 4th Avenue",
    11        "billing_city": "Vancouver",
    12        "billing_region": "BC",
    13        "billing_country": "Canada",
    14        "billing_postal_code": "V6P 6W5",
    15        "shipping_address_1": "Suite 100 - 1234 West 4th Avenue",
    16        "shipping_city": "Vancouver",
    17        "shipping_region": "BC",
    18        "shipping_country": "Canada",
    19        "shipping_postal_code": "V6P 6W5",
    20        "customer_number": 641,
    21        "created": "2016-11-11T01:13:09+00:00",
    22        "modified": "2016-11-11T01:13:09+00:00",
    23        "id": "19d367c8-97c7-409f-bf67-2ad543493648"
    24    }
    25}

    Updated on February 7th, 2022

    Network Status:
    100% Global Availability