Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1171 lines
33 KiB

{
"openapi": "3.0.0",
"info": {
"title": "DLUHC CORE Data",
"version": "1.0",
"description": "Submit or Update CORE Case Log Data on Lettings and Sales of Social Housing in England"
},
"servers": [
{
"url": "https://dluhc-core.london.cloudapps.digital",
"description": "Staging"
}
],
"paths": {
"/logs/:id": {
"parameters": [],
"get": {
"summary": "Get Case Log Info by Case Log ID",
"tags": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Case-Log"
},
"examples": {}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
},
"examples": {
"Not found": {
"value": {
"error": "Case Log 67 not found"
}
}
}
}
}
}
},
"operationId": "get-case_logs-case_logs-:id",
"description": "Retrieve data for a specific case log",
"parameters": [
{
"schema": {
"type": "string",
"enum": ["application/json"]
},
"in": "header",
"name": "Accept",
"required": true
}
]
},
"patch": {
"summary": "Update Case Log Information",
"operationId": "patch-case_logs-case_logs-:id",
"responses": {
"200": {
"description": "Case Log Updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Case-Log"
},
"examples": {}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
},
"examples": {
"Not found": {
"value": {
"error": "Case Log 67 not found"
}
}
}
}
}
},
"422": {
"description": "Unprocessable Entity ",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
},
"examples": {
"Invalid Age": {
"value": {
"errors": {
"age1": ["Tenant age must be between 16 and 120"]
}
}
}
}
}
}
}
},
"description": "Update the information of an existing case log",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Case-Log"
},
"examples": {}
}
},
"description": "Patch case log properties to update."
},
"parameters": [
{
"schema": {
"type": "string",
"enum": ["application/json"]
},
"in": "header",
"name": "Accept",
"required": true
}
]
},
"delete": {
"summary": "Delete a Case Log by Case Log ID",
"operationId": "delete-case_logs-:id",
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
},
"examples": {
"Not found": {
"value": {
"error": "Case Log 67 not found"
}
}
}
}
}
}
},
"description": "Delete a case log",
"parameters": [
{
"schema": {
"type": "string",
"enum": ["application/json"]
},
"in": "header",
"name": "Accept",
"required": true
}
]
}
},
"/logs": {
"post": {
"summary": "Create New Case Log",
"operationId": "post-caselog",
"responses": {
"201": {
"description": "Case Log Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Case-Log"
},
"examples": {}
}
}
},
"422": {
"description": "Unprocessable Entity ",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
},
"examples": {
"Invalid Age and Reasonable Preference": {
"value": {
"errors": {
"reasonable_preference_reason": [
"If reasonable preference is Yes, a reason must be given"
],
"age1": ["Tenant age must be between 16 and 120"]
}
}
}
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Case-Log"
},
"examples": {}
}
},
"description": "Post the necessary fields for the API to create a new case log."
},
"description": "Create a new case log.",
"parameters": [
{
"schema": {
"type": "string",
"pattern": "application/json",
"enum": ["application/json"]
},
"in": "header",
"name": "Accept",
"required": true
}
]
},
"parameters": []
}
},
"components": {
"schemas": {
"Case-Log": {
"description": "",
"type": "object",
"x-examples": {
"example-1": {
"tenant_code": "T657",
"age1": 35,
"sex1": "Female",
"ethnic": "White: English, Welsh, Scottish, Northern Irish or British",
"national": "UK national resident in UK",
"prevten": "Private sector tenancy",
"armedforces": "Yes, the person is a current or former regular",
"ecstat1": "Full-time - 30 hours or more",
"other_hhmemb": 7,
"relat2": "Partner",
"age2": 32,
"sex2": "Male",
"ecstat2": "Not seeking work",
"relat3": "Child - includes young adult and grown-up",
"age3": 12,
"sex3": "Male",
"ecstat3": "Child under 16",
"relat4": "Child - includes young adult and grown-up",
"age4": 12,
"sex4": "Female",
"ecstat4": "Child under 16",
"relat5": "Child - includes young adult and grown-up",
"age5": 10,
"sex5": "Non-binary",
"ecstat5": "Child under 16",
"relat6": "Child - includes young adult and grown-up",
"age6": 5,
"sex6": "Prefer not to say",
"ecstat6": "Child under 16",
"relat7": "Child - includes young adult and grown-up",
"age7": 5,
"sex7": "Prefer not to say",
"ecstat7": "Child under 16",
"relat8": "Child - includes young adult and grown-up",
"age8": 2,
"sex8": "Prefer not to say",
"ecstat8": "Child under 16",
"homeless": "No",
"reason": "Other problems with neighbours",
"underoccupation_benefitcap": "No",
"leftreg": "No",
"reservist": "No",
"illness": "Yes",
"preg_occ": "No",
"accessibility_requirements": "No",
"condition_effects": "dummy",
"tenancy_code": "BZ757",
"startdate": "12/03/2019",
"startertenancy": "No",
"tenancylength": "No",
"tenancy": "Secure (including flexible)",
"landlord": "This landlord",
"la": "Barnet",
"previous_postcode": "NW1 5TY",
"property_relet": "No",
"rsnvac": "Relet - tenant abandoned property",
"property_reference": "P9876",
"unittype_gn": "House",
"property_building_type": "dummy",
"beds": 3,
"property_void_date": "03/11/2019",
"majorrepairs": "No",
"mrcdate": "05/05/2020",
"offered": 2,
"wchair": true,
"earnings": 1000,
"incfreq": "Monthly",
"benefits": "Some",
"hb": "Universal Credit with housing element (excluding housing benefit)",
"period": "Weekly",
"brent": 200,
"scharge": 50,
"pscharge": 40,
"supcharg": 35,
"tcharge": 325,
"tshortfall": "Yes",
"layear": "1 year but under 2 years",
"lawaitlist": "Less than 1 year",
"prevloc": "Ashford",
"property_postcode": "SE2 6RT",
"reasonpref": "Yes",
"reasonable_preference_reason": "dummy",
"cbl": true,
"chr": false,
"cap": false,
"hbrentshortfall": "Yes",
"other_reason_for_leaving_last_settled_home": "Other reason",
"housingneeds_a": true,
"housingneeds_b": false,
"housingneeds_c": false,
"housingneeds_f": false,
"housingneeds_g": false,
"housingneeds_h": false,
"accessibility_requirements_prefer_not_to_say": false,
"illness_type_1": false,
"illness_type_2": true,
"illness_type_3": false,
"illness_type_4": false,
"illness_type_8": false,
"illness_type_5": false,
"illness_type_6": false,
"illness_type_7": false,
"illness_type_9": false,
"illness_type_10": false,
"condition_effects_prefer_not_to_say": false,
"rp_homeless": false,
"rp_insan_unsat": false,
"rp_medwel": false,
"rp_hardship": false,
"rp_dontknow": true
}
},
"title": "Case Log",
"x-internal": false,
"properties": {
"tenant_code": {
"type": "string",
"minLength": 1
},
"age1": {
"type": "number",
"description": "The age of the lead tenant",
"maximum": 120,
"minimum": 0
},
"sex1": {
"type": "string",
"minLength": 1,
"enum": ["Female", "Male", "Non-binary", "Prefer not to say"]
},
"ethnic": {
"type": "string",
"minLength": 1,
"enum": [
"White: English, Welsh, Scottish, Northern Irish or British",
"White: Irish",
"White: Gypsy or Irish Traveller",
"White: Other",
"Mixed: White and Black Caribbean",
"Mixed: White and Black African",
"Mixed: White and Asian",
"Mixed: Other",
"Asian or Asian British: Indian",
"Asian or Asian British: Pakistani",
"Asian or Asian British: Bangladeshi",
"Asian or Asian British: Chinese",
"Asian or Asian British: Other",
"Black: Caribbean",
"Black: African",
"Black: Other",
"Other Ethnic Group: Arab",
"Other Ethnic Group: Other",
"Prefer not to say"
]
},
"national": {
"type": "string",
"minLength": 1,
"enum": [
"UK national resident in UK",
"A current or former reserve in the UK Armed Forces (excluding National Service)",
"UK national returning from residence overseas",
"Czech Republic",
"Estonia",
"Hungary",
"Latvia",
"Lithuania",
"Poland",
"Slovakia",
"Bulgaria",
"Romania",
"Ireland",
"Other EU Economic Area (EEA country)",
"Any other country",
"Prefer not to say"
]
},
"prevten": {
"type": "string",
"minLength": 1
},
"armedforces": {
"type": "string",
"minLength": 1
},
"ecstat1": {
"type": "string",
"minLength": 1,
"enum": [
"Part-time - Less than 30 hours",
"Full-time - 30 hours or more",
"In government training into work, such as New Deal",
"Jobseeker",
"Retired",
"Not seeking work",
"Full-time student",
"Unable to work because of long term sick or disability",
"Child under 16",
"Other",
"Prefer not to say"
]
},
"other_hhmemb": {
"type": "number",
"minimum": 0,
"maximum": 7
},
"relat2": {
"type": "string",
"minLength": 1,
"enum": [
"Partner",
"Child - includes young adult and grown-up",
"Other",
"Prefer not to say"
]
},
"age2": {
"type": "number",
"maximum": 120,
"minimum": 0
},
"sex2": {
"type": "string",
"minLength": 1,
"enum": ["Female", "Male", "Non-binary", "Prefer not to say"]
},
"ecstat2": {
"type": "string",
"minLength": 1,
"enum": [
"Part-time - Less than 30 hours",
"Full-time - 30 hours or more",
"In government training into work, such as New Deal",
"Jobseeker",
"Retired",
"Not seeking work",
"Full-time student",
"Unable to work because of long term sick or disability",
"Child under 16",
"Other",
"Prefer not to say"
]
},
"relat3": {
"type": "string",
"minLength": 1,
"enum": [
"Partner",
"Child - includes young adult and grown-up",
"Other",
"Prefer not to say"
]
},
"age3": {
"type": "number",
"maximum": 120,
"minimum": 0
},
"sex3": {
"type": "string",
"minLength": 1,
"enum": ["Female", "Male", "Non-binary", "Prefer not to say"]
},
"ecstat3": {
"type": "string",
"minLength": 1,
"enum": [
"Part-time - Less than 30 hours",
"Full-time - 30 hours or more",
"In government training into work, such as New Deal",
"Jobseeker",
"Retired",
"Not seeking work",
"Full-time student",
"Unable to work because of long term sick or disability",
"Child under 16",
"Other",
"Prefer not to say"
]
},
"relat4": {
"type": "string",
"minLength": 1,
"enum": [
"Partner",
"Child - includes young adult and grown-up",
"Other",
"Prefer not to say"
]
},
"age4": {
"type": "number",
"maximum": 120,
"minimum": 0
},
"sex4": {
"type": "string",
"minLength": 1,
"enum": ["Female", "Male", "Non-binary", "Prefer not to say"]
},
"ecstat4": {
"type": "string",
"minLength": 1,
"enum": [
"Part-time - Less than 30 hours",
"Full-time - 30 hours or more",
"In government training into work, such as New Deal",
"Jobseeker",
"Retired",
"Not seeking work",
"Full-time student",
"Unable to work because of long term sick or disability",
"Child under 16",
"Other",
"Prefer not to say"
]
},
"relat5": {
"type": "string",
"minLength": 1,
"enum": [
"Partner",
"Child - includes young adult and grown-up",
"Other",
"Prefer not to say"
]
},
"age5": {
"type": "number",
"maximum": 120,
"minimum": 0
},
"sex5": {
"type": "string",
"minLength": 1,
"enum": ["Female", "Male", "Non-binary", "Prefer not to say"]
},
"ecstat5": {
"type": "string",
"minLength": 1,
"enum": [
"Part-time - Less than 30 hours",
"Full-time - 30 hours or more",
"In government training into work, such as New Deal",
"Jobseeker",
"Retired",
"Not seeking work",
"Full-time student",
"Unable to work because of long term sick or disability",
"Child under 16",
"Other",
"Prefer not to say"
]
},
"relat6": {
"type": "string",
"minLength": 1,
"enum": [
"Partner",
"Child - includes young adult and grown-up",
"Other",
"Prefer not to say"
]
},
"age6": {
"type": "number",
"maximum": 120,
"minimum": 0
},
"sex6": {
"type": "string",
"minLength": 1,
"enum": ["Female", "Male", "Non-binary", "Prefer not to say"]
},
"ecstat6": {
"type": "string",
"minLength": 1,
"enum": [
"Part-time - Less than 30 hours",
"Full-time - 30 hours or more",
"In government training into work, such as New Deal",
"Jobseeker",
"Retired",
"Not seeking work",
"Full-time student",
"Unable to work because of long term sick or disability",
"Child under 16",
"Other",
"Prefer not to say"
]
},
"relat7": {
"type": "string",
"minLength": 1,
"enum": [
"Partner",
"Child - includes young adult and grown-up",
"Other",
"Prefer not to say"
]
},
"age7": {
"type": "number",
"maximum": 120,
"minimum": 0
},
"sex7": {
"type": "string",
"minLength": 1,
"enum": ["Female", "Male", "Non-binary", "Prefer not to say"]
},
"ecstat7": {
"type": "string",
"minLength": 1,
"enum": [
"Part-time - Less than 30 hours",
"Full-time - 30 hours or more",
"In government training into work, such as New Deal",
"Jobseeker",
"Retired",
"Not seeking work",
"Full-time student",
"Unable to work because of long term sick or disability",
"Child under 16",
"Other",
"Prefer not to say"
]
},
"relat8": {
"type": "string",
"minLength": 1,
"enum": [
"Partner",
"Child - includes young adult and grown-up",
"Other",
"Prefer not to say"
]
},
"age8": {
"type": "number",
"maximum": 120,
"minimum": 0
},
"sex8": {
"type": "string",
"minLength": 1,
"enum": ["Female", "Male", "Non-binary", "Prefer not to say"]
},
"ecstat8": {
"type": "string",
"minLength": 1,
"enum": [
"Part-time - Less than 30 hours",
"Full-time - 30 hours or more",
"In government training into work, such as New Deal",
"Jobseeker",
"Retired",
"Not seeking work",
"Full-time student",
"Unable to work because of long term sick or disability",
"Child under 16",
"Other",
"Prefer not to say"
]
},
"homeless": {
"type": "string",
"minLength": 1
},
"reason": {
"type": "string",
"minLength": 1,
"enum": [
"Permanently decanted from another property owned by this landlord",
"Left home country as a refugee",
"Loss of tied accommodation",
"Domestic abuse",
"Relationship breakdown (non-violent) with partner",
"Asked to leave by family or friends",
"Racial harassment",
"Other problems with neighbours",
"Property unsuitable because of overcrowding",
"End of assured shorthold tenancy - no fault",
"End of assured shorthold tenancy - eviction or tenant at fault",
"End of fixed term tenancy - no fault",
"End of fixed term tenancy - eviction or tenant at fault",
"Repossession",
"Under occupation - offered incentive to downsize",
"Under occupation - no incentive",
"Property unsuitable because of ill health or disability",
"Property unsuitable because of poor condition",
3 years ago
"Couldn’t afford fees attached to renewing the tenancy",
"Couldn’t afford increase in rent",
"Couldn’t afford rent or mortgage - welfare reforms",
"Couldn’t afford rent or mortgage - employment",
"Couldn’t afford rent or mortgage - other",
"To move nearer to family, friends or school",
"To move nearer to work",
"To move to accommodation with support",
"To move to independent accommodation",
"Hate crime",
"Death of household member in last settled accommodation",
"Discharged from prison",
"Discharged from long stay hospital or similar institution",
"Other",
"Don’t know",
"Tenant prefers not to say"
]
},
"underoccupation_benefitcap": {
"type": "string",
"minLength": 1,
"enum": [
"Yes - benefit cap",
"Yes - removal of the spare room subsidy",
"Yes - both",
"No",
"Don’t know",
"Prefer not to say"
]
},
"leftreg": {
"type": "string",
"minLength": 1
},
"reservist": {
"type": "string",
"minLength": 1
},
"illness": {
"type": "string",
"minLength": 1
},
"preg_occ": {
"type": "string",
"minLength": 1
},
"accessibility_requirements": {
"type": "string",
"minLength": 1
},
"condition_effects": {
"type": "string",
"minLength": 1
},
"tenancy_code": {
"type": "string",
"minLength": 1
},
"startdate": {
"type": "string",
"minLength": 1
},
"startertenancy": {
"type": "string",
"minLength": 1
},
"tenancylength": {
"type": "string",
"minLength": 1,
"pattern": "((?!1|0)([0-9][0-9]))+"
},
"tenancy": {
"type": "string",
"minLength": 1
},
"lettype": {
"type": "string",
"minLength": 1
},
"landlord": {
"type": "string",
"minLength": 1
},
"la": {
"type": "string",
"minLength": 1
},
"previous_postcode": {
"type": "string",
"minLength": 1
},
"property_relet": {
"type": "string",
"minLength": 1
},
"rsnvac": {
"type": "string",
"minLength": 1
},
"property_reference": {
"type": "string",
"minLength": 1
},
"unittype_gn": {
"type": "string",
"minLength": 1
},
"property_building_type": {
"type": "string",
"minLength": 1
},
"beds": {
"type": "number"
},
"property_void_date": {
"type": "string",
"minLength": 1
},
"majorrepairs": {
"type": "string",
"minLength": 1
},
"mrcdate": {
"type": "string",
"minLength": 1
},
"offered": {
"type": "number"
},
"wchair": {
"type": "boolean"
},
"earnings_known": {
"type": "string",
"minLength": 1,
"enum": ["Yes", "No", "Tenant prefers not to say"]
},
"earnings": {
"type": "number"
},
"incfreq": {
"type": "string",
"minLength": 1
},
"benefits": {
"type": "string",
"minLength": 1,
"enum": ["All", "Some", "None", "Don’t know"]
},
"hb": {
"type": "string",
"minLength": 1
},
"period": {
"type": "string",
"minLength": 1
},
"brent": {
"type": "number"
},
"scharge": {
"type": "number"
},
"pscharge": {
"type": "number"
},
"supcharg": {
"type": "number"
},
"tcharge": {
"type": "number"
},
"tshortfall": {
"type": "string",
"minLength": 1
},
"layear": {
"type": "string",
"minLength": 1
},
"lawaitlist": {
"type": "string",
"minLength": 1
},
"prevloc": {
"type": "string",
"minLength": 1
},
"property_postcode": {
"type": "string",
"minLength": 1
},
"reasonpref": {
"type": "string",
"minLength": 1
},
"reasonable_preference_reason": {
"type": "string",
"minLength": 1
},
"cbl": {
"type": "boolean"
},
"chr": {
"type": "boolean"
},
"cap": {
"type": "boolean"
},
"hbrentshortfall": {
"type": "number"
},
"other_reason_for_leaving_last_settled_home": {
"type": "string",
"minLength": 1
},
"housingneeds_a": {
"type": "boolean"
},
"housingneeds_b": {
"type": "boolean"
},
"housingneeds_c": {
"type": "boolean"
},
"housingneeds_f": {
"type": "boolean"
},
"housingneeds_g": {
"type": "boolean"
},
"housingneeds_h": {
"type": "boolean"
},
"accessibility_requirements_prefer_not_to_say": {
"type": "boolean"
},
"illness_type_1": {
"type": "boolean"
},
"illness_type_2": {
"type": "boolean"
},
"illness_type_3": {
"type": "boolean"
},
"illness_type_4": {
"type": "boolean"
},
"illness_type_8": {
"type": "boolean"
},
"illness_type_5": {
"type": "boolean"
},
"illness_type_6": {
"type": "boolean"
},
"illness_type_7": {
"type": "boolean"
},
"illness_type_9": {
"type": "boolean"
},
"illness_type_10": {
"type": "boolean"
},
"condition_effects_prefer_not_to_say": {
"type": "boolean"
},
"rp_homeless": {
"type": "boolean"
},
"rp_insan_unsat": {
"type": "boolean"
},
"rp_medwel": {
"type": "boolean"
},
"rp_hardship": {
"type": "boolean"
},
"rp_dontknow": {
"type": "boolean"
},
"other_tenancy-type": {
"type": "string",
"example": "private tenancy"
}
},
"required": [
"tenant_code",
"age1",
"sex1",
"ethnic",
"national",
"prevten",
"armedforces",
"ecstat1",
"other_hhmemb",
"relat2",
"age2",
"sex2",
"ecstat2",
"relat3",
"age3",
"sex3",
"ecstat3",
"relat4",
"age4",
"sex4",
"ecstat4",
"relat5",
"age5",
"sex5",
"ecstat5",
"relat6",
"age6",
"sex6",
"ecstat6",
"relat7",
"age7",
"sex7",
"ecstat7",
"relat8",
"age8",
"sex8",
"ecstat8",
"homeless",
"reason",
"underoccupation_benefitcap",
"leftreg",
"reservist",
"illness",
"preg_occ",
"accessibility_requirements",
"condition_effects",
"tenancy_code",
"startdate",
"startertenancy",
"tenancylength",
"tenancy",
"lettype",
"landlord",
"la",
"previous_postcode",
"property_relet",
"rsnvac",
"property_reference",
"unittype_gn",
"property_building_type",
"beds",
"property_void_date",
"majorrepairs",
"mrcdate",
"offered",
"wchair",
"earnings",
"incfreq",
"benefits",
"hb",
"period",
"brent",
"scharge",
"pscharge",
"supcharg",
"tcharge",
"tshortfall",
"layear",
"lawaitlist",
"prevloc",
"property_postcode",
"reasonpref",
"reasonable_preference_reason",
"cbl",
"chr",
"cap",
"hbrentshortfall",
"other_reason_for_leaving_last_settled_home",
"housingneeds_a",
"housingneeds_b",
"housingneeds_c",
"housingneeds_f",
"housingneeds_g",
"housingneeds_h",
"accessibility_requirements_prefer_not_to_say",
"illness_type_1",
"illness_type_2",
"illness_type_3",
"illness_type_4",
"illness_type_8",
"illness_type_5",
"illness_type_6",
"illness_type_7",
"illness_type_9",
"illness_type_10",
"condition_effects_prefer_not_to_say",
"rp_homeless",
"rp_insan_unsat",
"rp_medwel",
"rp_hardship",
"rp_dontknow",
"other_tenancy-type",
"earnings_known"
]
}
},
"securitySchemes": {
"API Key - 1": {
"name": "API Key",
"type": "apiKey",
"in": "query"
},
"API Key - 2": {
"name": "API Key",
"type": "apiKey",
"in": "query"
}
}
}
}