Get Survey

Resource type: appointmentdocument

Class: SmartMlInterfaceActionGetAppointmentDocument
Action Type: Get

Retrieves app surveys from an appointment (Bearbeiten->App-Fragebögen). With no resourceid given, all surveys will be returned with title only. With a resourceid given, the requested survey is retrieved with more information. See examples for usage. The call has no request parameters.

Example with no resourceid:

...
{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
    "resourceid": "",
    "identifier": "",
    "resourcetype": "appointmentdocument",
    "parameters": []
}
...

Response with no resourceid:

Parameters:

  • title
    STRING. title of the survey
{
    "status": {
        "code": 200,
        "errorcode": 0,
        "message": "OK"
    },
    "response": {
        "results": [
            {
                "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
                "resourceid": "",
                "resourcetype": "appointmentdocument",
                "cacheable": true,
                "identifier": "",
                "data": {
                    "meta": {
                        "cntabsolute": null
                    },
                    "records": [
                        {
                            "id": 1,
                            "type": "",
                            "elements": {
                                "title": "Test Fragebogen"
                            }
                        },
                        {
                            "id": 3,
                            "type": "",
                            "elements": {
                                "title": "Test Fragebogen2"
                            }
                        }
                    ]
                },
                "status": {
                    "errorcode": 0,
                    "message": "OK"
                }
            }
        ]
    }
}

Example with resourceid:

...
{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
    "resourceid": "3",
    "identifier": "",
    "resourcetype": "appointmentdocument",
    "parameters": []
}
...

Response with resourceid:

Parameters:

  • "title of survey"
    ARRAY. Content of the survey
  • transfered
    BOOLEAN. If survey was sent via email
  • pdftype
    STRING. Type of pdf
  • needsaddress
    BOOLEAN. Adress context needed?
  • needsproperty
    BOOLEAN. Estate context needed?
  • needsappointment
    BOOLEAN. Appointment context needed?
{
    "status": {
        "code": 200,
        "errorcode": 0,
        "message": "OK"
    },
    "response": {
        "results": [
            {
                "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
                "resourceid": "3",
                "resourcetype": "appointmentdocument",
                "cacheable": true,
                "identifier": "",
                "data": {
                    "meta": {
                        "cntabsolute": null
                    },
                    "records": [
                        {
                            "id": 0,
                            "type": "",
                            "elements": {
                                "Test Fragebogen2": [
                                    [
                                        [
                                            {
                                                "pagetopic": "neue Seite"
                                            }
                                        ],
                                        [
                                            {
                                                "topic": "Bewertung Immobilie"
                                            }
                                        ],
                                        [
                                            {
                                                "type": "textsingleline"
                                            },
                                            {
                                                "question": "Wie hat Ihnen die Immobilie gefallen?"
                                            }
                                        ]
                                    ]
                                ],
                                "transfered": false,
                                "pdftype": "Fragen",
                                "needsaddress": true,
                                "needsproperty": true,
                                "needsappointment": true
                            }
                        }
                    ]
                },
                "status": {
                    "errorcode": 0,
                    "message": "OK"
                }
            }
        ]
    }
}