Report an incident
Needs: Incidents, Read-write
Reports an incident as the Report incident form does, reported by the organisation owner. A normal incident starts in Triage. Use the edit endpoint afterwards to change its status or assign it. Use POST /site-incidents for a site incident.
Errors
422withUnknown custom attributes: ...for a key that is not in the options.422withRequired on the report form: ...when a required attribute is missing.
curl -X POST "https://app.imploy.com.au/api/integrations/v1/incidents" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"title": "Fall in the kitchen",
"description": "<p>Client slipped on a wet floor.</p>",
"priority": "Medium",
"category": "Injury",
"location": "Kitchen"
}'
import requests
import json
url = "https://app.imploy.com.au/api/integrations/v1/incidents"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"title": "Fall in the kitchen",
"description": "<p>Client slipped on a wet floor.</p>",
"priority": "Medium",
"category": "Injury",
"location": "Kitchen"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.imploy.com.au/api/integrations/v1/incidents", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"title": "Fall in the kitchen",
"description": "<p>Client slipped on a wet floor.</p>",
"priority": "Medium",
"category": "Injury",
"location": "Kitchen"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"title": "Fall in the kitchen",
"description": "<p>Client slipped on a wet floor.</p>",
"priority": "Medium",
"category": "Injury",
"location": "Kitchen"
}`)
req, err := http.NewRequest("POST", "https://app.imploy.com.au/api/integrations/v1/incidents", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.imploy.com.au/api/integrations/v1/incidents')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"title": "Fall in the kitchen",
"description": "<p>Client slipped on a wet floor.</p>",
"priority": "Medium",
"category": "Injury",
"location": "Kitchen"
}'
response = http.request(request)
puts response.body
{
"created": 12,
"kind": "incident",
"code": "INC-012",
"status": "Triage"
}
{
"message": "Invalid or expired access token."
}
{
"message": "Access token does not permit this action."
}
{
"message": "Too many requests."
}
/incidents
Target server for requests. Edit to use your own host.
An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
imp_at_. Send it as Authorization: Bearer imp_at_XXXX.The media type of the request body
The incident title.
What happened. Plain text or simple HTML.
One of Low, Medium or High.
One of Medication, Behaviour, Injury, Abuse, Restrictive, Privacy or Other.
Where it happened.
The shift it happened on (a site shift for a site incident). Links the client or clients and staff.
Key and value pairs for any attribute from the options endpoint. Use lists for multiselect and checklist. Attributes marked required on the create form must be sent.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
Body
The incident title.
What happened. Plain text or simple HTML.
One of Low, Medium or High.
One of Medication, Behaviour, Injury, Abuse, Restrictive, Privacy or Other.
Where it happened.
The shift it happened on (a site shift for a site incident). Links the client or clients and staff.
Key and value pairs for any attribute from the options endpoint. Use lists for multiselect and checklist. Attributes marked required on the create form must be sent.