Name: dm-deed-api
Owner: HM Land Registry
Description: null
Created: 2015-11-03 11:59:52.0
Updated: 2016-01-12 11:48:47.0
Pushed: 2016-06-21 14:05:27.0
Homepage: null
Size: 505
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The Deed API is a JSON API which stores deed objects.
This API holds the functionality for creating the migrating tables, getting data from the database and putting a new JSON deed onto a database that returns an endpoint to that deed.
The API also holds the functionality to capture personal information provided and save it in a separate table to be used at a later date for matching.
/health # test endpoint for the application
/deed/<id_> # get a deed with an id in the URL
/deed/ # Create a deed by posting a json object reflecting the schema
te /borrowers/delete/<borrower_id> # delete a borrower from the borrower table
schema for post
install -r requirements.txt
ce run.sh
Run the Migration
on manage.py db upgrade
Add a migration
on manage.py db revision --autogenerate
For some helpful documentation on using alembic go here
Run the unit tests
ce test.sh
See, the following link for information on how to run the acceptance tests:-
The Deed requires a title number and at least 1 borrower
The schema can be found below
s://github.com/LandRegistry/dm-deed-api/blob/develop/application/deed/schema.json
Example payload:
"title_number": "DT100",
"md_ref": "e-MD12344",
"borrowers": [
{
"forename": "Paul",
"middle_name": "James",
"surname": "Smythe",
"gender": "Male",
"address": "2 The Street, Plymouth, PL1 2PP",
"dob": "01/10/1976",
"phone_number": "07502159062"
},
{
"forename": "Jane",
"surname": "Smythe",
"gender": "Female",
"address": "2 The Street, Plymouth, PL1 2PP",
"dob": "01/12/1982",
"phone_number": "07502154999"
}
],
"identity_checked": "Y",
"property_address": "5 The Drive, This Town, This County, PL4 4TH"