SREC RECOMMENDER API

Recomendations

recommendationsGet

0->Activities of programme | 1->Stands | 2->Persons to contact | 3->Events |


/recommendations

Usage and SDK Samples


curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://api.s-recsolutions.com/v1/recommendations?apiKey=&idRequest=&idComm=&idUser=&customId=&userPwd=&lang=&numRecommendations=&lastRecommendations=&listSector=&listInterest="



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .RecomendationsApi;

import java.io.File;
import java.util.*;

public class RecomendationsApiExample {

    public static void main(String[] args) {
        
        RecomendationsApi apiInstance = new RecomendationsApi();
        String apiKey = apiKey_example; // String | api key
        Long idRequest = 789; // Long | type of required recommendations. 0=activities, 1=exhibitors
        String userPwd = userPwd_example; // String | password to authenticate to client application developer
        Long idComm = 789; // Long | identitifier of request number. Use just in case multiple requests were launched at the same time from the same device
        Long idUser = 789; // Long | user identitifier
        String customId = customId_example; // String | user identifier if custom_id was previously provided in the /users/register request. It can be used instead of id_user
        String lang = lang_example; // String | language to process recommendations. Spanish by default. Accepted languages by now are en (English), es (Spanish), pt (Portuguese), gl (Galician)
        Integer numRecommendations = 56; // Integer | size of recmomendations list Max. 40 (max value by default)
        Integer lastRecommendations = 56; // Integer | size of accumulated recommendations until this request (0 by default)
        String listSector = listSector_example; // String | sectors of interest for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user
        String listInterest = listInterest_example; // String | other concepts of interests for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user
        try {
            Recommendations result = apiInstance.recommendationsGet(apiKey, idRequest, userPwd, idComm, idUser, customId, lang, numRecommendations, lastRecommendations, listSector, listInterest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecomendationsApi#recommendationsGet");
            e.printStackTrace();
        }
    }
}

                                                  

import .RecomendationsApi;

public class RecomendationsApiExample {

