Skip to content

Latest commit

 

History

History
106 lines (94 loc) · 4.58 KB

Rest.md

File metadata and controls

106 lines (94 loc) · 4.58 KB

Survey REST API

The Survey REST API lets you retrieve Survey data. This section describes how to integrate towards the Survey REST API.

How to connect

The API uses Auth0 for authentication and you will need to set up an account

Definitions

DescriptionValueComment
MethodGET
URLhttps://{survey-host}/survey/rs/service/serviceId?from={} Please contact Puzzel Support for the correct {survey-host}.
serviceIdThe id of your service
fromTimestamp (format: YYYY-MM-DDTHH:MM:SS.SSSZ)
toTimestamp (format: YYYY-MM-DDTHH:MM:SS.SSSZ) Optional - will default to 'now' if not specified.

Request Example

https://{survey-host}/survey/v1/survey/rs/service/{serviceId}?from=2016-05-08T00:00:00.000%2B0200

Property list

Property NameData TypeDescription
idIntegerUnique integer identifier for Survey
surveyidIntegerManual Survey id
msisdnStringEnd user's mobile number
agentidStringAgent's name
queueStringIdentifier for queue
teamStringIdentifier for team
ratingStringEnd user's score
responseStringEnd user's reply
follow_up_responseStringEnd user's follow up response
smsSentDateStringTimestamp of the first SMS sent to the enduser
updatedStringLast modified
nameStringEnd user's name
addressStringEnd user's address
streetStringEnd user's street name
housenumberStringEnd user's housenumber
entryStringEnd user's entry
postnumberStringEnd user's post number
postAreaStringEnd user's post area
extraParamName1String1. extra parameter name
extraParamName2String2. extra parameter name
extraParamName3String3. extra parameter name
extraParamName4String4. extra parameter name
extraParamName5String5. extra parameter name
extraParamValue1String1. extra value
extraParamValue2String2. extra value
extraParamValue3String3. extra value
extraParamValue4String4. extra value
extraParamValue5String5. extra value
commentStringYour comment

JSON Response Example

Note that response objects depend on survey type.

  • Survey type "CallCenter", will only return data in the callcenterSurveyList object.
  • Survey type "NumberList", will only return data in the manualSurveyList object.
  • Survey type "CallCenterAndNumberList", will return data in both callcenterSurveyList and manualSurveyList objects.
	{
		"timestamp": "2016-11-22T09:46:46.040+0100",
		"callcenterSurveyList": [
    		{
				"id": 4483,
		      	"surveyid": 0,
		      	"msisdn": "+4712345678",
		      	"agentid": "agent1",
		      	"queue": "queue1",
                "team": "team1",
		      	"rating": "8",
		      	"response": "5 abc",
                "follow_up_response": null,
		      	"smsSentDate": "2016-10-21T15:23:43.423+0200",
                "updated": "2016-10-21T15:27:04.387+0200",
		      	"name": "Minh Do Le",
		      	"address": "Brynsveien 13 ; 0667 Oslo",
				"street": "Brynsveien",
		      	"housenumber": "13",
				"entry": null,
		      	"postnumber": "0667",
		      	"postArea": "Oslo",
		      	"extraParamName1": "waitingTime",
		      	"extraParamName2": "callDuration",
		      	"extraParamName3": null,
		      	"extraParamName4": null,
		      	"extraParamName5": null,
		      	"extraParamValue1": "01:12:50",
		      	"extraParamValue2": "01:12:50",
		      	"extraParamValue3": null,
		      	"extraParamValue4": null,
		      	"extraParamValue5": null,
		      	"comment": null
			}
	  	],
		"manualSurveyList": []
	}