POST Crime?ResetCache={ResetCache}&APIIdentifier={APIIdentifier}&User={User}&rateDate={rateDate}

The Crime Index Batch service returns crime indices for multiple locations

Request Information

Parameters

NameDescriptionAdditional information
request
List of crime index requests with location information

Define this parameter in the request body.

ResetCache
Reset cache with new lookup. Example: true (Optional)

Define this parameter in the request URI.

APIIdentifier
An identifier assigned to MGAs by RSUI. Example: 5a6c7790-83bf-4b4c-88e1-7067413d3390 (Required)

Define this parameter in the request URI.

User
User Name that matches with the APIIdentifier. Example: John Smith (Required)

Define this parameter in the request URI.

rateDate
Rate date for historical lookups (Optional)

Define this parameter in the request URI.

Request body formats

application/json, text/json

Sample:
[
  {
    "streetAddress": "sample string 1",
    "city": "sample string 2",
    "zipCode": "sample string 3",
    "state": "sample string 4",
    "latitude": 1.0,
    "longitude": 1.0,
    "resetCache": true,
    "rateDate": "sample string 6"
  },
  {
    "streetAddress": "sample string 1",
    "city": "sample string 2",
    "zipCode": "sample string 3",
    "state": "sample string 4",
    "latitude": 1.0,
    "longitude": 1.0,
    "resetCache": true,
    "rateDate": "sample string 6"
  },
  {
    "streetAddress": "sample string 1",
    "city": "sample string 2",
    "zipCode": "sample string 3",
    "state": "sample string 4",
    "latitude": 1.0,
    "longitude": 1.0,
    "resetCache": true,
    "rateDate": "sample string 6"
  }
]

text/html

Sample:
[{"streetAddress":"sample string 1","city":"sample string 2","zipCode":"sample string 3","state":"sample string 4","latitude":1.0,"longitude":1.0,"resetCache":true,"rateDate":"sample string 6"},{"streetAddress":"sample string 1","city":"sample string 2","zipCode":"sample string 3","state":"sample string 4","latitude":1.0,"longitude":1.0,"resetCache":true,"rateDate":"sample string 6"},{"streetAddress":"sample string 1","city":"sample string 2","zipCode":"sample string 3","state":"sample string 4","latitude":1.0,"longitude":1.0,"resetCache":true,"rateDate":"sample string 6"}]

application/xml, text/xml

Sample:
<ArrayOfCrimeIndexRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CrimeIndexRequest>
    <StreetAddress>sample string 1</StreetAddress>
    <City>sample string 2</City>
    <ZipCode>sample string 3</ZipCode>
    <State>sample string 4</State>
    <Latitude>1</Latitude>
    <Longitude>1</Longitude>
    <ResetCache>true</ResetCache>
    <RateDate>sample string 6</RateDate>
  </CrimeIndexRequest>
  <CrimeIndexRequest>
    <StreetAddress>sample string 1</StreetAddress>
    <City>sample string 2</City>
    <ZipCode>sample string 3</ZipCode>
    <State>sample string 4</State>
    <Latitude>1</Latitude>
    <Longitude>1</Longitude>
    <ResetCache>true</ResetCache>
    <RateDate>sample string 6</RateDate>
  </CrimeIndexRequest>
  <CrimeIndexRequest>
    <StreetAddress>sample string 1</StreetAddress>
    <City>sample string 2</City>
    <ZipCode>sample string 3</ZipCode>
    <State>sample string 4</State>
    <Latitude>1</Latitude>
    <Longitude>1</Longitude>
    <ResetCache>true</ResetCache>
    <RateDate>sample string 6</RateDate>
  </CrimeIndexRequest>
</ArrayOfCrimeIndexRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'List`1'.

Response Information

List of crime indices for the provided locations (Error messages will be in the ApiMessages field)

Response body formats

application/json, text/json

Sample:
{
  "crimeIndexes": [
    {
      "murderIndex": 1.0,
      "rapeIndex": 2.0,
      "robberyIndex": 3.0,
      "assaultIndex": 4.0,
      "url": "sample string 5"
    },
    {
      "murderIndex": 1.0,
      "rapeIndex": 2.0,
      "robberyIndex": 3.0,
      "assaultIndex": 4.0,
      "url": "sample string 5"
    },
    {
      "murderIndex": 1.0,
      "rapeIndex": 2.0,
      "robberyIndex": 3.0,
      "assaultIndex": 4.0,
      "url": "sample string 5"
    }
  ],
  "apiMessages": [
    "sample string 1",
    "sample string 2",
    "sample string 3"
  ]
}

text/html

Sample:
{"crimeIndexes":[{"murderIndex":1.0,"rapeIndex":2.0,"robberyIndex":3.0,"assaultIndex":4.0,"url":"sample string 5"},{"murderIndex":1.0,"rapeIndex":2.0,"robberyIndex":3.0,"assaultIndex":4.0,"url":"sample string 5"},{"murderIndex":1.0,"rapeIndex":2.0,"robberyIndex":3.0,"assaultIndex":4.0,"url":"sample string 5"}],"apiMessages":["sample string 1","sample string 2","sample string 3"]}

application/xml, text/xml

Sample:
<CrimeIndexBatchResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <APIMessages>
    <string>sample string 1</string>
    <string>sample string 2</string>
    <string>sample string 3</string>
  </APIMessages>
  <CrimeIndexes>
    <CrimeIndex>
      <MurderIndex>1</MurderIndex>
      <RapeIndex>2</RapeIndex>
      <RobberyIndex>3</RobberyIndex>
      <AssaultIndex>4</AssaultIndex>
      <URL>sample string 5</URL>
    </CrimeIndex>
    <CrimeIndex>
      <MurderIndex>1</MurderIndex>
      <RapeIndex>2</RapeIndex>
      <RobberyIndex>3</RobberyIndex>
      <AssaultIndex>4</AssaultIndex>
      <URL>sample string 5</URL>
    </CrimeIndex>
    <CrimeIndex>
      <MurderIndex>1</MurderIndex>
      <RapeIndex>2</RapeIndex>
      <RobberyIndex>3</RobberyIndex>
      <AssaultIndex>4</AssaultIndex>
      <URL>sample string 5</URL>
    </CrimeIndex>
  </CrimeIndexes>
</CrimeIndexBatchResponse>

text/javascript, application/javascript, application/json-p

Sample:
({"crimeIndexes":[{"murderIndex":1.0,"rapeIndex":2.0,"robberyIndex":3.0,"assaultIndex":4.0,"url":"sample string 5"},{"murderIndex":1.0,"rapeIndex":2.0,"robberyIndex":3.0,"assaultIndex":4.0,"url":"sample string 5"},{"murderIndex":1.0,"rapeIndex":2.0,"robberyIndex":3.0,"assaultIndex":4.0,"url":"sample string 5"}],"apiMessages":["sample string 1","sample string 2","sample string 3"]});