LandRegistry/local-land-charges-stub

Name: local-land-charges-stub

Owner: HM Land Registry

Description: null

Created: 2017-09-06 14:12:39.0

Updated: 2017-09-14 13:21:05.0

Pushed: 2018-01-24 15:28:02.0

Homepage: null

Size: 73

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Third party Local Land Charges API stub service

The stub service is a stand-a-lone service without any database connectivity or reliance on other service API's. It is developed to return responses to replicate a live service, in many cases these are static files that are returned. It is intended as a tool for third party users to develop services to use the Local Land Charge API.

This is currently an Alpha version and therefore subject to future changes.

Getting Started

Running this service locally will require the following :

To start the service, run the run.sh file in Terminal (i.e. ./run.sh).

Check application is running using http://localhost:9998/health

The base URL for the application will run on http://localhost:9998/v1.0/local-land-charges (See swagger documentation for details of the available endpoints)

The following provides information on available data and responses.

Retrieve a Local Land Charge
Add a Local Land Charge

Requires a valid JSON/Payload for the POST request. See swagger documentation for more details. i.e.


tem": {
"schema-version": "2.0",
"further-information-location": "some further info",
"charge-type": "Planning",
"charge-sub-category": "Change a development",
"expiry-date": "2020-01-01",
"originating-authority": "Place City Council",
"charge-creation-date": "2017-01-12",
"geometry": {
  "type": "FeatureCollection",
  "features": [
    {
      "geometry": {
        "coordinates": [
          294300,
          21054
        ],
        "type": "Point"
      },
      "crs": {
        "type": "name1",
        "properties": {
          "name": "urn:ogc:def:crs:EPSG::27700"
        }
      },
      "type": "Feature",
      "properties": {
        "id": 410
      }
    }
  ]
},
"statutory-provision": "Town and Country Planning Act 1990",
"further-information-reference": "AB1212",
"instrument": "Notice",
"charge-geographic-description": "Varying as LR user"


The service will validate against the JSON schema for mandatory elements. Omitting a mandatory element i.e. charge-type will return an error response, example below


"error_message": {
    "error": "Charge is invalid",
    "details": [
        {
            "location": "$.",
            "error_message": "'charge-type' is a required property"
        }
    ]
},
"error_code": "E100"

Vary and cancel Local Land Charge

For Vary, use any valid JSON/Payload as for 'Add Local Land Charge' example above. The following params can be used for both vary and cancel (no JSON/Payload required for cancel):

Example 1

"error_code": 404,
"error_message": "ID 'LLC-10' cannot be found"

Example 2

"error_code": "E010",
"error_message": "Version ID submitted is not latest version"

Example 3

"error_code": "E400",
"error_message": {
    "details": [{
        "location": "$.item.end-date",
        "error_message": "Cannot amend a cancelled record"
    }],
    "error": "Charge is invalid"
}

NOTE:

Only the following Statutory Provisions are available to use in this stub:-


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.