Skip to content

updateSurveyByJobRef

Supported, no replacement yet

This endpoint remains fully supported. No replacement exists in the new API yet, and no action is needed. When a replacement ships you will get 12 months' notice, and this site will be updated.

Reference

/rest/assetmgmt/survey/updateSurveyByJobRef/

POST
Updates a survey and its values.  

  • Looks up survey by Job Ref or Job Client Ref and Survey name.  If Job Ref not provided uses Job Client Ref.
  • If more than one survey found, exits without updating anything - returns failure error message in response.
  • Looks up attributes by name.
  • Sets status of Survey to the status passed in - NOTE this will post results if status is completed/approved.


acceptable request representations:

  • application/json

{    "jobRef":"J00ABC",    "jobClientRef":"",    "surveyName""Customer Sats",    "performedOn":"12/02/2011 12:34",    "performedBy":"34",     //user id    "status":"2",          //site survey status    "attributes":[        { "name":"How happy were you?",   
          "value":"Very"        },        { "name":"How would you rate the service?",
          "value":"Excellent"        }    ]
}


available response representations:
  • 200 - application/json
{
  "result" : "success or fail",
  "result_msg" : "error message"
}


See the Asset Management API matrix for the full list of endpoints in this category.