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
{
  "customer":{
    "context_id":"2",
    "name":"API Created Customer",
    "office_email":"sales@acme-company.com",
    "office_phone":"(604) 555-5555",
    "office_fax":"",
    "url":"acme-company.com",
    "billing_address_1":"Suite 100 - 1234 West 4th Avenue",
    "billing_city":"Vancouver",
    "billing_region":"BC",
    "billing_country":"Canada",
    "billing_postal_code":"V6P 6W5",
    "shipping_address_1":"Suite 100 - 1234 West 4th Avenue",
    "shipping_city":"Vancouver",
    "shipping_region":"BC",
    "shipping_country":"Canada",
    "shipping_postal_code":"V6P 6W5"
  }
}
Example XML Data to Submit
<?xml version="1.0" encoding="UTF-8" ?>
<customer>
  <context_id>2</context_id>
  <name>API Created Customer</name>
  <office_email>sales@acme-company.com</office_email>
  <office_phone>(604) 555-5555</office_phone>
  <office_fax></office_fax>
  <url>acme-company.com</url>
  <billing_address_1>Suite 100 - 1234 West 4th Avenue</billing_address_1>
  <billing_city>Vancouver</billing_city>
  <billing_region>BC</billing_region>
  <billing_country>Canada</billing_country>
  <billing_postal_code>V6P 6W5</billing_postal_code>
  <shipping_address_1>Suite 100 - 1234 West 4th Avenue</shipping_address_1>
  <shipping_city>Vancouver</shipping_city>
  <shipping_region>BC</shipping_region>
  <shipping_country>Canada</shipping_country>
  <shipping_postal_code>V6P 6W5</shipping_postal_code>
</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
{
    "message": "Saved",
    "customer": {
        "context_id": 2,
        "name": "API Created Customer",
        "office_email": "sales@acme-company.com",
        "office_phone": "(604) 555-5555",
        "office_fax": "",
        "url": "acme-company.com",
        "billing_address_1": "Suite 100 - 1234 West 4th Avenue",
        "billing_city": "Vancouver",
        "billing_region": "BC",
        "billing_country": "Canada",
        "billing_postal_code": "V6P 6W5",
        "shipping_address_1": "Suite 100 - 1234 West 4th Avenue",
        "shipping_city": "Vancouver",
        "shipping_region": "BC",
        "shipping_country": "Canada",
        "shipping_postal_code": "V6P 6W5",
        "customer_number": 641,
        "created": "2016-11-11T01:13:09+00:00",
        "modified": "2016-11-11T01:13:09+00:00",
        "id": "19d367c8-97c7-409f-bf67-2ad543493648"
    }
}

Updated on February 7th, 2022

Network Status:
100% Global Availability