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 contacts preferences

GET/contacts/{id}/preferences

Gets opt-in preferences connected to a specific contact within your store.

Parameters id The unique id for the contact

Example response

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

{
  "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
  }
}

Update a contacts preferences

PUT/contacts/{id}

Updates the opt-in preferences of a specific contact.

Parameters id The unique id for the contact
Request body Contact Preferences

Example request

Content-Type: application/json; charset=utf-8

{
  "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
  }
}

Example response

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

{
  updated: 1
}