v0.1.0
OpenAPI 3.1.1

PaTMa

API documentation

Server:https://app.patma.co.uk

Production server

Client Libraries

local-environment

​

/api/prospector/v1/demographics/

​

Lookup census provided demographic details for the area containing the given postcode.

Query Parameters
  • postcode
    Type: string
    required

    A valid UK postcode

Responses
  • application/json
  • application/json
Request Example for get/api/prospector/v1/demographics/
curl 'https://app.patma.co.uk/api/prospector/v1/demographics/?postcode=' \
  --header 'Authorization: YOUR_SECRET_TOKEN'
{
  "status": "success",
  "response_time": 1,
  "data": {
    "qualifications": {
      "Degree or Similar": 1,
      "2+ A Levels": 1,
      "Apprenticeship": 1,
      "5+ GCSEs, an A-Level or 1-2 AS Levels": 1,
      "1-4 GCSEs": 1,
      "No GCSEs": 1,
      "Other": 1
    },
    "health": {
      "Very Good": 1,
      "Good": 1,
      "Fair": 1,
      "Bad": 1,
      "Very Bad": 1
    },
    "relationships": {
      "Single": 1,
      "Married": 1,
      "Separated": 1,
      "Divorced": 1,
      "Widowed": 1,
      "Same Sex": 1
    },
    "social_grade": {
      "AB - Higher and intermediate managerial, administrative, or professional": 1,
      "C1 - Supervisory, clerical, and junior managerial/administrative/professional": 1,
      "C2 - Skilled manual workers": 1,
      "DE - Semi-skilled and unskilled manual; state benefit/unemployed, & lowest grade": 1
    },
    "economic_activity": {
      "Full-Time Employee": 1,
      "Part-Time Employee": 1,
      "Self Employed": 1,
      "Unemployed": 1,
      "Student": 1,
      "Retired": 1,
      "Looking After Home or Family": 1,
      "Long-Term Sick or Disabled": 1,
      "Other": 1
    },
    "industry": {
      "Agriculture": 1,
      "Mining/Quarrying": 1,
      "Manufacturing": 1,
      "Energy Supply": 1,
      "Water Supply": 1,
      "Construction": 1,
      "Retail": 1,
      "Transportation": 1,
      "Accommodation and Food": 1,
      "Information and Communication": 1,
      "Financial Services": 1,
      "Real Estate": 1,
      "Professional, Scientific and Technical": 1,
      "Administration": 1,
      "Public Administration and Defence": 1,
      "Education": 1,
      "Health": 1,
      "Arts/Entertainment": 1,
      "Other": 1
    },
    "housing_types": {
      "Detached": 1,
      "Semi-Detached": 1,
      "Terraced": 1,
      "Flat (Purpose-Built)": 1,
      "Flat (Converted)": 1,
      "Residence in Commercial Building": 1,
      "Caravan/Park/Temporary": 1
    },
    "housing_tenure": {
      "Owned Outright": 1,
      "Owned with Mortgage": 1,
      "Shared Ownership": 1,
      "Rented: From Council": 1,
      "Rented: Other Social": 1,
      "Rented: Private Landlord": 1,
      "Rented: Private Other": 1,
      "Rent Free": 1
    },
    "housing_occupancy": {
      "One Person": 1,
      "Two People": 1,
      "Three People": 1,
      "Four People": 1,
      "Five People": 1,
      "Six People": 1,
      "Seven People": 1,
      "Eight or More People": 1
    }
  },
  "postcode": "string"
}
deprecated

/api/prospector/v1/designated-areas/

​

Lookup designated (conservation) area classifications for the given postcode.

Query Parameters
  • postcode
    Type: string

    A valid UK postcode

  • lat
    Type: number

    The latitude of a coordinate pair

  • long
    Type: number

    The longitude of a coordinate pair

  • area_types
    Type: array string[] enum
    required

    The type of areas

    values
    • green_belt
    • national_park
    • conservation_area
    • aonb
Responses
  • application/json
  • application/json
Request Example for get/api/prospector/v1/designated-areas/
curl 'https://app.patma.co.uk/api/prospector/v1/designated-areas/?area_types=green_belt' \
  --header 'Authorization: YOUR_SECRET_TOKEN'
{
  "status": "success",
  "response_time": 1,
  "data": {
    "areas": [
      {
        "area_type": "string",
        "within_area": true,
        "within_name": "string"
      }
    ]
  },
  "postcode": "string",
  "lat": 1,
  "long": 1
}
deprecated

/api/prospector/v1/flood-risk/

​

