Features

API

1.0 Purpose

This document describes the Application Programming Interface (API) of the Snap Send Solve Integration service. By using this service, an authority can:

  • Retrieve a list of incident reports by given authority id, and;
  • Browse reports by pagination link (next, previous link in the JSON response).

This API service is only available to Enterprise accounts with integration function enabled. For more information on Snap Send Solve Enterprise, please contact us.

2.0 URL and API versioning

The Snap Send Solve web service URL is made up of two distinct sections and looks like the following:

https:///

where:

  • is report.snapsendsolve.com
  • is one of the services documented later in this document.

An example of the current URL for the dashboard call would resemble the following:

https://report.snapsendsolve.com/api/reports

3.0 Predefined Constants

  • Default page size (30)
  • Maximum page size (100)

4.0 Summary​

ResourceDescriptionGET/api/reportsGets a list of authority reports

5.0 Details​

5.1 GET /api/report

Returns a list of authority reports. The only mandatory parameter is the authority id. Once the authority id is provided, the service will return the latest 30 reports by default. The page size can be customised.

5.1.1 HTTP HEADER Parameters

NameDescriptionAuthorization (mandatory)The authentication credentials (API access token). Note: This parameter is mandatory for retrieving reports, otherwise it will return an error code (#SSS-005 Authentication Failed).

5.1.2 HTTP HEADER Parameters

5.2 Example Request

5.2.1 HTTP HEADER Parameters

GET /api/reports?authority_id=1

5.2.2 HTTP HEADER Parameters

OK 200

{

“_metadata”:{
“request”:”/api/reports?authority_id=1″,
“authority_id”:”1″,
“page_size”:30,
“pages”:{
“previous”:”/api/reports?authority_id=1&end_date=2000­01­01″,
“next”:”/api/reports?authority_id=1&start_date=2000­11­11″
}

},
“reports”: [
{
“ReportID”:100,

“Date”:”2000­01­0100:08:00.0000000+00:00″,

“IncidentType”:”GeneralRequest”, “ReportAddress”:”FlinderStreetStation,FlindersStreet,Melbourne,3000, Victoria”, “Latitude”:­37.818268, “Longtitude”:144.967134, “Notes”:”Thedesignofthestationisveryuniqueandveryinspiring,but thereisacrackontheside.”,
“Images”:”*”, “IncidentTypeId”:”I_23″,
“Reporter”: {
“Name”:”SteveJobs”,
“Phone”:”0400000000″,
“Email”:”steve@apple.com”,
“Address”:”Flagstaff”,
“Suburb”:”Melbourne”,
“Postcode”:”3000″
}
},

}

6.0 Timezone handling

All times and dates used in the api requests and responses utilise UTC time.

7.0 Accessing reports on different pages​

The reports in the api response is ordered by report date. The latest report will be the first one when the below call is made:

“/api/reports?authority_id={authority_id}”

Two auto-generated URLs can be found in the “_metadata/pages” section in the JSON response. Sending those requests will retrieve the previous or next page of reports. Page size can also be defined by changing the ‘page_size’ parameter (this should be less than Maximum page size).

8.0 Authentication​

Authorities will be able to retrieve their unique authentication token by visiting: http://admin.snapsendsolve.com/authority/integration.

9.0 Error codes

CodeHTTP Response CodeMessageDescriptionSSS-001400Missing parameterauthority_id is not providedSSS-002400Page size is too longpage_size provided is more than 100SSS-003400Request have wrong parameters formatThe request have both start_date and end_dateSSS-004403Integration function is disabledIntegration function is not enabled for the current provided authoritySSS-005401Authentication failedAuthentication token is not validSSS-006400Page size is illegalpage_size provided is not a positive integer

An illustrated graphic of the app screen with a Snapper character
An illustrated graphic of the app screen with a Snapper character
An illustrated graphic of the app screen with a Snapper character
Contact us

Book a demo

We'll be in touch to share more about Snap Send Solve and learn how we can help your organisation.

Please fill out the form

Thank you! We'll be in touch soon.
Oops! Something went wrong while submitting the form.