Introduction

Welcome to Adelya's API home page. Below you can find a quick introduction to our CRM Platform API. This is an XML/Json read/write over HTTP API, that enables you to access all the business objects of LoyaltyOperator and client websites.

Credentials

To handle the connection credential you need to add a basicAuth header to your https call. You will need an API key and a user password. To get these, you'll need to enroll in our technical partner program.

In short you'll have to add an HTTP header : "Authorization" which value is "Basic <here the base64 encoded string of apikey;user_login:user_password>. See here for more info and a alternative tokenized version.

Exemple 1

Read customer info based on its loyalty card number.

Http GET on apiv1/webapi.do

param : json_data


{
 "FidelityMember":{
  "cardnumber":"10001234", "actif":1
 }
}
					

The return is (show/hide)

Http POST on apiv1/webapi.do?format=xml,

param : details


<FidelityMember>
    <cardnumber>10001234</cardnumber>
</FidelityMember>
					

The return is (show/hide)

Exemple 2

Create a new customer . Http PUT on apiv1/webapi.do

param : json_data


{
        "FidelityMember":{
        "name":"Jean",
        "firstname":"Dujardin",
        "mobile":"0601020304",
        "cardnumber":"10001235",
        "address":{         
                "line1":"105 rue de la salade ponsans",         
                "zip":"31400",
                "town":"TOULOUSE",
                "country":"FR"
                }
        }
}

The return is


{
 "ApiReturn":
  {
   "code":"OK",
   "message":null,
   "id":"3325067"
  }
 }
				

The status code of the operation is OK, meaning everything went ok, and no specific message or warning. And you have the primary key for your next call.

Exemple 3

Update a customer. Http PUT on apiv1/webapi.do with the member id in the data.

If you send object data to the API, that contains the object ID, then the call will be managed as an update request. For example, if the former customer wants to update his email opt-in:


    {
            "FidelityMember":{
            "id":"3325067",
            "emailoptin":"true"
            }
    }       

The return is


    {
     "ApiReturn":
      {
       "code":"OK",
       "message":null,
       "id":"3325067"
      }
     }
                                    

The object ID returned is the same as before, and the object has been updated. Note that only the data changed is transmitted. If you want to empty a field, you will have to transmit the empty string. E.g. : "mobile":""

Other business objects of interest are:

Side note

For any further question please contact support @ adelya.com, a refence documentation is available in pdf format for registered partners.

LoyaltyOperator, LoyaltyAvenue are trademark of Adelya SAS