ipOne API Documentation


survey/get_assignment

Important:  An API Key is required to work with these API Calls

Returns the details of a chosen assignment, includes customer installation information and full survey

Sample Request

http://api.verifiapp.com/survey/get_assignment/{API-KEY}/{ASSIGNMENT-ID}

Sample Response

{ result: "success" -results: [ -{ assignment_id: "131" survey_id: "15" time_slot_start: "21:00:00" time_slot_end: "22:00:00" additional_comments: "" -installation: { id: "1743" firstname: "Margarett" lastname: "Grace" address_1: "" address_2: "" city: "Nenagh" country: "" postcode: "" gps_coordinates: "" account: "73017741" appt_engineer: "Thelinor Limerick - Limerick Mmds" additional_comments: "" } -survey: { id: "15" survey_title: "Field Survey 1" -groups: [ -{ id: "26" group_title: "Group 1" -questions: [ -{ id: "94" alert_type: "0" question: "Pole Type" answer_type: "option" answer_options: "Inter,Pin Angle" requires_photo: "1" requires_comments: "0" } -{ id: "100" alert_type: "0" question: "Pole Height?" answer_type: "text" answer_options: "" requires_photo: "1" requires_comments: "1" } ] } ] } } ] }

(View a sample screenshot)

September 2013 updates:

A new type of installation is available, called "wayleave". It's got three new fields: "project_code, wayleave_no, nature_of_problem". "nature_of_problem" will not always have a value, it may contain NULL. For the other types of installation those fields are always empty.

When using the get_wayleave_answers API call, send the installation.id field.

Recent updates:

Now we've added the concept of "Disconnected Customers". The output is similar, but in the "installation" field, there is a new field called "type" with the values (scheduled/disconnected) to identify the type of record.

In the time slots you have to ignore the time, just use the date.

Another new field inside "installation" will be available called "status". This must be shown on the mobile app if the customer is disconnected. If the customer is normal, don't show it because it will be empty always.

Successful response reference

A successful response will return the following items in a JSON array

Preference Description
result success
results An array containing the following information:
  assignment_id The unique survey ID
  time_slot_start The time slot when the survey should take place
  time_slot_end  
  survey_id The ID of the survey
  additional_comments A space for additional comments for an assignment
  installation An array containing customer installation location information
     id The Installation ID
     firstname The first name of the customer/installation
     lastname The surname of the customer/installation
     address_1 Customer installation address
     address_2  
     city  
     country  
     postcode  
     gps_coordinates  
     account The account number of the customer/installation
     appt_engineer The engineer at customer/installation
     additional_comments Additional comments relating to a customer installation
  survey An array containing the full survey information. See get_survey for full survey structure.

Unsuccessful Response Reference

A unsuccessful response will return the following items in a JSON array

Preference Description Sample response
result error  
error The specific failure is described in the response Missing API Key