Example API Request: Incident Exposure Submission

Before Getting Started

  • Review the Authorization section of the Guides page
  • Make sure you are subscribed to the Agency Incidents product or a similar product that includes the Agency Incidents APU endpoints.
  • Configure Postman with a valid Access token using the Authorization Code or Password Grant type

Additional documentation for the Agency Incidents API can be found here.

Best Practices for Incident Exposure Submission

Perform the following steps to complete (not Authorize) an incident.

  • NOTE: The following guide assumes that a CAD integration is NOT present.

1. POST an Incident

  • Method: POST
  • Request URL: https://data.emergencyreporting.com/agencyincidents/incidents
  • Endpoint Documentation: Post Incidents
    {
        "stationID": "123xx",
        "state": "IL",
        "incidentDateTime": "01/10/2050 01:01:01",
        "fdid": "123xx",
        "incidentNumber": "444xx",
        "partnerIncidentNumber": "ST123xx",
        "dispatchRunNumber": "123456xx"
    }

Response: 201 Created

Body Response

"incidentID": "123456xx"

If you'd like to confirm creation of just the Incident, you can run a GET Incidents call to verify.

  • Note: at this time, the incident will not yet appear in the Emergency Reporting Incidents Module of the User Interface since the Exposure has not yet been created.

2. POST an Exposure

  • Method: POST
  • Request URL: https://data.emergencyreporting.com/agencyincidents/incidents/123456xx/exposures
    • Where 123456xx is {incidentID}
  • Endpoint Documentation: Post Exposures
    {
        "shiftsOrPlatoon": "A Shift",
        "incidentType": "321",
        "assignedToUserID": "1122xx",
        "aidGivenOrReceived": "N",
        "hazmatReleased": "N",
        "primaryActionTaken": "20",
        "secondaryActionTaken": "21",
        "thirdActionTaken": "30",
        "completedByUserID": "3344xx",
        "reviewedByUserID": "5566xx",
        "completedDateTime": "01/10/2050 01:10:01",
        "reviewedDateTime": "01/10/2050 01:11:01",
        "psapDateTime": "01/10/2050 01:01:01",
        "dispatchNotifiedDateTime": "01/10/2050 01:02:11",
        "initialResponderDateTime": "01/10/2050 01:05:01",
        "hasPropertyLoss": "1",
        "propertyLossAmount": "10000",
        "hasContentLoss": "1",
        "contentLossAmount": "8000",
        "hasPreIncidentPropertyValue": "1",
        "preIncidentPropertyValueAmount": "500000",
        "hasPreIncidentContentsValue": "1",
        "preIncidentContentsValueAmount": "200000",
        "complaintReportedByDispatch": "2301065"
    }

Response: 201 Created

Body Response

"exposureID": "765432xx"

3. GET rowVersion of Default Exposure Location

A default, blank exposure location was generated when the exposure was created above. Let's find the exposure location rowVersion so we can update the location to its proper values.

  • Method: GET
  • Request URL: https://data.emergencyreporting.com/agencyincidents/exposures/765432xx/location
    • Where 765432xx is {exposureID}
  • Endpoint Documentation: Get Exposure Location

Response

{
    "exposureLocation": {
        "locationType": null,
        "milePostNumber": null,
        "streetPrefix": null,
        "streetName": null,
        "streetType": null,
        "streetSuffix": null,
        "aptOrSuiteNumber": null,
        "city": null,
        "cityCode": null,
        "state": null,
        "zipCode": null,
        "countyCode": null,
        "latitude": null,
        "longitude": null,
        "crossStreetOrDirections": null,
        "zoneID": null,
        "populationDensity": null,
        "propertyUse": null,
        "nemsisPropertyClassification": null,
        "exposureID": "765432xx",
        "rowVersion": "00000002B2345xxx"
    }
}

4. PUT (Update) Exposure Location

Now that we have the latest rowVersion ("00000002B2345xxx") of the Exposure Location, let's update the Exposure Location using the PUT method and add the Exposure Location rowVersion to the request header.

  • Method: PUT
  • Request URL: https://data.emergencyreporting.com/agencyincidents/exposures/765432xx/location
    • Where 765432xx is {exposureID}
  • Endpoint Documentation: Put Exposure Location

