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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
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.
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"
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):
land-charge-id=LLC-10, version-id=3, Response=“ID 'LLC-10' cannot be found”, status_code 404, see Example 1 below
land-charge-id=LLC-10, version-id=anything but 3, Response=“Version ID submitted is not latest version”, status_code 422, see Example 2 below
land-charge-id=LLC-99, version-id=any integer value(no decimals), Response=“Cannot amend a cancelled record”, status_code 400, see Example 3 below
any other valid params returns a good response
"error_code": 404,
"error_message": "ID 'LLC-10' cannot be found"
"error_code": "E010",
"error_message": "Version ID submitted is not latest version"
"error_code": "E400",
"error_message": {
"details": [{
"location": "$.item.end-date",
"error_message": "Cannot amend a cancelled record"
}],
"error": "Charge is invalid"
}
Only the following Statutory Provisions are available to use in this stub:-