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.
The Snap Send Solve web service URL is made up of two distinct sections and looks like the following:
is one of the services documented later in this document.
An example of the current URL for the dashboard call would resemble the following:
Default page size (30)
Maximum page size (100)
|GET/api/reports||Gets a list of authority reports|
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.
|Authorization (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.2.2 HTTP HEADER Parameters
“IncidentType”:”GeneralRequest”, “ReportAddress”:”FlinderStreetStation,FlindersStreet,Melbourne,3000, Victoria”, “Latitude”:37.818268, “Longtitude”:144.967134, “Notes”:”Thedesignofthestationisveryuniqueandveryinspiring,but thereisacrackontheside.”,
All times and dates used in the api requests and responses utilise UTC time.
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:
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).
Authorities will be able to retrieve their unique authentication token by visiting: http://admin.snapsendsolve.com/authority/integration.
|Code||HTTP Response Code||Message||Description|
|SSS-001||400||Missing parameter||authority_id is not provided|
|SSS-002||400||Page size is too long||page_size provided is more than 100|
|SSS-003||400||Request have wrong parameters format||The request have both start_date and end_date|
|SSS-004||403||Integration function is disabled||Integration function is not enabled for the current provided authority|
|SSS-005||401||Authentication failed||Authentication token is not valid|
|SSS-006||400||Page size is illegal||page_size provided is not a positive integer|