MENU navbar-image

Introduction

Kamma HMO Checker API docs.

Welcome to the Kamma HMO Checker API documentation!

Base URL

https://hmo-checker.api.kammadata.com

Authenticating requests

To authenticate requests, include a parameter api_key in the body of the request.

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by speaking to one of the Kamma development team.

HMO Checking

API's for checking HMO status' for given property details.

HMO Checker.

requires authentication

Determine the HMO state for a given address, determining if the given UPRN has ever had an HMO licence.

Example request:
curl --request POST \
    "https://hmo-checker.api.kammadata.com/api/hmo-check" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"api_key\": \"aa22aabaab12bbab212abaa1ba1b112b\",
    \"address\": \"Prime Minister & First Lord of the Treasury, 10 Downing Street, SW1A 2AA\",
    \"postcode\": \"SW1A 2AA\",
    \"uprn\": \"100023336956\"
}"
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://hmo-checker.api.kammadata.com/api/hmo-check',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'api_key' => 'aa22aabaab12bbab212abaa1ba1b112b',
            'address' => 'Prime Minister & First Lord of the Treasury, 10 Downing Street, SW1A 2AA',
            'postcode' => 'SW1A 2AA',
            'uprn' => '100023336956',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://hmo-checker.api.kammadata.com/api/hmo-check"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "api_key": "aa22aabaab12bbab212abaa1ba1b112b",
    "address": "Prime Minister & First Lord of the Treasury, 10 Downing Street, SW1A 2AA",
    "postcode": "SW1A 2AA",
    "uprn": "100023336956"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://hmo-checker.api.kammadata.com/api/hmo-check'
payload = {
    "api_key": "aa22aabaab12bbab212abaa1ba1b112b",
    "address": "Prime Minister & First Lord of the Treasury, 10 Downing Street, SW1A 2AA",
    "postcode": "SW1A 2AA",
    "uprn": "100023336956"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200, when a licence uprn match is found for an HMO):


{
    "api_id": "918cf0cc-75ba-4459-a19f-27bb45de9acf",
    "status": {
        "code": 200,
        "message": "OK",
        "description": "Success",
        "error": 0
    },
    "has_hmo_licence": "HMO",
    "description": "The UPRN is valid. There is or was a Mandatory or Additional licence for the property, thus the property should be considered an HMO."
}
 

Example response (200, when a licence uprn match is found for a non-HMO):


{
    "api_id": "918cf0cc-75ba-4459-a19f-27bb45de9acf",
    "status": {
        "code": 200,
        "message": "OK",
        "description": "Success",
        "error": 0
    },
    "has_hmo_licence": "Not HMO",
    "description": "The UPRN is valid. There is or was a Selective licence for the property, but should not be considered an HMO."
}
 

Example response (200, when no licence match is found):


{
    "api_id": "918cf0cc-75ba-4459-a19f-27bb45de9acf",
    "status": {
        "code": 200,
        "message": "OK",
        "description": "Success",
        "error": 0
    },
    "has_hmo_licence": "Has not been a Local Authority licensed HMO",
    "description": "The UPRN is valid. However, there is no record of any current or past licence for that property across the Mandatory, Additional or Selective schemes."
}
 

Example response (403, when there is an invalid or missing api_key):


{
    "api_id": "918cf195-dc12-42ee-9b70-444ebd2de370",
    "status": {
        "code": 403,
        "message": "Forbidden",
        "description": "Missing or invalid API key",
        "error": 110
    }
}
 

Example response (422, when there are validation errors with the request body parameters):


{
    "api_id": "918cf154-a1f9-49cd-8778-b9ea7dd07784",
    "status": {
        "code": 422,
        "message": "Unprocessable Entity",
        "description": "The given data was invalid.",
        "error": 130,
        "validation_errors": {
            "uprn": [
                "The uprn field is required."
            ]
        }
    }
}
 

Example response (422, when the given UPRN is invalid):


{
    "api_id": "918cf154-a1f9-49cd-8778-b9ea7dd07784",
    "status": {
        "code": 422,
        "message": "Unprocessable Entity",
        "description": "The given UPRN was invalid.",
        "error": 150
    }
}
 

Example response (422, when the given UPRN is not found):


{
    "api_id": "918cf154-a1f9-49cd-8778-b9ea7dd07784",
    "status": {
        "code": 422,
        "message": "Unprocessable Entity",
        "description": "The given UPRN was not found.",
        "error": 160
    }
}
 

Example response (500, when there are internal issues with the Kamma SDK):


{
    "api_id": "4d51b620-59b0-40fe-8bb5-6f80e1ba4269",
    "status": {
        "code": 500,
        "message": "Internal Error",
        "description": "An internal error has occurred, this has been logged. If this issue persists please contact Kamma.",
        "error": 140
    }
}
 

Request      

POST api/hmo-check

Body Parameters

api_key  string  

The API key used to authorise the request. Must be 32 characters.

address  string  

The full address of the property to be checked. Must not be greater than 1000 characters.

postcode  string  

The postcode of the property to be checked. Must not be greater than 8 characters.

uprn  string  

The UPRN of the property to be checked. Must not be greater than 12 characters.

Response

Response Fields

api_id  string  

The UUID if the API request.

status  object  

The response status information.

status.code  integer  

The HTTP response status code.

status.message  string  

The HTTP response status message, relating to the code.

status.description  string  

The reason for the given status code and message.

status.error  integer  

The internal reference error code for the given error type.

status.validation_errors  object  

The validation errors that discovered when validating request body parameters, broken down my body parameter name and array of validation errors applying to said parameter.

has_hmo_licence  string  

The HMO state determination.

description  string  

The HMO state determination reason given as human readable prose.