Consultation API

Start with variables

Starts a consultation with a list of variables already set.

POST/rest/consultation/start
 Query parameters
  • kbId: (optional) id of the KBA
  • kbName: (optional) name of the KBA
  • safeMode: (optional) parameter to use the safe-mode in the consultation (default="true")
  • password: (optional) encrypted bookmark password
  • detached: (optional) set to "true" to start a consultation in background
  • detachedTaskName: (optional) task name for constations that run in the background

kbName is used only if kbId is empty and it's mandatory to specify one of the two parameters

 Header
  • auth-token: (optional) value of the authentication token. This value is not needed when the consultation is with an anonymous user.
  • Content-Type: application/json
 Header/Parameter  tenant
 Body NextRequest with all the variables (see "Model" section)
Returns ConsultationResponse

In case of anonymous consultation Headers with:

ANONYMOUS-ROLES -> USER

ANONYMOUS-TOKEN -> Token id which will be needed for further steps in the consultation

ANONYMOUS-USERNAME -> Generic username

Required role USER
Managed errors
  • 404: kb not found
  • 401: insufficient privileges

Example request

curl 'https://mwp3-dev.knowledge-values.com/mwp/rest/consultation/start?kbId=72ac8a5d-e9b0-4eb3-9574-e6dc7fc7bff4' -H 'auth-token: 6bc7e5ba-71bf-4623-8788-a7f7ef44a74e' -H 'Content-Type: application/json' -H 'tenant:default' --data-binary '{"parameters":[{"id":{"name":"Client name","instanceBaseName":null,"instanceNumber":1},"values":["Acme"]},{"id":{"name":"Client street address","instanceBaseName":null,"instanceNumber":1},"values":["Amsterdamstraat 1"]},{"id":{"name":"Client zip code","instanceBaseName":null,"instanceNumber":1},"values":["1000aa"]},{"id":{"name":"Country","instanceBaseName":null,"instanceNumber":1},"values":["Netherlands"]}],"requestedParameters":[{"name":"Deler vermenigvuldigingsfactor franchise","instanceNumber":1,"instanceBaseName":null,"value":"[]"},{"name":"AOW uitkering","instanceNumber":1,"instanceBaseName":null,"value":"[]"}]}'

Example response

{  
   "consultationId":"789a20966b2beb7a7d197fa67170d13c",
   "variables":[  
      {  
         "id":"Order_Handling-Credit_limit-1",
         "name":"Credit limit",
         "instanceIndex":1,
         "instanceBaseName":null,
         "type":"qualitativeEnumeration",
         "question":"",
         "explanation":"",
         "domain":{  
            "alternatives":[  
               {  
                  "value":"Exceeded",
                  "explanation":null,
                  "multimediaExplanation":null
               },
               {  
                  "value":"Not exceeded",
                  "explanation":null,
                  "multimediaExplanation":null
               }
            ],
            "constraints":{  
               "numbersConstraints":null,
               "stringsConstraints":{  
                  "maxLength":0,
                  "minLength":0
               },
               "defaultValue":""
            },
            "exclusiveValue":null,
            "defaultValue":""
         },
         "display":false,
         "frameName":null,
         "maskedValue":null,
         "solvable":false,
         "metricSystem":"EU",
         "storedValues":null,
         "decimalSeparator":null,
         "thousandsSeparator":null
      }
   ],
   "requestedVariables":[
	{
          "name":"Deler vermenigvuldigingsfactor franchise",
	  "instanceNumber":1,
	  "instanceBaseName":null,
	  "value":"[66,28]"
	},
	{
	  "name":"AOW uitkering",
	  "instanceNumber":1,
	  "instanceBaseName":null,
	  "value":"[14211,00]"
	}
   ],
   "questionType":"question",
   "tableName":"Order Handling",
   "displayVariables":[  

   ],
   "downloads":null,
   "answeredQuestions":null,
   "visualizationConfiguration":[  

   ],
   "summaryChecklist":{  
      "type":"NONE",
      "content":null
   },
   "responseExtensions":null,
   "feedback":null,
   "userType":"NORMAL_USER"
}

Feedback