Precisely APIs Crime API

The Crime API from Precisely APIs — 2 operation(s) for crime.

OpenAPI Specification

precisely-apis-crime-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  contact:
    name: Precisely APIs Support
    url: https://support.precisely.com
  description: '

    Demographics. Audience Enrichment. Add local demographics and lifestyle

    segmentation to your audience profiles. The Demographics API returns

    household demographics and lifestyle characteristics with the input of an

    address, location coordinate, or geographic boundary. This service covers

    select countries.'
  license:
    name: Apache 2.0
    url: http://springdoc.org
  termsOfService: http://swagger.io/terms/
  title: Precisely APIs Crime API
  version: 18.1.0
servers:
- url: https://api.precisely.com
security:
- oAuth2Password:
  - ''
tags:
- name: Crime
paths:
  /risks/v1/crime/bylocation:
    get:
      description: Accepts latitude/longitude as input and returns and Returns local crime indexes.
      operationId: getCrimeRiskByLocation
      parameters:
      - description: The longitude of the location
        in: query
        name: longitude
        required: true
        schema:
          type: string
      - description: The latitude of the location
        in: query
        name: latitude
        required: true
        schema:
          type: string
      - description: this is crime type; valid values are following 11 crime types with 'all' as default (more than one can also be given as comma separated types)
        in: query
        name: type
        required: false
        schema:
          type: string
      - description: Y or N (default is N) - if it is Y, then geometry will be part of response
        in: query
        name: includeGeometry
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrimeRiskResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo_1'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                type: string
          description: Internal Server Error
      security:
      - oAuth2Password: []
      summary: Get Crime Risk By  Location
      tags:
      - Crime
      x-accepts: application/json
    post:
      description: This is a Batch offering for 'Crime Risk By Location' service. It accepts a single location coordinate or a list of location coordinates and retrieve local crime indexes.
      operationId: getCrimeRiskByLocationBatch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrimeRiskByLocationBatchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrimeRiskResponseList'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo_1'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                type: string
          description: Internal Server Error
      security:
      - oAuth2Password: []
      summary: Post Crime Risk By Location
      tags:
      - Crime
      x-contentType: application/json
      x-accepts: application/json
  /risks/v1/crime/byaddress:
    get:
      description: Accepts addresses as input and Returns local crime indexes.
      operationId: getCrimeRiskByAddress
      parameters:
      - description: free form address text
        in: query
        name: address
        required: true
        schema:
          type: string
      - description: this is crime type; valid values are following 11 crime types with 'all' as default (more than one can also be given as comma separated types)
        in: query
        name: type
        required: false
        schema:
          type: string
      - description: Y or N (default is N) - if it is Y, then geometry will be part of response
        in: query
        name: includeGeometry
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrimeRiskResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo_1'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                type: string
          description: Internal Server Error
      security:
      - oAuth2Password: []
      summary: Get Crime Risk By Address
      tags:
      - Crime
      x-accepts: application/json
    post:
      description: This is a Batch offering for 'Crime Risk By Address' service. It accepts a single address or a list of addresses and retrieve local crime indexes.
      operationId: getCrimeRiskByAddressBatch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrimeRiskByAddressBatchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrimeRiskResponseList'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo_1'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                type: string
          description: Internal Server Error
      security:
      - oAuth2Password: []
      summary: Post Crime Risk By Address
      tags:
      - Crime
      x-contentType: application/json
      x-accepts: application/json
