survey/save_event
Important: An API Key is required to work with these API Calls
Adds or edits a Q-Diary item. The {EVENT_ID} parameter is optional. If you send the ID, it means that you are editing the item. If not, you add a new item.
The data is received directly via POST.
Sample Request
http://api.verifiapp.com/survey/save_event/{API-KEY}/{EVENT_ID}
Sample Response
{
result: "success"
-results: "Event added"
}
Expected input POST data
A successful response will return the following items in a JSON array
| Key | Example value | Description | Mandatory |
|---|---|---|---|
| activity_type_id | 1 | The Job Type ID. | yes |
| project_name_id | 1 | The Project Name ID. | yes |
| client_id | 1 | The Client ID. | yes |
| location_id | 1 | The Location ID. | yes |
| q_diary_start | 2012-02-23 15:20:00 | The Datetime of the start of the event. It must be a valid MySQL DATETIME. | yes |
| q_diary_end | 2012-02-23 16:00:00 | The Datetime of the end of the event. It must be a valid MySQL DATETIME. | yes |
| q_diary_notes | This is a meeting I've done with a customer located in Kilkenny | Free text containing an explanation of the event. | yes |
| q_diary_expenses | 50 | Amount in Euros of the expenses involved in the Event. | no |
| q_diary_gps | 53.34410399999999, -6.267493699999932 | Manual GPS coordinates of the location of the Event. | no |
Successful Response Reference
A successful response will return the following items in a JSON array
| Preference | Description | Default value | Notes |
|---|---|---|---|
| result | success | ||
| results | String with the success message |
Unsuccessful Response Reference
A unsuccessful response will return the following items in a JSON array
| Preference | Description | Sample response |
|---|---|---|
| result | error | |
| error | The specific error is described in the response | Invalid API Key |