I am trying to access completed form field data in ServiceM8 including uploaded images. The api reference does not detail how to access them. Can anyone provide an example or documentation?
相关问题
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
It's not publicly documented, but you can access completed forms via the FormResponses endpoint.
https://api.servicem8.com/api_1.0/FormResponse.json
The actual responses to the questions are in the
field_data
property, which is itself a JSON-encoded string. Here's an example:For photo questions (FieldType == Photo), the Response property contains a UUID which you can retrieve from the Attachments endpoint.
JSON data for the attachment:
https://api.servicem8.com/api_1.0/Attachment/cf91bae2-b9da-42e2-87ee-b416109bb44b.json
File data (i.e. the attachment itself):
https://api.servicem8.com/api_1.0/Attachment/cf91bae2-b9da-42e2-87ee-b416109bb44b.file