Divendo API 2.0

We’ve rebuilt our API from the ground up to be easier than ever to integrate our platform with your favourite software

Lookup a contact by customer number

GET/contacts/customernumber/{customernumber}

Retrieves an contact from your database matching the specified customer number.

Parameters customernumber The customer number of the contact

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "5643eff487bb38127c11e624",
  "created": "2015-04-10T17:00:00+01:00",
  "emails": [
    "[email protected]"
  ],
  "name": {
    "title": "Mr",
    "firstname": "Test",
    "surname": "Customer"
  },
  "address": {
    "addressline1": "20-22 Wenlock Road",
    "addressline2": "",
    "addressline3": "",
    "towncity": "London",
    "stateprovince": "London",
    "postalcode": "N1 7GU",
    "country": "GB"
  },
  "contactnumbers": [
    "02030869860"
  ],
  "customernumber": "10141246",
  "accountnumber": "",
  "preferences": {
    "email": {
      "optoutreason": null,
      "optoutdate": null
    },
    "post": {
      "optoutreason": null,
      "optoutdate": null
    },
    "sms": {
      "optoutreason": "optout",
      "optoutdate": "2017-06-15T00:00:00+01:00"
    },
    "phone": {
      "optoutreason": null,
      "optoutdate": null
    }
  }
}

Lookup a contact by email

GET/contacts/email?search={emailaddress}

Retrieves an contact from your database matching the specified email address.

Querystring search * The email address of the contact

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "5643eff487bb38127c11e624",
  "created": "2015-04-10T17:00:00+01:00",
  "emails": [
    "[email protected]"
  ],
  "name": {
    "title": "Mr",
    "firstname": "Test",
    "surname": "Customer"
  },
  "address": {
    "addressline1": "20-22 Wenlock Road",
    "addressline2": "",
    "addressline3": "",
    "towncity": "London",
    "stateprovince": "Norfolk",
    "postalcode": "N1 7GU",
    "country": "GB"
  },
  "contactnumbers": [
    "02030869860"
  ],
  "customernumber": "10141246",
  "accountnumber": "",
  "preferences": {
    "email": {
      "optoutreason": null,
      "optoutdate": null
    },
    "post": {
      "optoutreason": null,
      "optoutdate": null
    },
    "sms": {
      "optoutreason": "optout",
      "optoutdate": "2017-06-15T00:00:00+01:00"
    },
    "phone": {
      "optoutreason": null,
      "optoutdate": null
    }
  }
}

Lookup a contact by account number

GET/contacts/accountnumber/{accountnumber}

Retrieves an contact from your database matching the specified customer number.

Parameters accountnumber The account number of the contact

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "5643eff487bb38127c11e624",
  "created": "2015-04-10T17:00:00+01:00",
  "emails": [
    "[email protected]"
  ],
  "name": {
    "title": "Mr",
    "firstname": "Test",
    "surname": "Customer"
  },
  "address": {
    "addressline1": "20-22 Wenlock Road",
    "addressline2": "",
    "addressline3": "",
    "towncity": "London",
    "stateprovince": "London",
    "postalcode": "N1 7GU",
    "country": "GB"
  },
  "contactnumbers": [
    "02030869860"
  ],
  "customernumber": "10141246",
  "accountnumber": "",
  "preferences": {
    "email": {
      "optoutreason": null,
      "optoutdate": null
    },
    "post": {
      "optoutreason": null,
      "optoutdate": null
    },
    "sms": {
      "optoutreason": "optout",
      "optoutdate": "2017-06-15T00:00:00+01:00"
    },
    "phone": {
      "optoutreason": null,
      "optoutdate": null
    }
  }
}