    public static void main(String[] args) {
        RecomendationsApi apiInstance = new RecomendationsApi();
        String apiKey = apiKey_example; // String | api key
        Long idRequest = 789; // Long | type of required recommendations. 0=activities, 1=exhibitors
        String userPwd = userPwd_example; // String | password to authenticate to client application developer
        Long idComm = 789; // Long | identitifier of request number. Use just in case multiple requests were launched at the same time from the same device
        Long idUser = 789; // Long | user identitifier
        String customId = customId_example; // String | user identifier if custom_id was previously provided in the /users/register request. It can be used instead of id_user
        String lang = lang_example; // String | language to process recommendations. Spanish by default. Accepted languages by now are en (English), es (Spanish), pt (Portuguese), gl (Galician)
        Integer numRecommendations = 56; // Integer | size of recmomendations list Max. 40 (max value by default)
        Integer lastRecommendations = 56; // Integer | size of accumulated recommendations until this request (0 by default)
        String listSector = listSector_example; // String | sectors of interest for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user
        String listInterest = listInterest_example; // String | other concepts of interests for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user
        try {
            Recommendations result = apiInstance.recommendationsGet(apiKey, idRequest, userPwd, idComm, idUser, customId, lang, numRecommendations, lastRecommendations, listSector, listInterest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RecomendationsApi#recommendationsGet");
            e.printStackTrace();
        }
    }
}

                                                  


String *apiKey = apiKey_example; // api key
Long *idRequest = 789; // type of required recommendations. 0=activities, 1=exhibitors
String *userPwd = userPwd_example; // password to authenticate to client application developer
Long *idComm = 789; // identitifier of request number. Use just in case multiple requests were launched at the same time from the same device (optional)
Long *idUser = 789; // user identitifier (optional)
String *customId = customId_example; // user identifier if custom_id was previously provided in the /users/register request. It can be used instead of id_user (optional)
String *lang = lang_example; // language to process recommendations. Spanish by default. Accepted languages by now are en (English), es (Spanish), pt (Portuguese), gl (Galician) (optional)
Integer *numRecommendations = 56; // size of recmomendations list Max. 40 (max value by default) (optional)
Integer *lastRecommendations = 56; // size of accumulated recommendations until this request (0 by default) (optional)
String *listSector = listSector_example; // sectors of interest for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user (optional)
String *listInterest = listInterest_example; // other concepts of interests for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user (optional)

RecomendationsApi *apiInstance = [[RecomendationsApi alloc] init];

// recommendations
[apiInstance recommendationsGetWith:apiKey
    idRequest:idRequest
    userPwd:userPwd
    idComm:idComm
    idUser:idUser
    customId:customId
    lang:lang
    numRecommendations:numRecommendations
    lastRecommendations:lastRecommendations
    listSector:listSector
    listInterest:listInterest
              completionHandler: ^(Recommendations output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .RecomendationsApi()

var apiKey = apiKey_example; // {String} api key

var idRequest = 789; // {Long} type of required recommendations. 0=activities, 1=exhibitors

var userPwd = userPwd_example; // {String} password to authenticate to client application developer

var opts = { 
  'idComm': 789, // {Long} identitifier of request number. Use just in case multiple requests were launched at the same time from the same device
  'idUser': 789, // {Long} user identitifier
  'customId': customId_example, // {String} user identifier if custom_id was previously provided in the /users/register request. It can be used instead of id_user
  'lang': lang_example, // {String} language to process recommendations. Spanish by default. Accepted languages by now are en (English), es (Spanish), pt (Portuguese), gl (Galician)
  'numRecommendations': 56, // {Integer} size of recmomendations list Max. 40 (max value by default)
  'lastRecommendations': 56, // {Integer} size of accumulated recommendations until this request (0 by default)
  'listSector': listSector_example, // {String} sectors of interest for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user
  'listInterest': listInterest_example // {String} other concepts of interests for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.recommendationsGet(apiKey, idRequest, userPwd, opts, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class recommendationsGetExample
    {
        public void main()
        {
            
            var apiInstance = new RecomendationsApi();
            var apiKey = apiKey_example;  // String | api key
            var idRequest = 789;  // Long | type of required recommendations. 0=activities, 1=exhibitors
            var userPwd = userPwd_example;  // String | password to authenticate to client application developer
            var idComm = 789;  // Long | identitifier of request number. Use just in case multiple requests were launched at the same time from the same device (optional) 
            var idUser = 789;  // Long | user identitifier (optional) 
            var customId = customId_example;  // String | user identifier if custom_id was previously provided in the /users/register request. It can be used instead of id_user (optional) 
            var lang = lang_example;  // String | language to process recommendations. Spanish by default. Accepted languages by now are en (English), es (Spanish), pt (Portuguese), gl (Galician) (optional) 
            var numRecommendations = 56;  // Integer | size of recmomendations list Max. 40 (max value by default) (optional) 
            var lastRecommendations = 56;  // Integer | size of accumulated recommendations until this request (0 by default) (optional) 
            var listSector = listSector_example;  // String | sectors of interest for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user (optional) 
            var listInterest = listInterest_example;  // String | other concepts of interests for the user. Separated by commas, without spaces among keywords. Use if there was not provided when registering user (optional) 

            try
            {
                // recommendations
                Recommendations result = apiInstance.recommendationsGet(apiKey, idRequest, userPwd, idComm, idUser, customId, lang, numRecommendations, lastRecommendations, listSector, listInterest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RecomendationsApi.recommendationsGet: " + e.Message );
            }
        }
    }
}

                                                    

recommendationsGet($apiKey, $idRequest, $userPwd, $idComm, $idUser, $customId, $lang, $numRecommendations, $lastRecommendations, $listSector, $listInterest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RecomendationsApi->recommendationsGet: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Query parameters
Name Description
apiKey*
idRequest*
idComm
idUser
customId
userPwd*
lang
numRecommendations
lastRecommendations
listSector
listInterest

Responses

Status: 200 - An array of recommendations

Status: 401 - Invalid user_pwd or api_key

Status: 417 - Please retry your request

Status: 0 - Unexpected error


User

usersRegisterPut

The User endpoint registers the users which are asking for recommendations.


/users/register

Usage and SDK Samples


curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://api.s-recsolutions.com/v1/users/register?apiKey=&idComm=&userPwd=&idDevice=&name=&surname=&email=&picture=&promoCode=&lang=&listSector=&listInterest="



import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import .UserApi;

import java.io.File;
import java.util.*;

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        String apiKey = apiKey_example; // String | api key
        String userPwd = userPwd_example; // String | password to authenticate to client application developer
        Long idComm = 789; // Long | identitifier of request number. Use just in case multiple requests were launched at the same time from the same device
        String idDevice = idDevice_example; // String | identifier of the device which asks recommendations. Use it for anonymous applications
        String name = name_example; // String | user name. Leave it blank for anonymous applications
        String surname = surname_example; // String | user surname. Leave it blank for anonymous applications
        String email = email_example; // String | user email. Leave it blank for anonymous applications
        String picture = picture_example; // String | user image URL. Leave it blank for anonymous applications
        String promoCode = promoCode_example; // String | Promotional code if available to register user
        String lang = lang_example; // String | user language. Recommendations will be processed only from this language. See recommendations API for more information
        String listSector = listSector_example; // String | sectors of interest for the user. Separated by commas, without spaces among keywords
        String listInterest = listInterest_example; // String | other concepts of interests for the user. Separated by commas, without spaces among keywords
        try {
            Error result = apiInstance.usersRegisterPut(apiKey, userPwd, idComm, idDevice, name, surname, email, picture, promoCode, lang, listSector, listInterest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#usersRegisterPut");
            e.printStackTrace();
        }
    }
}

                                                  

import .UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        String apiKey = apiKey_example; // String | api key
        String userPwd = userPwd_example; // String | password to authenticate to client application developer
        Long idComm = 789; // Long | identitifier of request number. Use just in case multiple requests were launched at the same time from the same device
        String idDevice = idDevice_example; // String | identifier of the device which asks recommendations. Use it for anonymous applications
        String name = name_example; // String | user name. Leave it blank for anonymous applications
        String surname = surname_example; // String | user surname. Leave it blank for anonymous applications
        String email = email_example; // String | user email. Leave it blank for anonymous applications
        String picture = picture_example; // String | user image URL. Leave it blank for anonymous applications
        String promoCode = promoCode_example; // String | Promotional code if available to register user
        String lang = lang_example; // String | user language. Recommendations will be processed only from this language. See recommendations API for more information
        String listSector = listSector_example; // String | sectors of interest for the user. Separated by commas, without spaces among keywords
        String listInterest = listInterest_example; // String | other concepts of interests for the user. Separated by commas, without spaces among keywords
        try {
            Error result = apiInstance.usersRegisterPut(apiKey, userPwd, idComm, idDevice, name, surname, email, picture, promoCode, lang, listSector, listInterest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#usersRegisterPut");
            e.printStackTrace();
        }
    }
}

                                                  


String *apiKey = apiKey_example; // api key
String *userPwd = userPwd_example; // password to authenticate to client application developer
Long *idComm = 789; // identitifier of request number. Use just in case multiple requests were launched at the same time from the same device (optional)
String *idDevice = idDevice_example; // identifier of the device which asks recommendations. Use it for anonymous applications (optional)
String *name = name_example; // user name. Leave it blank for anonymous applications (optional)
String *surname = surname_example; // user surname. Leave it blank for anonymous applications (optional)
String *email = email_example; // user email. Leave it blank for anonymous applications (optional)
String *picture = picture_example; // user image URL. Leave it blank for anonymous applications (optional)
String *promoCode = promoCode_example; // Promotional code if available to register user (optional)
String *lang = lang_example; // user language. Recommendations will be processed only from this language. See recommendations API for more information (optional)
String *listSector = listSector_example; // sectors of interest for the user. Separated by commas, without spaces among keywords (optional)
String *listInterest = listInterest_example; // other concepts of interests for the user. Separated by commas, without spaces among keywords (optional)

UserApi *apiInstance = [[UserApi alloc] init];

// User Profile
[apiInstance usersRegisterPutWith:apiKey
    userPwd:userPwd
    idComm:idComm
    idDevice:idDevice
    name:name
    surname:surname
    email:email
    picture:picture
    promoCode:promoCode
    lang:lang
    listSector:listSector
    listInterest:listInterest
              completionHandler: ^(Error output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];

                                                    

var  = require('');

var api = new .UserApi()

var apiKey = apiKey_example; // {String} api key

var userPwd = userPwd_example; // {String} password to authenticate to client application developer

var opts = { 
  'idComm': 789, // {Long} identitifier of request number. Use just in case multiple requests were launched at the same time from the same device
  'idDevice': idDevice_example, // {String} identifier of the device which asks recommendations. Use it for anonymous applications
  'name': name_example, // {String} user name. Leave it blank for anonymous applications
  'surname': surname_example, // {String} user surname. Leave it blank for anonymous applications
  'email': email_example, // {String} user email. Leave it blank for anonymous applications
  'picture': picture_example, // {String} user image URL. Leave it blank for anonymous applications
  'promoCode': promoCode_example, // {String} Promotional code if available to register user
  'lang': lang_example, // {String} user language. Recommendations will be processed only from this language. See recommendations API for more information
  'listSector': listSector_example, // {String} sectors of interest for the user. Separated by commas, without spaces among keywords
  'listInterest': listInterest_example // {String} other concepts of interests for the user. Separated by commas, without spaces among keywords
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.usersRegisterPut(apiKey, userPwd, opts, callback);

                                                    

using System;
using System.Diagnostics;
using .Api;
using .Client;
using ;

namespace Example
{
    public class usersRegisterPutExample
    {
        public void main()
        {
            
            var apiInstance = new UserApi();
            var apiKey = apiKey_example;  // String | api key
            var userPwd = userPwd_example;  // String | password to authenticate to client application developer
            var idComm = 789;  // Long | identitifier of request number. Use just in case multiple requests were launched at the same time from the same device (optional) 
            var idDevice = idDevice_example;  // String | identifier of the device which asks recommendations. Use it for anonymous applications (optional) 
            var name = name_example;  // String | user name. Leave it blank for anonymous applications (optional) 
            var surname = surname_example;  // String | user surname. Leave it blank for anonymous applications (optional) 
            var email = email_example;  // String | user email. Leave it blank for anonymous applications (optional) 
            var picture = picture_example;  // String | user image URL. Leave it blank for anonymous applications (optional) 
            var promoCode = promoCode_example;  // String | Promotional code if available to register user (optional) 
            var lang = lang_example;  // String | user language. Recommendations will be processed only from this language. See recommendations API for more information (optional) 
            var listSector = listSector_example;  // String | sectors of interest for the user. Separated by commas, without spaces among keywords (optional) 
            var listInterest = listInterest_example;  // String | other concepts of interests for the user. Separated by commas, without spaces among keywords (optional) 

            try
            {
                // User Profile
                Error result = apiInstance.usersRegisterPut(apiKey, userPwd, idComm, idDevice, name, surname, email, picture, promoCode, lang, listSector, listInterest);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.usersRegisterPut: " + e.Message );
            }
        }
    }
}

                                                    

usersRegisterPut($apiKey, $userPwd, $idComm, $idDevice, $name, $surname, $email, $picture, $promoCode, $lang, $listSector, $listInterest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserApi->usersRegisterPut: ', $e->getMessage(), PHP_EOL;
}

                                                  

Parameters

Query parameters
Name Description
apiKey*
idComm
userPwd*
idDevice
name
surname
email
picture
promoCode
lang
listSector
listInterest

Responses

Status: 417 - Please retry your request

Status: 0 - Unexpected error