components:
  schemas:
    CrimeRiskByAddressBatchRequest:
      example:
        addresses:
        - country: country
          streetSide: streetSide
          city: city
          displayName: displayName
          postalCode: postalCode
          latitude: latitude
          businessName: businessName
          county: county
          unitType: unitType
          streetName: streetName
          formattedAddress: formattedAddress
          addressLine1: addressLine1
          mainAddressLine: mainAddressLine
          addressLine2: addressLine2
          addressLine3: addressLine3
          objectId: objectId
          addressLastLine: addressLastLine
          longitude: longitude
          unitValue: unitValue
          stateProvince: stateProvince
          urbanizationName: urbanizationName
          areaName1: areaName1
          areaName2: areaName2
          areaName3: areaName3
          areaName4: areaName4
          addressNumber: addressNumber
          postCode: postCode
          postCodeExt: postCodeExt
          placeName: placeName
          status: status
        - country: country
          streetSide: streetSide
          city: city
          displayName: displayName
          postalCode: postalCode
          latitude: latitude
          businessName: businessName
          county: county
          unitType: unitType
          streetName: streetName
          formattedAddress: formattedAddress
          addressLine1: addressLine1
          mainAddressLine: mainAddressLine
          addressLine2: addressLine2
          addressLine3: addressLine3
          objectId: objectId
          addressLastLine: addressLastLine
          longitude: longitude
          unitValue: unitValue
          stateProvince: stateProvince
          urbanizationName: urbanizationName
          areaName1: areaName1
          areaName2: areaName2
          areaName3: areaName3
          areaName4: areaName4
          addressNumber: addressNumber
          postCode: postCode
          postCodeExt: postCodeExt
          placeName: placeName
          status: status
        preferences:
          includeGeometry: includeGeometry
          type: type
      properties:
        addresses:
          items:
            $ref: '#/components/schemas/RiskAddress'
          type: array
        preferences:
          $ref: '#/components/schemas/CrimeRiskPreferences'
      required:
      - addresses
      type: object
    RisksBoundaries:
      example:
        boundary:
        - ref: ref
          geometry:
            crs:
              type: type
              properties:
                name: name
            coordinates: '{}'
            type: type
          id: id
          type: type
        - ref: ref
          geometry:
            crs:
              type: type
              properties:
                name: name
            coordinates: '{}'
            type: type
          id: id
          type: type
      properties:
        boundary:
          items:
            $ref: '#/components/schemas/CrimeBoundary'
          type: array
      type: object
    CrimeRiskByLocationBatchRequest:
      example:
        preferences:
          includeGeometry: includeGeometry
          type: type
        locations:
        - geometry:
            coordinates:
            - 0.8008281904610115
            - 0.8008281904610115
            type: type
          objectId: objectId
          purchaseAmount: purchaseAmount
        - geometry:
            coordinates:
            - 0.8008281904610115
            - 0.8008281904610115
            type: type
          objectId: objectId
          purchaseAmount: purchaseAmount
      properties:
        locations:
          items:
            $ref: '#/components/schemas/RiskLocations'
          type: array
        preferences:
          $ref: '#/components/schemas/CrimeRiskPreferences'
      required:
      - locations
      type: object
    RiskLocations:
      example:
        geometry:
          coordinates:
          - 0.8008281904610115
          - 0.8008281904610115
          type: type
        objectId: objectId
        purchaseAmount: purchaseAmount
      properties:
        geometry:
          $ref: '#/components/schemas/RiskGeometry'
        purchaseAmount:
          type: string
        objectId:
          type: string
      required:
      - geometry
      type: object
    CrimeRiskResponse:
      example:
        themes:
        - crimeIndexTheme:
            boundaryRef: boundaryRef
            source: source
            indexVariable:
            - score: score
              percentile: percentile
              name: name
              category: category
              stateScore: stateScore
            - score: score
              percentile: percentile
              name: name
              category: category
              stateScore: stateScore
        - crimeIndexTheme:
            boundaryRef: boundaryRef
            source: source
            indexVariable:
            - score: score
              percentile: percentile
              name: name
              category: category
              stateScore: stateScore
            - score: score
              percentile: percentile
              name: name
              category: category
              stateScore: stateScore
        boundaries:
          boundary:
          - ref: ref
            geometry:
              crs:
                type: type
                properties:
                  name: name
              coordinates: '{}'
              type: type
            id: id
            type: type
          - ref: ref
            geometry:
              crs:
                type: type
                properties:
                  name: name
              coordinates: '{}'
              type: type
            id: id
            type: type
        objectId: objectId
        matchedAddress:
          country: country
          streetSide: streetSide
          city: city
          displayName: displayName
          postalCode: postalCode
          latitude: latitude
          businessName: businessName
          county: county
          unitType: unitType
          streetName: streetName
          formattedAddress: formattedAddress
          addressLine1: addressLine1
          mainAddressLine: mainAddressLine
          addressLine2: addressLine2
          addressLine3: addressLine3
          objectId: objectId
          addressLastLine: addressLastLine
          longitude: longitude
          unitValue: unitValue
          stateProvince: stateProvince
          urbanizationName: urbanizationName
          areaName1: areaName1
          areaName2: areaName2
          areaName3: areaName3
          areaName4: areaName4
          addressNumber: addressNumber
          postCode: postCode
          postCodeExt: postCodeExt
          placeName: placeName
          status: status
      properties:
        objectId:
          type: string
        themes:
          items:
            $ref: '#/components/schemas/RisksCrimeTheme'
          type: array
        boundaries:
          $ref: '#/components/schemas/RisksBoundaries'
        matchedAddress:
          $ref: '#/components/schemas/RiskAddress'
      type: object
    CrimeRiskResponseList:
      example:
        crimeRisk:
        - themes:
          - crimeIndexTheme:
              boundaryRef: boundaryRef
              source: source
              indexVariable:
              - score: score
                percentile: percentile
                name: name
                category: category
                stateScore: stateScore
              - score: score
                percentile: percentile
                name: name
                category: category
                stateScore: stateScore
          - crimeIndexTheme:
              boundaryRef: boundaryRef
              source: source
              indexVariable:
              - score: score
                percentile: percentile
                name: name
                category: category
                stateScore: stateScore
              - score: score
                percentile: percentile
                name: name
                category: category
                stateScore: stateScore
          boundaries:
            boundary:
            - ref: ref
              geometry:
                crs:
                  type: type
                  properties:
                    name: name
                coordinates: '{}'
                type: type
              id: id
              type: type
            - ref: ref
              geometry:
                crs:
                  type: type
                  properties:
                    name: name
                coordinates: '{}'
                type: type
              id: id
              type: type
          objectId: objectId
          matchedAddress:
            country: country
            streetSide: streetSide
            city: city
            displayName: displayName
            postalCode: postalCode
            latitude: latitude
            businessName: businessName
            county: county
            unitType: unitType
            streetName: streetName
            formattedAddress: formattedAddress
            addressLine1: addressLine1
            mainAddressLine: mainAddressLine
            addressLine2: addressLine2
            addressLine3: addressLine3
            objectId: objectId
            addressLastLine: addressLastLine
            longitude: longitude
            unitValue: unitValue
            stateProvince: stateProvince
            urbanizationName: urbanizationName
            areaName1: areaName1
            areaName2: areaName2
            areaName3: areaName3
            areaName4: areaName4
            addressNumber: addressNumber
            postCode: postCode
            postCodeExt: postCodeExt
            placeName: placeName
            status: status
        - themes:
          - crimeIndexTheme:
              boundaryRef: boundaryRef
              source: source
              indexVariable:
              - score: score
                percentile: percentile
                name: name
                category: category
                stateScore: stateScore
              - score: score
                percentile: percentile
                name: name
                category: category
                stateScore: stateScore
          - crimeIndexTheme:
              boundaryRef: boundaryRef
              source: source
              indexVariable:
              - score: score
                percentile: percentile
                name: name
                category: category
                stateScore: stateScore
              - score: score
                percentile: percentile
                name: name
                category: category
                stateScore: stateScore
          boundaries:
            boundary:
            - ref: ref
              geometry:
                crs:
                  type: type
                  properties:
                    name: name
                coordinates: '{}'
                type: type
              id: id
              type: type
            - ref: ref
              geometry:
                crs:
                  type: type
                  properties:
                    name: name
                coordinates: '{}'
                type: type
              id: id
              type: type
          objectId: objectId
          matchedAddress:
            country: country
            streetSide: streetSide
            city: city
            displayName: displayName
            postalCode: postalCode
            latitude: latitude
            businessName: businessName
            county: county
            unitType: unitType
            streetName: streetName
            formattedAddress: formattedAddress
            addressLine1: addressLine1
            mainAddressLine: mainAddressLine
            addressLine2: addressLine2
            addressLine3: addressLine3
            objectId: objectId
            addressLastLine: addressLastLine
            longitude: longitude
            unitValue: unitValue
            stateProvince: stateProvince
            urbanizationName: urbanizationName
            areaName1: areaName1
            areaName2: areaName2
            areaName3: areaName3
            areaName4: areaName4
            addressNumber: addressNumber
            postCode: postCode
            postCodeExt: postCodeExt
            placeName: placeName
            status: status
      properties:
        crimeRisk:
          items:
            $ref: '#/components/schemas/CrimeRiskResponse'
          type: array
      type: object
    IndexVariable:
      example:
        score: score
        percentile: percentile
        name: name
        category: category
        stateScore: stateScore
      properties:
        name:
          type: string
        score:
          type: string
        category:
          type: string
        percentile:
          type: string
        stateScore:
          type: string
      type: object
    CrimeBoundary:
      example:
        ref: ref
        geometry:
          crs:
            type: type
            properties:
              name: name
          coordinates: '{}'
          type: type
        id: id
        type: type
      properties:
        id:
          type: string
        type:
          type: string
        ref:
          type: string
        geometry:
          $ref: '#/components/schemas/CommonGeometry'
      type: object
    RiskGeometry:
      example:
        coordinates:
        - 0.8008281904610115
        - 0.8008281904610115
        type: type
      properties:
        type:
          type: string
        coordinates:
          items:
            format: double
            type: number
          type: array
      required:
      - type
      type: object
    GeometryProperties:
      example:
        name: name
      properties:
        name:
          type: string
      type: object
    CrimeRiskPreferences:
      example:
        includeGeometry: includeGeometry
        type: type
      properties:
        includeGeometry:
          type: string
        type:
          type: string
      type: object
    RisksCrimeTheme:
      example:
        crimeIndexTheme:
          boundaryRef: boundaryRef
          source: source
          indexVariable:
          - score: score
            percentile: percentile
            name: name
            category: category
            stateScore: stateScore
          - score: score
            percentile: percentile
            name: name
            category: category
            stateScore: stateScore
      properties:
        crimeIndexTheme:
          $ref: '#/components/schemas/CrimeIndexTheme'
      type: object
    ErrorInfo_1:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorCode'
          type: array
      type: object
    CommonGeometry:
      example:
        crs:
          type: type
          properties:
            name: name
        coordinates: '{}'
        type: type
      properties:
        type:
          type: string
        crs:
          $ref: '#/components/schemas/RisksGeometryCRC'
        coordinates:
          type: object
      type: object
    CrimeIndexTheme:
      example:
        boundaryRef: boundaryRef
        source: source
        indexVariable:
        - score: score
          percentile: percentile
          name: name
          category: category
          stateScore: stateScore
        - score: score
          percentile: percentile
          name: name
          category: category
          stateScore: stateScore
      properties:
        source:
          type: string
        boundaryRef:
          type: string
        indexVariable:
          items:
            $ref: '#/components/schemas/IndexVariable'
          type: array
      type: object
    RiskAddress:
      example:
        country: country
        streetSide: streetSide
        city: city
        displayName: displayName
        postalCode: postalCode
        latitude: latitude
        businessName: businessName
        county: county
        unitType: unitType
        streetName: streetName
        formattedAddress: formattedAddress
        addressLine1: addressLine1
        mainAddressLine: mainAddressLine
        addressLine2: addressLine2
        addressLine3: addressLine3
        objectId: objectId
        addressLastLine: addressLastLine
        longitude: longitude
        unitValue: unitValue
        stateProvince: stateProvince
        urbanizationName: urbanizationName
        areaName1: areaName1
        areaName2: areaName2
        areaName3: areaName3
        areaName4: areaName4
        addressNumber: addressNumber
        postCode: postCode
        postCodeExt: postCodeExt
        placeName: placeName
        status: status
      properties:
        objectId:
          type: string
        displayName:
          type: string
        streetSide:
          type: string
        businessName:
          type: string
        addressLine1:
          type: string
        addressLine2:
          type: string
        addressLine3:
          type: string
        city:
          type: string
        stateProvince:
          type: string
        county:
          type: string
        postalCode:
          type: string
        latitude:
          type: string
        longitude:
          type: string
        status:
          type: string
        urbanizationName:
          type: string
        formattedAddress:
          type: string
        mainAddressLine:
          type: string
        addressLastLine:
          type: string
        placeName:
          type: string
        areaName1:
          type: string
        areaName2:
          type: string
        areaName3:
          type: string
        areaName4:
          type: string
        postCode:
          type: string
        postCodeExt:
          type: string
        country:
          type: string
        addressNumber:
          type: string
        streetName:
          type: string
        unitType:
          type: string
        unitValue:
          type: string
      type: object
    RisksGeometryCRC:
      example:
        type: type
        properties:
          name: name
      properties:
        type:
          type: string
        properties:
          $ref: '#/components/schemas/GeometryProperties'
      type: object
    ErrorCode:
      properties:
        errorCode:
          type: string
        errorDescription:
          type: string
      type: object
  securitySchemes:
    oAuth2Password:
      flows:
        implicit:
          authorizationUrl: https://api.precisely.com/oauth/token
          scopes:
            bearer token: put your bearer token here.
      type: oauth2
externalDocs:
  description: Online Documentation
  url: https://docs.precisely.com/docs/sftw/precisely-apis/main/en-us/webhelp/apis/index.html