The Exposure Location rowVersion is included in the header below as an ETag (entity tag).

  • Regarding Zip Code:
    • Zip code can be sent in 5 or 9 digit format (Ex: 12345 or 123456789)
    • When sending zip code (zipCode) in the 9 digit format, exclude the hypen from the string (Ex: 123456789)
    • Including the hypen in a 9 digit zip code string may result in a 500 error
    HEADER
    Ocp-Apim-Subscription-Key: YOUR_PRODUCT_SUBSCRIPTION_PRIMARY_KEY
    Content-Type: application/json
    Authorization: YOUR_ACCESS_TOKEN
    ETag: 00000002B2345xxx
    {
        "locationType": "1",
        "milePostNumber": "123",
        "streetPrefix": "W",
        "streetName": "Main",
        "streetType": "DR",
        "streetSuffix": "NW",
        "aptOrSuiteNumber": "33",
        "city": "Chicago",
        "cityCode": "14000",
        "state": "IL",
        "zipCode": "60605",
        "countyCode": "031",
        "latitude": "48.772885600000002",
        "longitude": "-122.4446533",
        "crossStreetOrDirections": "One Block from City Center",
        "zoneID": "123xx",
        "populationDensity": "Urban",
        "propertyUse": "599",
        "nemsisPropertyClassification": "Y92.51"
    }

Response: 201 Created

Body Response

"rowVersion": "0000003C9876xxx"

A successful response should return a new rowVersion for the Exposure Location.

5. POST (Create) Exposure Apparatus

To add an Apparatus to the Exposure, you'll need to POST to Exposure Apparatuses.

  • Method: POST
  • Request URL: https://data.emergencyreporting.com/agencyincidents/exposures/765432xx/apparatuses
    • Where 765432xx is {exposureID}
  • Endpoint Documentation: Post Exposure Apparatuses
    {
        "agencyApparatusID": "MD1",
        "departmentApparatusID": "1112xx",
        "apparatusTypeID": "76",
        "apparatusUseID": "1",
        "wasCancelled": "0",
        "responseModeToScene": "390",
        "responseModeNemsis3": "2223001",
        "injuryOrOnsetDateTime": "01/08/2050 23:59:00",
        "alarmDateTime": "01/09/2050 01:01:01",
        "dispatchDateTime": "01/09/2050 01:02:00",
        "enrouteDateTime": "01/09/2050 01:03:00",
        "dispatchAcknowledgedDateTime": "01/09/2050 01:04:00",
        "arrivedDateTime": "01/09/2050 01:10:00",
        "arrivedAtPatientDateTime": "01/09/2050 01:11:15",
        "cancelledDateTime": "01/09/2050 01:05:01",
        "clearedSceneDateTime": "01/09/2050 01:30:00",
        "arrivedAtLandingZoneDateTime": "01/09/2050 01:45:00",
        "atDestinationDateTime": "01/09/2050 01:59:00",
        "transferOfPatientCareDateTime": "01/09/2050 01:59:15",
        "clearedDestinationDateTime": "01/09/2050 02:30:00",
        "inQuartersDateTime": "01/09/2050 02:45:00",
        "inServiceDateTime": "01/09/2050 02:45:00",
        "callCompletedDateTime": "01/09/2050 02:45:00",
        "dispatchToSceneMileage": "5.25",
        "dispatchDepartmentLocationID": "1234",
        "dispatchZoneID": "12345",
        "dispatchLatitude": null,
        "dispatchLongitude": null,
        "dispatchNationalGridCoordinates": null
    }

Response: 201 Created

Body Response

"apparatusID": "12345678"

A successful response should return the apparatusID.

6. POST (Create) Apparatus Crew Member

To add a Crew Member to the Exposure Apparatus, you'll need to POST to Exposure Crew Members.

  • Method: POST
  • Request URL: https://data.emergencyreporting.com/agencyincidents/exposures/765432xx/crewmembers
    • Where 765432xx is {exposureID}
  • Endpoint Documentation: Post Exposure Crew Members
    {
        "apparatusID": "123456xx",
        "userID": "1234xx"
    }

Response: 201 Created

Body Response

"exposureID": "765432xx"

A successful response should return the exposureID.


Back to Top