Lookup the distance and risk level for the closest flood risk zone, up to 1km away.

Query Parameters
  • postcode
    Type: string

    A valid UK postcode

  • lat
    Type: number

    The latitude of a coordinate pair

  • long
    Type: number

    The longitude of a coordinate pair

Responses
  • application/json
  • application/json
Request Example for get/api/prospector/v1/flood-risk/
curl https://app.patma.co.uk/api/prospector/v1/flood-risk/ \
  --header 'Authorization: YOUR_SECRET_TOKEN'
{
  "status": "success",
  "response_time": 1,
  "data": {
    "risk_status": "string",
    "flood_risk": "string",
    "distance_to_risk": 1
  },
  "postcode": "string",
  "lat": 1,
  "long": 1
}
deprecated

/api/prospector/v1/geographies/

​

Lookup geographic classifications for the given postcode.

Query Parameters
  • postcode
    Type: string
    required

    A valid UK postcode

Responses
  • application/json
  • application/json
Request Example for get/api/prospector/v1/geographies/
curl 'https://app.patma.co.uk/api/prospector/v1/geographies/?postcode=' \
  --header 'Authorization: YOUR_SECRET_TOKEN'
{
  "status": "success",
  "response_time": 1,
  "data": {
    "county": "string",
    "county_electoral_division": "string",
    "local_authority": "string",
    "electoral_ward": "string",
    "parish": "string",
    "country": "string",
    "parliamentary_constituency": "string",
    "police_force": "string",
    "travel_to_work_area": "string",
    "region": "string",
    "2001_census_oa": "string",
    "2001_census_lsoa": "string",
    "2001_census_msoa": "string",
    "2001_census_oac": "string",
    "nhs_region": "string",
    "european_electoral_region": "string",
    "learning_region": "string",
    "primary_care_trust": "string",
    "international_territorial_level": "string",
    "statistical_ward": "string",
    "census_area_statistics_ward": "string",
    "national_park": "string",
    "built_up_area": "string",
    "built_up_area_sub_division": "string",
    "2011_census_oa": "string",
    "2011_census_lsoa": "string",
    "2011_census_msoa": "string",
    "2011_census_oac": "string",
    "2011_census_workplace_zone": "string",
    "local_enterprise_partnership_first": "string",
    "local_enterprise_partnership_second": "string",
    "integrated_care_board": "string",
    "sub_integrated_care_board": "string",
    "2021_census_oa": "string",
    "2021_census_lsoa": "string",
    "2021_census_msoa": "string",
    "planning_authority": "string",
    "planning_authority_url": "string"
  },
  "postcode": "string"
}

/api/prospector/v1/crime/

​

Lookup police provided crime data around the given postcode.

