Create or sync an existing contact

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Contact types

We currently support the following contact types.

Customers - Customers are people that have signed up or have placed an order on your website.
Leads - Leads are people that contacted you through live-chat, email, phone, or social media. We automatically create leads and convert them to customers once they sign up or place an order.
Visitors - Visitors are people that haven't interacted with the widget yet.

Create or update customers

Syncing customers requires at least an id or email address. When both id and email address are set, the customer will be matched on id and the email address will be updated with the new value.

var request = require("request");

var data = {
  id: '1337',
  email: '[email protected]',
  firstName: 'Elliot',
  lastName: 'Alderson
};

var options = {
  method: 'POST',
  auth: {
    bearer: 'Personal access token'
  },
  url: 'https://api.belco.io/v1/shops/abcdf/contacts',
  json: true,
  body: data
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Adding company data

var request = require("request");

var data = {
  id: '1337',
  email: '[email protected]',
  firstName: 'Elliot',
  lastName: 'Alderson,
  company: {
    id: '1',
    name: 'Mr Robot'
  }
};

var options = {
  method: 'POST',
  auth: {
    bearer: 'Personal access token'
  },
  url: 'https://api.belco.io/v1/shops/abcdf/contacts',
  json: true,
  body: data
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
Path Params
string
required

Shop ID

Body Params

Contact

string
string
string
string
string
string

Phone numbers are automatically parsed into e164 format (+31612345678). If the country code is ommitted and no country is available we fall back to NL (+31).

phoneNumbers
array of strings

Add multiple phoneNumbers, requires the phoneNumber field to be empty.

phoneNumbers
string
avatar
object
string
enum
Allowed:
date-time
number
number
date-time
cart
object

To empty the shopping cart you can set a NULL value.

tags
array of strings
tags
company
object
customData
object
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json