1. Home
  2. Docs
  3. Dynamic Integration
  4. Endpoint 1 – Retrieving customer info based on an email address
  5. Extend endpoint 1

Extend endpoint 1

So how can I show even more information in Endpoint 1?

In the following examples, I will show you how to extend Endpoint 1

Extended response

{
  "name": "John Doe",
  "email_address": "email@address.com",
  "phone_number": "0612345678",
  "customer_since": "2017-10-28",
  "total_spent": "$154.95",
  "order_count": 12,
  "panel_view": {
   "segment": "Sleepers",
   "language": "Nederlands <img src=\"https://awebsite.com/dutchflag.png\" width=\"20\" height=\"15\" />",
   "klantid": "366531",
   "last_updated": "16-03-2016 10:26:15",
   "street": "Parkstraat",
   "house_number": "001",
   "zipcode": "6821 HX",
   "city": "Arnhem",
  }
}

 

By extending our required response with a Panel_view we’ve added the following properties to showcase our ROBIN Agent more information.

Showcase of Endpoint 1 extended
Showcase of Endpoint 1 extended

 

All the fields in Panel_view are custom fields; you can fill this with anything, as long as it is in a string. As you can see in the “Language” key, you can even add an image in the value. The basic setup of the panel view is as followed:

{
  "name": "John Doe",
  "email_address": "email@address.com",
  "phone": "0612345678",
  "customer_since": "2017-10-28",
  "total_spent": "$154.95",
  "order_count": 12,
  "panel_view": {
   "customkey": "customvalue",
  }
}

 

Schema of Endpoint 1

KeyTypeRequiredDescriptionExample
nameStringYesReturns the full name from the customer"John Doe"
email_addressStringYesReturns the email address from the customer"email@address.com"
phone_numberStringYesReturns the phone number from the customer"0612345678"
customer_sinceStringYesShows the date when the customer purchased his first order
Date format is: "YYYY-MM-DD"
"2017-10-28"
total_spentStringYesReturns the total amount the customer has spend at the store(s)"$154.95"
order_countFloatYesReturns the total amount of orders the customer has at the store(s)12
panel_viewObjectNoA JSON object to put custom fields in to show more information about the customer{ }
customkeyStringNoThis variable is placed inside panel_view. You can rename the key and the value to anything you'd like -- as long as the value is returned in a string form"Custom value"