Query Parameters
  • postcode
    Type: string · Postcode
    max length:  
    10
    required

    A valid UK postcode

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/prospector/v1/crime/
curl 'https://app.patma.co.uk/api/prospector/v1/crime/?postcode='
{
  "data": {
    "above_national_average": [
      "string"
    ],
    "below_national_average": [
      "string"
    ],
    "crime_rating": "Very high",
    "crimes_last_12m": {
      "per_thousand": 1,
      "total": 1,
      "additionalProperty": 1
    },
    "population": 1
  },
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

/api/prospector/v1/schools/

​

List the closest schools centred around a postcode or location.

Query Parameters
  • postcode
    Type: string · Postcode
    max length:  
    10
    nullable

    A valid UK postcode

  • lat
    Type: number · Latnullable

    The latitude of a coordinate pair

  • long
    Type: number · Longnullable

    The longitude of a coordinate pair

  • max_results
    Type: integer · Max Results
    greater than:  
    0
    max:  
    50

    The maximum number of schools to find - not greater than 50

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/prospector/v1/schools/
curl https://app.patma.co.uk/api/prospector/v1/schools/
{
  "data": {
    "schools": [
      {
        "address": "string",
        "boarders": "string",
        "census_date": "string",
        "distance": 1,
        "education_type": "string",
        "establishment_type_group": "string",
        "gender": "string",
        "lat": 1,
        "lng": 1,
        "name": "string",
        "number_of_boys": 1,
        "number_of_girls": 1,
        "official_sixth_form": "string",
        "ofsted_last_inspection": "string",
        "postcode": "string",
        "pupils": "string",
        "rating": "string",
        "religious_character": "string",
        "school_capacity": 1,
        "telephone_number": "string",
        "type_of_establishment": "string",
        "uprn": 1,
        "url": "string",
        "urn": 1
      }
    ]
  },
  "lat": 1,
  "long": 1,
  "num_results": 1,
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

/api/prospector/v2/demographics/

​

Lookup census provided demographic details for the area containing the given postcode.

Query Parameters
  • postcode
    Type: string · Postcode
    max length:  
    10
    required

    A valid UK postcode

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/prospector/v2/demographics/
curl 'https://app.patma.co.uk/api/prospector/v2/demographics/?postcode='
{
  "data": {
    "economic_activity": {
      "Full-Time Employee": 1,
      "Long-Term Sick or Disabled": 1,
      "Looking After Home or Family": 1,
      "Other": 1,
      "Part-Time Employee": 1,
      "Retired": 1,
      "Self Employed": 1,
      "Student": 1,
      "Unemployed": 1
    },
    "health": {
      "Bad": 1,
      "Fair": 1,
      "Good": 1,
      "Very Bad": 1,
      "Very Good": 1
    },
    "housing_occupancy": {
      "Eight or More People": 1,
      "Five People": 1,
      "Four People": 1,
      "One Person": 1,
      "Seven People": 1,
      "Six People": 1,
      "Three People": 1,
      "Two People": 1
    },
    "housing_tenure": {
      "Owned Outright": 1,
      "Owned with Mortgage": 1,
      "Rent Free": 1,
      "Rented: From Council": 1,
      "Rented: Other Social": 1,
      "Rented: Private Landlord": 1,
      "Rented: Private Other": 1,
      "Shared Ownership": 1
    },
    "housing_types": {
      "Caravan/Mobile/Temporary": 1,
      "Detached": 1,
      "Flat (Converted Building)": 1,
      "Flat (Converted House)": 1,
      "Flat (Purpose-Built)": 1,
      "Residence in Commercial Building": 1,
      "Semi-Detached": 1,
      "Terraced": 1
    },
    "industry": {
      "Accommodation and Food": 1,
      "Administration": 1,
      "Agriculture": 1,
      "Arts/Entertainment/Other": 1,
      "Construction": 1,
      "Education": 1,
      "Energy Supply": 1,
      "Financial Services": 1,
      "Health": 1,
      "Information and Communication": 1,
      "Manufacturing": 1,
      "Mining/Quarrying": 1,
      "Professional, Scientific and Technical": 1,
      "Public Administration and Defence": 1,
      "Real Estate": 1,
      "Retail": 1,
      "Transportation": 1,
      "Water Supply": 1
    },
    "qualifications": {
      "1-4 GCSEs": 1,
      "2+ A Levels": 1,
      "5+ GCSEs, an A-Level or 1-2 AS Levels": 1,
      "Apprenticeship": 1,
      "Degree or Similar": 1,
      "No GCSEs": 1,
      "Other": 1
    },
    "relationships": {
      "Civil partnership": 1,
      "Civil partnership dissolved": 1,
      "Divorced": 1,
      "Married": 1,
      "Separated, but still legally in a civil partnership": 1,
      "Separated, but still legally married": 1,
      "Single": 1,
      "Surviving civil partnership partner": 1,
      "Widowed": 1
    },
    "social_grade": {
      "AB - Higher and intermediate managerial, administrative, or professional": 1,
      "C1 - Supervisory, clerical, and junior managerial/administrative/professional": 1,
      "C2 - Skilled manual workers": 1,
      "DE - Semi-skilled and unskilled manual; state benefit/unemployed, & lowest grade": 1
    }
  },
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

/api/prospector/v2/designated-areas/

​

Lookup designated (conservation) area classifications for the given location.

Query Parameters
  • postcode
    Type: string · Postcode
    max length:  
    10
    nullable

    A valid UK postcode

  • lat
    Type: number · Latnullable

    The latitude of a coordinate pair

  • long
    Type: number · Longnullable

    The longitude of a coordinate pair

  • polygon
    Type: string · Polygonnullable

    A GeoJSON compatible polygon in JSON format

  • include_area_polygon
    Type: boolean · Include Area Polygon

    Whether to return intersecting areas as GeoJSON

  • area_types
    Type: array string[] · Area Typesenum
    required

    The type of areas

    • Type: string · enum
      values
      • green_belt
      • national_park
      • conservation_area
      • aonb
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/prospector/v2/designated-areas/
curl 'https://app.patma.co.uk/api/prospector/v2/designated-areas/?area_types=green_belt'
{
  "data": {
    "areas": [
      {
        "area_type": "green_belt",
        "intersects_area": true,
        "intersects_geojson": "string",
        "intersects_name": "string",
        "intersects_reference": "string"
      }
    ]
  },
  "include_area_polygon": false,
  "lat": 1,
  "long": 1,
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

/api/prospector/v2/designated-areas/

​

Lookup designated (conservation) area classifications for the given location.

Body·
required
  • area_types
    Type: array string[] · Area Typesenum
    required

    The type of areas

  • include_area_polygon
    Type: boolean · Include Area Polygon

    Whether to return intersecting areas as GeoJSON

  • lat
    Type: number · Latnullable

    The latitude of a coordinate pair

  • long
    Type: number · Longnullable

    The longitude of a coordinate pair

  • polygon
    Type: string · Polygonnullable

    A GeoJSON compatible polygon in JSON format

  • postcode
    Type: string · Postcode
    max length:  
    10
    nullable

    A valid UK postcode

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/prospector/v2/designated-areas/
curl https://app.patma.co.uk/api/prospector/v2/designated-areas/ \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "area_types": [
    "green_belt"
  ],
  "include_area_polygon": false,
  "lat": 1,
  "long": 1,
  "polygon": "{\"coordinates\": [ [ [ ] ] ], \"type\": \"Polygon\"}",
  "postcode": ""
}'
{
  "data": {
    "areas": [
      {
        "area_type": "green_belt",
        "intersects_area": true,
        "intersects_geojson": "string",
        "intersects_name": "string",
        "intersects_reference": "string"
      }
    ]
  },
  "include_area_polygon": false,
  "lat": 1,
  "long": 1,
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

/api/prospector/v2/flood-risk/

​

Lookup the distance and risk level for flood risk zones, up to 1km away for a postcode.

Query Parameters
  • postcode
    Type: string · Postcode
    max length:  
    10
    nullable

    A valid UK postcode

  • lat
    Type: number · Latnullable

    The latitude of a coordinate pair

  • long
    Type: number · Longnullable

    The longitude of a coordinate pair

  • polygon
    Type: string · Polygonnullable

    A GeoJSON compatible polygon in JSON format

  • include_area_polygon
    Type: boolean · Include Area Polygon

    Whether to return intersecting areas as GeoJSON

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/prospector/v2/flood-risk/
curl https://app.patma.co.uk/api/prospector/v2/flood-risk/
{
  "data": [
    {
      "distance_to_risk": 1,
      "flood_risk": "string",
      "intersects_geojson": "string",
      "risk_status": "string"
    }
  ],
  "include_area_polygon": false,
  "lat": 1,
  "long": 1,
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

/api/prospector/v2/flood-risk/

​

Lookup the distance and risk level for flood risk zones, up to 1km away for a postcode.

Body·
required
  • include_area_polygon
    Type: boolean · Include Area Polygon

    Whether to return intersecting areas as GeoJSON

  • lat
    Type: number · Latnullable

    The latitude of a coordinate pair

  • long
    Type: number · Longnullable

    The longitude of a coordinate pair

  • polygon
    Type: string · Polygonnullable

    A GeoJSON compatible polygon in JSON format

  • postcode
    Type: string · Postcode
    max length:  
    10
    nullable

    A valid UK postcode

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/prospector/v2/flood-risk/
curl https://app.patma.co.uk/api/prospector/v2/flood-risk/ \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "include_area_polygon": false,
  "lat": 1,
  "long": 1,
  "polygon": "{\"coordinates\": [ [ [ ] ] ], \"type\": \"Polygon\"}",
  "postcode": ""
}'
{
  "data": [
    {
      "distance_to_risk": 1,
      "flood_risk": "string",
      "intersects_geojson": "string",
      "risk_status": "string"
    }
  ],
  "include_area_polygon": false,
  "lat": 1,
  "long": 1,
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

/api/prospector/v2/geographies/

​

Lookup geographic classifications for the given location.

Query Parameters
  • postcode
    Type: string · Postcode
    max length:  
    10
    nullable

    A valid UK postcode

  • polygon
    Type: string · Polygonnullable

    A GeoJSON compatible polygon in JSON format

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/prospector/v2/geographies/
curl https://app.patma.co.uk/api/prospector/v2/geographies/
{
  "data": {
    "2001_census_lsoa": [
      "string"
    ],
    "2001_census_msoa": [
      "string"
    ],
    "2001_census_oa": [
      "string"
    ],
    "2001_census_oac": [
      "string"
    ],
    "2011_census_lsoa": [
      "string"
    ],
    "2011_census_msoa": [
      "string"
    ],
    "2011_census_oa": [
      "string"
    ],
    "2011_census_oac": [
      "string"
    ],
    "2011_census_rural_urban_classification": [
      "string"
    ],
    "2011_census_workplace_zone": [
      "string"
    ],
    "2021_census_lsoa": [
      "string"
    ],
    "2021_census_msoa": [
      "string"
    ],
    "2021_census_oa": [
      "string"
    ],
    "2021_census_rural_urban_classification": [
      "string"
    ],
    "built_up_area": [
      "string"
    ],
    "built_up_area_sub_division": [
      "string"
    ],
    "census_area_statistics_ward": [
      "string"
    ],
    "country": [
      "string"
    ],
    "county": [
      "string"
    ],
    "county_electoral_division": [
      "string"
    ],
    "electoral_ward": [
      "string"
    ],
    "european_electoral_region": [
      "string"
    ],
    "integrated_care_board": [
      "string"
    ],
    "international_territorial_level": [
      "string"
    ],
    "learning_region": [
      "string"
    ],
    "local_authority": [
      "string"
    ],
    "local_enterprise_partnership_first": [
      "string"
    ],
    "local_enterprise_partnership_second": [
      "string"
    ],
    "national_park": [
      "string"
    ],
    "nhs_region": [
      "string"
    ],
    "parish": [
      "string"
    ],
    "parliamentary_constituency": [
      "string"
    ],
    "planning_authority": [
      {
        "name": "string",
        "planning_url": [
          "string"
        ]
      }
    ],
    "police_force": [
      "string"
    ],
    "primary_care_trust": [
      "string"
    ],
    "region": [
      "string"
    ],
    "statistical_ward": [
      "string"
    ],
    "sub_integrated_care_board": [
      "string"
    ],
    "travel_to_work_area": [
      "string"
    ]
  },
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

/api/prospector/v2/geographies/

​

Lookup geographic classifications for the given location.

Body·
required
  • polygon
    Type: string · Polygonnullable

    A GeoJSON compatible polygon in JSON format

  • postcode
    Type: string · Postcode
    max length:  
    10
    nullable

    A valid UK postcode

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/prospector/v2/geographies/
curl https://app.patma.co.uk/api/prospector/v2/geographies/ \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "polygon": "{\"coordinates\": [ [ [ ] ] ], \"type\": \"Polygon\"}",
  "postcode": ""
}'
{
  "data": {
    "2001_census_lsoa": [
      "string"
    ],
    "2001_census_msoa": [
      "string"
    ],
    "2001_census_oa": [
      "string"
    ],
    "2001_census_oac": [
      "string"
    ],
    "2011_census_lsoa": [
      "string"
    ],
    "2011_census_msoa": [
      "string"
    ],
    "2011_census_oa": [
      "string"
    ],
    "2011_census_oac": [
      "string"
    ],
    "2011_census_rural_urban_classification": [
      "string"
    ],
    "2011_census_workplace_zone": [
      "string"
    ],
    "2021_census_lsoa": [
      "string"
    ],
    "2021_census_msoa": [
      "string"
    ],
    "2021_census_oa": [
      "string"
    ],
    "2021_census_rural_urban_classification": [
      "string"
    ],
    "built_up_area": [
      "string"
    ],
    "built_up_area_sub_division": [
      "string"
    ],
    "census_area_statistics_ward": [
      "string"
    ],
    "country": [
      "string"
    ],
    "county": [
      "string"
    ],
    "county_electoral_division": [
      "string"
    ],
    "electoral_ward": [
      "string"
    ],
    "european_electoral_region": [
      "string"
    ],
    "integrated_care_board": [
      "string"
    ],
    "international_territorial_level": [
      "string"
    ],
    "learning_region": [
      "string"
    ],
    "local_authority": [
      "string"
    ],
    "local_enterprise_partnership_first": [
      "string"
    ],
    "local_enterprise_partnership_second": [
      "string"
    ],
    "national_park": [
      "string"
    ],
    "nhs_region": [
      "string"
    ],
    "parish": [
      "string"
    ],
    "parliamentary_constituency": [
      "string"
    ],
    "planning_authority": [
      {
        "name": "string",
        "planning_url": [
          "string"
        ]
      }
    ],
    "police_force": [
      "string"
    ],
    "primary_care_trust": [
      "string"
    ],
    "region": [
      "string"
    ],
    "statistical_ward": [
      "string"
    ],
    "sub_integrated_care_board": [
      "string"
    ],
    "travel_to_work_area": [
      "string"
    ]
  },
  "postcode": "string",
  "response_time": 1,
  "status": "success"
}

uprn (Collapsed)

​

rental (Collapsed)

​

asking-prices (Collapsed)

​

properties (Collapsed)

​

stamp-duty (Collapsed)

​

Models