Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include a X-SSO-API-Key header with the value "{YOUR_AUTH_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can request a token from the Kamma team.
Compliance Endpoints
API endpoint for managing property compliance
Update property compliance.
requires authentication
This endpoint updates the regulation compliance for a specific property.
Example request:
curl --request PATCH \
"https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax/update-compliance" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax/update-compliance"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "PATCH",
headers,
}).then(response => response.json());Example response (200, success):
{
"api_id": "01jsycn2e0tt4e95mq263jcj34",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded."
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, property not found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01jsydtr2djq02n0f5zj19ejy3",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "01jbvtckf6vqaky33n228nw9nr",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This property could not be updated.",
"has_errors": true,
"error_count": 2,
"errors": {
"kamma_id": [
"The kamma id must start with one of the following: kamma:property:.",
"The kamma id format is invalid."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
Returns the clients preferences.
requires authentication
Return a response of a ClientPreference entity by sso_group_id header.
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/client_preferences" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/client_preferences"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01j7dq104vx6ekcd3v5pzmcbhm",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"sso_group_id": 139,
"agent_roles": [
"rentCollection"
],
"agent_instructions": null,
"property_statuses": null,
"created_at": null,
"updated_at": null,
"deleted_at": null,
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This ClientPreference has been shown successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a non-existent sso group):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no client preferences found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Licence Endpoints
Return single licence.
requires authentication
Return a response of a Licence entity by identifier.
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01hqn2q60vzvscwddchw9g3z2j",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"scheme_id": 12345,
"external_ref": "ext-O2ZMqcouP2sTsJc6gRCBD",
"document_ref": "doc-00lsbzlnwi3KARBX475EQ6H172",
"application_ref": "application-00001",
"status": "granted",
"type": "mandatory",
"occupants": 5,
"bedrooms": 4,
"households": 3,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"state": "in_breach",
"kamma_id": "kamma:licence:01hqn1sm2h0fvttywqyrq1943z",
"kamma_property_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"dates": {
"applied": "2020-01-24",
"start": "2020-01-25",
"end": "2025-01-25"
},
"file": null,
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This licence has been shown successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a licence of a property belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no property found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01hc053yv5bn8sx1g6rmqh927y",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "xkamma:licence:01hc052x60mvh7my3e6j8kbs88x",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This licence could not be shown.",
"has_errors": true,
"error_count": 2,
"errors": {
"kamma_id": [
"The kamma id must start with one of the following: kamma:licence:."
],
"licence_id": [
"The licence id field must be a valid ULID."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download licence file.
requires authentication
This will return the file attached to a licence
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf/download" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf/download"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
returns a file
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a licence of a property belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no property found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01hc22y8rht3vw2hg8evn950mk",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "xkamma:licence:01hc224sf7rf1jh1r4jy0n2mw0",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This licence could not be errors.action.download.",
"has_errors": true,
"error_count": 1,
"errors": {
"kamma_id": [
"The kamma id must start with one of the following: kamma:licence:."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload licence file.
requires authentication
This handles the file upload and links the file to the licence
Example request:
curl --request POST \
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf/upload" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
--form "file=@/tmp/phpdMEhLn" const url = new URL(
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf/upload"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "multipart/form-data",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"api_id": "01hc21kmq4qa7y0cpntb6xx53c",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": [
{
"kamma-id": "kamma:file:01HC21KMZTSSB974GFY0HCT0X8",
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This file has been uploaded successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
]
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a licence of a property belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no property found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01hc22y8rht3vw2hg8evn950mk",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "xkamma:licence:01hc224sf7rf1jh1r4jy0n2mw0",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This licence could not be errors.action.download.",
"has_errors": true,
"error_count": 1,
"errors": {
"kamma_id": [
"The kamma id must start with one of the following: kamma:licence:."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update licence.
requires authentication
This endpoint with update an existing Licence entities with the data provided in the request body. The response being a reflection of the updated entities and their state.
Example request:
curl --request PATCH \
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
--data "{
\"scheme_id\": 12,
\"external_ref\": \"asyzwszwtxpeqqi\",
\"document_ref\": \"kymwkiinfowtzmi\",
\"application_ref\": \"xkolowyuffszfrc\",
\"type\": \"selective\",
\"status\": \"exemption\",
\"occupants\": 22,
\"households\": 22,
\"bedrooms\": 23,
\"submitted_by\": \"vxezhebdrxkpiyp\",
\"notes\": \"muihrdifekzagqz\",
\"dates\": {
\"applied\": \"2023-01-01\",
\"start\": \"2023-01-01\",
\"end\": \"2023-09-01\"
},
\"property_id\": \"kamma:property:7ZVPZVRXK5KMACXEVDAAG6HWRZ$\\/i\"
}"
const url = new URL(
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
let body = {
"scheme_id": 12,
"external_ref": "asyzwszwtxpeqqi",
"document_ref": "kymwkiinfowtzmi",
"application_ref": "xkolowyuffszfrc",
"type": "selective",
"status": "exemption",
"occupants": 22,
"households": 22,
"bedrooms": 23,
"submitted_by": "vxezhebdrxkpiyp",
"notes": "muihrdifekzagqz",
"dates": {
"applied": "2023-01-01",
"start": "2023-01-01",
"end": "2023-09-01"
},
"property_id": "kamma:property:7ZVPZVRXK5KMACXEVDAAG6HWRZ$\/i"
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"api_id": "01hc05b5bm0mx9pqkyqtg50sen",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": [
{
"scheme_id": null,
"external_ref": "ext-2",
"document_ref": "doc-",
"application_ref": "application-00001",
"status": "granted",
"type": "selective",
"occupants": 2,
"bedrooms": 2,
"households": 2,
"submitted_by": "Ms Jane Doe",
"notes": "notes on this licence have been updated",
"kamma_id": "kamma:licence:01hc052x60mvh7my3e6j8kbs88",
"kamma_property_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"dates": {
"applied": "2020-01-02",
"start": "2021-01-02",
"end": "2021-01-26"
},
"file": null,
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This licence has been updated successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
]
}
Example response (400, malformed request syntax):
{
"status": {
"http": 400,
"code": 400,
"message": "Bad Request",
"description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (422, invalid params):
{
"api_id": "01hc05c79vqdjg1amth27yrasc",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"external_ref": "ext-2",
"document_ref": "doc-",
"application_ref": "application-00001",
"type": "selective",
"status": "granted",
"occupants": 2,
"households": 2,
"bedrooms": 2,
"submitted_by": "Ms Jane Doe",
"notes": "notes on this licence have been updated",
"dates": {
"applied": "2021-01-05",
"start": "2021-01-02",
"end": "2021-01-26"
},
"kamma_id": "kamma:licence:01hc052x60mvh7my3e6j8kbs88",
"kamma_property_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This licence could not be updated.",
"has_errors": true,
"error_count": 2,
"errors": {
"dates": {
"applied": [
"The dates.applied must be a date before or equal to dates.start."
],
"start": [
"The dates.start must be a date after or equal to dates.applied."
]
}
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete licence.
requires authentication
Remove the specified resource from storage.
Example request:
curl --request DELETE \
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
const url = new URL(
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01hc05hwrw250zrvzfp5fvzqw0",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"kamma_id": "kamma:licence:01hc052x60mvh7my3e6j8kbs88",
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This licence has been deleted successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a licence of a property belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no property found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01hc05gv025xsyjydr9vcgzqm1",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "kkamma:licence:01hc052x60mvh7my3e6j8kbs88",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This licence could not be deleted.",
"has_errors": true,
"error_count": 1,
"errors": {
"kamma_id": [
"The kamma id must start with one of the following: kamma:licence:."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Restore deleted licence.
requires authentication
Restore the specified resource in storage.
Example request:
curl --request PUT \
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf/restore" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/licences/kamma:licence:01hbtw8t50czq6tfc477kexsmf/restore"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01hc061fdz5k38wrv9mnq1rb5h",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"kamma_id": "kamma:licence:01hc052x60mvh7my3e6j8kbs88",
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This licence has been restored successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a licence of a property belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no property found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01hc061yx51xs8w23cx1b0wmer",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "xkamma:licence:01hc052x60mvh7my3e6j8kbs88",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This licence could not be restored.",
"has_errors": true,
"error_count": 1,
"errors": {
"kamma_id": [
"The kamma id must start with one of the following: kamma:licence:."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Return multiple licences.
requires authentication
Return all licences belonging to a property
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax/licences" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax/licences"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01hqn2sdv2hgemy4a71d640b7n",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": [
{
"scheme_id": null,
"external_ref": "ext-1",
"document_ref": "doc-00lnd7l3qp4D8CS643QZM8M2HW",
"application_ref": "application-00001",
"status": "requested",
"type": "mandatory",
"occupants": 5,
"bedrooms": 4,
"households": 3,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"state": null,
"kamma_id": "kamma:licence:01hc004xr5p8n57bzr4j0f05p5",
"kamma_property_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"dates": {
"applied": "2020-01-24",
"start": null,
"end": null
},
"file": null,
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This licence has been listed successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
},
{
"scheme_id": 12345,
"external_ref": "ext-O2ZMqcouP2sTsJc6gRCBD",
"document_ref": "doc-00lsbzlnwi3KARBX475EQ6H172",
"application_ref": "application-00002",
"status": "granted",
"type": "mandatory",
"occupants": 5,
"bedrooms": 4,
"households": 3,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"state": "in_breach",
"kamma_id": "kamma:licence:01hqn1sm2h0fvttywqyrq1943z",
"kamma_property_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"dates": {
"applied": "2020-01-24",
"start": "2020-01-25",
"end": "2025-01-25"
},
"file": null,
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This licence has been listed successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
]
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access licences of a property belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no property found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01hc005nz5hs6avm3q9xcc1j1p",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": null,
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This licence could not be listed.",
"has_errors": true,
"error_count": 2,
"errors": {
"kamma_property_id": [
"The kamma property id must start with one of the following: kamma:property:."
],
"property_id": [
"The property id field must be a valid ULID."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create licence.
requires authentication
This endpoint with create new Licence entities with the newly created data returned within the request body. The response being a reflection of the saved entities and their state.
Example request:
curl --request POST \
"https://property-service.kammadata.com/api/v1/properties/01j93t37d4gsqmwgyc57k557w7/licences" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
--data "[
{
\"scheme_id\": 123,
\"external_ref\": \"ext-12345\",
\"document_ref\": \"doc-12345\",
\"application_ref\": \"application-12345\",
\"status\": \"requested\",
\"type\": \"none\",
\"occupants\": 5,
\"households\": 2,
\"bedrooms\": 15,
\"submitted_by\": \"Joe Smith\",
\"notes\": \"Needs to be reviewed\",
\"dates\": {
\"applied\": \"2023-01-01\",
\"start\": \"2023-01-01\",
\"end\": \"2023-09-01\"
}
}
]"
const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/01j93t37d4gsqmwgyc57k557w7/licences"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
let body = [
{
"scheme_id": 123,
"external_ref": "ext-12345",
"document_ref": "doc-12345",
"application_ref": "application-12345",
"status": "requested",
"type": "none",
"occupants": 5,
"households": 2,
"bedrooms": 15,
"submitted_by": "Joe Smith",
"notes": "Needs to be reviewed",
"dates": {
"applied": "2023-01-01",
"start": "2023-01-01",
"end": "2023-09-01"
}
}
];
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"api_id": "01hqn1sm0zs9983yexp6sv34kz",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": [
{
"scheme_id": null,
"external_ref": "ext-1",
"document_ref": "doc-00lnd7l3qp4D8CS643QZM8M2HW",
"application_ref": "application-00001",
"status": "requested",
"state": null,
"type": "mandatory",
"occupants": 5,
"bedrooms": 4,
"households": 3,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"kamma_id": "kamma:licence:01hc004xr5p8n57bzr4j0f05p5",
"dates": {
"applied": "2020-01-24",
"start": null,
"end": null
},
"file": null,
"data_status": {
"http": 201,
"code": 201,
"message": "Created",
"description": "This licence has been created successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
},
{
"scheme_id": 12345,
"external_ref": "ext-O2ZMqcouP2sTsJc6gRCBD",
"document_ref": "doc-00lsbzlnwi3KARBX475EQ6H172",
"application_ref": "application-00002",
"status": "granted",
"type": "mandatory",
"occupants": 5,
"bedrooms": 4,
"households": 3,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"state": "in_breach",
"kamma_id": "kamma:licence:01hqn1sm2h0fvttywqyrq1943z",
"kamma_property_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"dates": {
"applied": null,
"start": "2020-01-25",
"end": "2025-01-25"
},
"file": null,
"data_status": {
"http": 201,
"code": 201,
"message": "Created",
"description": "This licence has been created successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
]
}
Example response (400, malformed request syntax):
{
"status": {
"http": 400,
"code": 400,
"message": "Bad Request",
"description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (422, invalid params):
{
"api_id": "01hc02kdkxc1g48hjw7s9r8r7y",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": [
{
"scheme_id": null,
"external_ref": "ext-1",
"document_ref": "doc-00lnd949jm3VRJKWWWNQTKKF7A",
"application_ref": "application-00001",
"status": "requested",
"type": "mandatory",
"occupants": 5,
"bedrooms": 4,
"households": 3,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"kamma_id": "kamma:licence:01hc02kdnf79aj5yj37p34an85",
"kamma_property_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"dates": {
"applied": "2020-01-24",
"start": null,
"end": null
},
"file": null,
"data_status": {
"http": 201,
"code": 201,
"message": "Created",
"description": "This licence has been created successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
},
{
"external_ref": "ext-2",
"document_ref": "doc-00lnd949jm3VRJKWWWNQTKKF7A",
"application_ref": "application-00002",
"type": "mandatory",
"status": "granted",
"occupants": 5,
"households": 3,
"bedrooms": 4,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"dates": {
"applied": "2020-01-24",
"start": "2021-01-25",
"end": "2021-01-24"
},
"kamma_id": null,
"kamma_property_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This licence could not be created.",
"has_errors": true,
"error_count": 2,
"errors": {
"dates": {
"start": [
"The dates.start must be a date before dates.end."
],
"end": [
"The dates.end must be a date after dates.start."
]
}
}
}
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Manager Endpoints
API endpoint for managers
Returns all managers.
requires authentication
Return all managers belonging to an sso group id.
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/managers" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/managers"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01kbd5krqez19yn6z32kpfdqar",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": [
{
"id": "01kbczzkdqf2ap6bhkn31f05tp",
"code": "LEID"
},
{
"id": "01kbd01q10q6xfh0wnx0c9kkpq",
"code": "DLA"
},
{
"id": "01kbd09pmvn3f0jt8s81kcbhd5",
"code": "TSE"
}
]
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a non-existent sso group):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Property Endpoints
API endpoint for properties CRUD
All properties.
requires authentication
Returns all properties belondong to an sso group id. Can be filtered.
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/properties?filter%5Baddress%5D=&filter%5Baction_text%5D%5B%5D=&filter%5Bauthority_code%5D=filter%5Bauthority_code%5D%3DEQUAL%3Aons%3Agss%3AE12345678&filter%5Bscheme_type%5D%5B%5D=&filter%5Bfuture_scheme_type%5D%5B%5D=&filter%5Bcompliance_status%5D%5B%5D=&filter%5Bproperty_manager%5D=filter%5Bproperty_manager%5D%3DEQUAL%3AMGR001+or+filter%5Bproperty_manager%5D%3DEQUAL%3ANULL&cursor=culpa&filter[id]=kamma%3Aproperty%3Apasy&filter[has_future_scheme]=&filter[future_scheme][]=REQUIRED&filter[address]=culpa&filter[compliance_status]=culpa&filter[authority_code]=culpa&filter[external_id]=culpa&filter[property_manager]=culpa" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties"
);
const params = {
"filter[address]": "",
"filter[action_text][]": "",
"filter[authority_code]": "filter[authority_code]=EQUAL:ons:gss:E12345678",
"filter[scheme_type][]": "",
"filter[future_scheme_type][]": "",
"filter[compliance_status][]": "",
"filter[property_manager]": "filter[property_manager]=EQUAL:MGR001 or filter[property_manager]=EQUAL:NULL",
"cursor": "culpa",
"filter[id]": "kamma:property:pasy",
"filter[has_future_scheme]": "",
"filter[future_scheme][0]": "REQUIRED",
"filter[address]": "culpa",
"filter[compliance_status]": "culpa",
"filter[authority_code]": "culpa",
"filter[external_id]": "culpa",
"filter[property_manager]": "culpa",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01hqn2ebhat0g8q2qenvdhr1k7",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"meta": {
"per_page": 15,
"current_page": 1,
"total": 1
},
"links": {
"first": "https://property-service.kammadata.com/api/v1/properties?page=1",
"last": "https://property-service.kammadata.com/api/v1/properties?page=1",
"prev": null,
"next": null
},
"data": [
{
"kamma_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"external_id": "3GayVId2IEHGz1nQazRD7",
"friendly_name": "The Prime Minister's house",
"notes": "A very nice house",
"addressing": {
"address": "Prime Minister, 10 Downing Street, London, SW1A 2AA",
"postcode": "SW1A 2AA",
"uprn": 100023336956,
"lat": 51.503541,
"lon": -0.12767,
"authority": "Westminster",
"country_name": "England"
},
"details": {
"occupants": 5,
"households": 3,
"bedrooms": 3,
"storeys": {
"internal": 2,
"external": 1
},
"is_above_commercial": true,
"rent": null,
"valuation": null
},
"classification": {
"category": "s254",
"class": "flat"
},
"plannings": [],
"compliancy": {
"compliant": false,
"action_texts": [
{
"key": "licence_upload",
"description": "Upload a valid licence.",
"action": "Review licence"
},
{
"key": "licence_households",
"description": "Please verify the number of households for the granted licence.",
"action": "Review licence"
}
]
},
"dates": {
"created": "2024-02-27 10:25:38",
"updated": "2024-02-27 10:32:26"
},
"regulations": [
{
"type": "mandatory"
},
{
"type": "additional"
}
],
"scheme": {
"type": "selective",
"required": "MAYBE",
"override": {
"type": "none",
"reason": "Property Is Less Than 10 Years Old",
"created": "2024-12-20"
}
},
"article4": null,
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This property has been listed successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
]
}
Example response (403, when trying to access a property belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no property found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"message": "The sso group id field is required. (and 2 more errors)",
"errors": {
"sso_group_id": [
"The sso group id field is required."
],
"external_id": [
"The external id must be a string.",
"The external id must be at least 1 characters."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Returns a property.
requires authentication
Return a response of a Property entity by $identifier.
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax?exclude_associated=" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax"
);
const params = {
"exclude_associated": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01hqn1yxbtg47hyagxc9nateza",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"kamma_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"external_id": "3GayVId2IEHGz1nQazRD7",
"friendly_name": "The Prime Minister's house",
"notes": "A very nice house",
"addressing": {
"address": "Prime Minister, 10 Downing Street, London, SW1A 2AA",
"postcode": "SW1A 2AA",
"uprn": 100023336956,
"lat": 51.503541,
"lon": -0.12767
},
"details": {
"occupants": 5,
"households": 2,
"bedrooms": 3,
"storeys": {
"internal": 2,
"external": 1
},
"is_above_commercial": true,
"rent": 1250,
"valuation": 5600000
},
"classification": {
"category": "s254",
"class": "flat"
},
"plannings": [],
"agency": {
"office_ids": [
"OXF",
"SOL"
],
"kamma_id": "kamma:agency:01j1a7rt72ftmgj3at8mcy35yx",
"roles": [],
"instructions": [
"letting"
],
"statuses": [
"toLet"
],
"dates": {
"created": null,
"updated": null
}
},
"compliancy": {
"compliant": false,
"action_texts": [
{
"key": "licence_upload",
"description": "Upload a valid licence.",
"action": "Review licence"
},
{
"key": "licence_households",
"description": "Please verify the number of households for the granted licence.",
"action": "Review licence"
}
]
},
"dates": {
"created": "2024-02-27 10:25:38",
"updated": "2024-02-27 10:32:26"
},
"licences": [
{
"scheme_id": 12345,
"external_ref": "ext-O2ZMqcouP2sTsJc6gRCBD",
"document_ref": "doc-00lsbzlnwi3KARBX475EQ6H172",
"application_ref": "application-00001",
"status": "granted",
"type": "mandatory",
"occupants": 5,
"bedrooms": 4,
"households": 3,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"state": "in_breach",
"kamma_id": "kamma:licence:01hqn1sm2h0fvttywqyrq1943z",
"dates": {
"applied": null,
"start": "2020-01-25",
"end": "2025-01-25"
},
"file": null
}
],
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This property has been shown successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a property belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no property found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01hbqwg13kpbbfsgj35e7csaj4",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "01hb8a2kgtfq35516ygtdnhbaxx",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This property could not be shown.",
"has_errors": true,
"error_count": 1,
"errors": {
"kamma_id": [
"The kamma id format is invalid."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create property.
requires authentication
This endpoint with create new property entities with the data provided as array in the request body. The response being a reflection of the saved entities and their state.
Example request:
curl --request POST \
"https://property-service.kammadata.com/api/v1/properties?exclude_associated=" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
--data "[
{
\"external_id\": \"ext-12345\",
\"notes\": \"A very nice house\",
\"friendly_name\": \"The Prime Minister\'s house\",
\"addressing\": {
\"uprn\": \"100023336956\",
\"address\": \"Prime Minister, 10 Downing Street, London, SW1A 2AA\",
\"postcode\": \"SW1A 2AA\",
\"lat\": 51.503541,
\"lon\": -0.12767,
\"distance_to_refdata\": 10
},
\"details\": {
\"occupants\": 5,
\"bedrooms\": 15,
\"households\": 5,
\"rent\": 360000,
\"valuation\": 10000000,
\"value\": 12000000,
\"storeys\": {
\"internal\": 2,
\"external\": 1
},
\"is_above_commercial\": true
},
\"classification\": {
\"category\": \"s254\",
\"class\": \"flat\"
},
\"agency\": {
\"roles\": [
\"culpa\"
],
\"instructions\": [
\"culpa\"
],
\"statuses\": [
\"culpa\"
],
\"office_ids\": [
\"culpa\"
]
},
\"extra\": {
\"custom_field\": \"value\",
\"another_field\": 123
}
}
]"
const url = new URL(
"https://property-service.kammadata.com/api/v1/properties"
);
const params = {
"exclude_associated": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
let body = [
{
"external_id": "ext-12345",
"notes": "A very nice house",
"friendly_name": "The Prime Minister's house",
"addressing": {
"uprn": "100023336956",
"address": "Prime Minister, 10 Downing Street, London, SW1A 2AA",
"postcode": "SW1A 2AA",
"lat": 51.503541,
"lon": -0.12767,
"distance_to_refdata": 10
},
"details": {
"occupants": 5,
"bedrooms": 15,
"households": 5,
"rent": 360000,
"valuation": 10000000,
"value": 12000000,
"storeys": {
"internal": 2,
"external": 1
},
"is_above_commercial": true
},
"classification": {
"category": "s254",
"class": "flat"
},
"agency": {
"roles": [
"culpa"
],
"instructions": [
"culpa"
],
"statuses": [
"culpa"
],
"office_ids": [
"culpa"
]
},
"extra": {
"custom_field": "value",
"another_field": 123
}
}
];
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"api_id": "01hqn1je2g2v3pm9p1c5gjyrye",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": [
{
"kamma_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"external_id": "3GayVId2IEHGz1nQazRD7",
"friendly_name": "The Prime Minister's house",
"notes": "A very nice house",
"addressing": {
"address": "Prime Minister, 10 Downing Street, London, SW1A 2AA",
"postcode": "SW1A 2AA",
"uprn": 100023336956,
"lat": 51.503541,
"lon": -0.12767
},
"details": {
"occupants": 5,
"households": 5,
"bedrooms": 15,
"storeys": {
"internal": 2,
"external": 1
},
"is_above_commercial": true,
"rent": 1250,
"valuation": 5600000
},
"classification": {
"category": "s254",
"class": "flat"
},
"plannings": [],
"agency": {
"office_ids": [
"OXF",
"SOL"
],
"kamma_id": "kamma:agency:01j1a7rt72ftmgj3at8mcy35yx",
"roles": [],
"instructions": [
"letting"
],
"statuses": [
"toLet"
],
"dates": {
"created": null,
"updated": null
}
},
"compliancy": {
"compliant": false,
"action_texts": [
{
"key": "missing_licence",
"description": "Add a valid licence.",
"action": "Review licence"
}
]
},
"dates": {
"created": "2024-02-27 10:25:38",
"updated": "2024-02-27 10:25:38"
},
"licences": [],
"data_status": {
"http": 201,
"code": 201,
"message": "Created",
"description": "This property has been created successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
]
}
Example response (400, malformed request syntax):
{
"status": {
"http": 400,
"code": 400,
"message": "Bad Request",
"description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (422, invalid params):
{
"api_id": "01hbx1rk76vy27k5eyydphtcvd",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": [
{
"external_id": "00lnbknv0dCBA32RKM9019E966",
"friendly_name": "floofy",
"notes": "These are my notes!",
"kamma_id": "kamma:property:01hbx1rkgt1jdc7c0rek06g7n1",
"addressing": {
"address": "Prime Minister & First Lord Of The Treasury, 10 Downing Street, London",
"postcode": "SW1A 2AA",
"uprn": 19
},
"details": {
"occupants": 5,
"households": 4,
"bedrooms": 3,
"storeys": {
"internal": 12,
"external": 14
},
"is_above_commercial": true,
"rent": 360000,
"valuation": 5600000
},
"classification": {
"category": "single",
"class": "flat"
},
"dates": {
"created": "2020-01-24",
"updated": "2021-01-25"
},
"data_status": {
"http": 201,
"code": 201,
"message": "Created",
"description": "This property has been created successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
},
{
"external_id": "00lnbknv0dCBA32RKM9019E966",
"friendly_name": "floofy",
"notes": "These are my notes!",
"address": {
"uprn": "19",
"address": "Prime Minister & First Lord Of The Treasury, 10 Downing Street, London",
"postcode": "SW1A 2AA"
},
"details": {
"occupants": 5,
"bedrooms": 3,
"households": 4,
"storeys": {
"internal": 12,
"external": 14
},
"is_above_commercial": true,
"rent": 360000,
"valuation": 5600000,
"s257": true
},
"classification": {
"category": "single",
"class": "flat"
},
"licence": {
"external_ref": "ext-00lnbknv0dCBA32RKM9019E966",
"document_ref": "ref-00lnbknv0dCBA32RKM9019E966",
"application_ref": "application-00001",
"type": "mandatory",
"status": "requested",
"occupants": 5,
"households": 3,
"bedrooms": 4,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"dates": {
"applied": "2020-01-24",
"start": "2020-01-25",
"end": "2025-01-25"
}
},
"planning": {
"status": "inprogress",
"reference": "ref-12345"
},
"sso_group_id": 1,
"kamma_id": null,
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This property could not be created.",
"has_errors": true,
"error_count": 3,
"errors": {
"external_id": [
"The external id must be unique within the specified SSO group or property."
],
"addressing": {
"address": [
"The addressing.address field is required."
],
"postcode": [
"The addressing.postcode field is required."
]
}
}
}
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update property.
requires authentication
This endpoint will update an existing property entities with the data provided in the request body. The response being a reflection of the updated entities and their state.
Example request:
curl --request PATCH \
"https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax?exclude_associated=" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
--data "{
\"external_id\": \"ext-12345\",
\"notes\": \"A very nice house\",
\"friendly_name\": \"The Prime Minister\'s house\",
\"addressing\": {
\"uprn\": \"100023336956\",
\"address\": \"Prime Minister, 10 Downing Street, London, SW1A 2AA\",
\"postcode\": \"SW1A 2AA\",
\"lat\": 51.503541,
\"lon\": -0.12767
},
\"details\": {
\"occupants\": 9,
\"bedrooms\": 10,
\"households\": 24,
\"rent\": 360000,
\"valuation\": 10000000,
\"storeys\": {
\"internal\": 11,
\"external\": 8
},
\"is_above_commercial\": true,
\"value\": 12000000
},
\"classification\": {
\"category\": \"pbsa\"
},
\"agency\": {
\"roles\": [
\"culpa\"
],
\"instructions\": [
\"culpa\"
],
\"statuses\": [
\"culpa\"
],
\"office_ids\": [
\"culpa\"
],
\"property_manager\": \"fowtzmixkolowyu\",
\"dates\": {
\"created\": \"2013-04-20\",
\"updated\": \"2083-11-11\"
}
},
\"extra\": {
\"custom_field\": \"value\",
\"another_field\": 123
}
}"
const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax"
);
const params = {
"exclude_associated": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
let body = {
"external_id": "ext-12345",
"notes": "A very nice house",
"friendly_name": "The Prime Minister's house",
"addressing": {
"uprn": "100023336956",
"address": "Prime Minister, 10 Downing Street, London, SW1A 2AA",
"postcode": "SW1A 2AA",
"lat": 51.503541,
"lon": -0.12767
},
"details": {
"occupants": 9,
"bedrooms": 10,
"households": 24,
"rent": 360000,
"valuation": 10000000,
"storeys": {
"internal": 11,
"external": 8
},
"is_above_commercial": true,
"value": 12000000
},
"classification": {
"category": "pbsa"
},
"agency": {
"roles": [
"culpa"
],
"instructions": [
"culpa"
],
"statuses": [
"culpa"
],
"office_ids": [
"culpa"
],
"property_manager": "fowtzmixkolowyu",
"dates": {
"created": "2013-04-20",
"updated": "2083-11-11"
}
},
"extra": {
"custom_field": "value",
"another_field": 123
}
};
fetch(url, {
method: "PATCH",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"api_id": "01hqn2kk85qk0f3f7fdc00g66r",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"kamma_id": "kamma:property:01hqn1jeag1kvhe3tgr4jba0fe",
"external_id": "O2ZMqcouP2sTsJc6gRCBD",
"friendly_name": "The Prime Minister's house",
"notes": "A very nice house",
"addressing": {
"address": "Prime Minister, 10 Downing Street, London, SW1A 2AA",
"postcode": "SW1A 2AA",
"uprn": 100023336956,
"lat": 51.503541,
"lon": -0.12767
},
"details": {
"occupants": 5,
"households": 4,
"bedrooms": 3,
"storeys": {
"internal": 1,
"external": 2
},
"is_above_commercial": true,
"rent": 360000,
"valuation": 10000000
},
"classification": {
"category": "s254",
"class": "flat"
},
"plannings": [],
"agency": {
"office_ids": [
"OXF",
"SOL"
],
"kamma_id": "kamma:agency:01j1a7rt72ftmgj3at8mcy35yx",
"roles": [],
"instructions": [
"letting"
],
"statuses": [
"toLet"
],
"dates": {
"created": null,
"updated": null
}
},
"compliancy": {
"compliant": false,
"action_texts": [
{
"key": "licence_upload",
"description": "Upload a valid licence.",
"action": "Review licence"
},
{
"key": "licence_occupants",
"description": "Please verify the number of occupants for the granted licence.",
"action": "Review licence"
},
{
"key": "licence_households",
"description": "Please verify the number of households for the granted licence.",
"action": "Review licence"
}
]
},
"dates": {
"created": "2024-02-27 10:25:38",
"updated": "2024-02-27 10:43:44"
},
"licences": [
{
"scheme_id": 12345,
"external_ref": "ext-O2ZMqcouP2sTsJc6gRCBD",
"document_ref": "doc-00lsbzlnwi3KARBX475EQ6H172",
"application_ref": "application-00001",
"status": "granted",
"type": "mandatory",
"occupants": 5,
"bedrooms": 4,
"households": 3,
"submitted_by": "Mr John Doe",
"notes": "notes on this licence",
"state": "in_breach",
"kamma_id": "kamma:licence:01hqn1sm2h0fvttywqyrq1943z",
"dates": {
"applied": null,
"start": "2020-01-25",
"end": "2025-01-25"
},
"file": null
}
],
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This property has been updated successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (400, malformed request syntax):
{
"status": {
"http": 400,
"code": 400,
"message": "Bad Request",
"description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (422, invalid params):
{
"api_id": "01hbxfzqqnz6h3ewj3hvxqcpx7",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"friendly_name": "floofy",
"notes": "These are my notes!",
"addressing": {
"uprn": "1",
"address": "Prime Minister & First Lord Of The Treasury, 10 Downing Street, London",
"postcode": "SW1A 2Az"
},
"details": {
"occupants": "test",
"bedrooms": 1,
"households": 1,
"storeys": {
"internal": 1,
"external": 1
},
"is_above_commercial": true,
"rent": 10000,
"valuation": 100000
},
"classification": {
"category": "single",
"class": "flat"
},
"property_id": "01hbxdxmr0d1hw4427wwe93dzx",
"kamma_id": "kamma:property:01hbxdxmr0d1hw4427wwe93dzx",
"sso_group_id": 1,
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This property could not be updated.",
"has_errors": true,
"error_count": 1,
"errors": {
"details": {
"occupants": [
"The details.occupants must be an integer."
]
}
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Property.
requires authentication
Remove the specified resource from storage.
Example request:
curl --request DELETE \
"https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax?cleanup=1" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/kamma:property:01hb8a2kgtfq35516ygtdnhbax"
);
const params = {
"cleanup": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01jtnnsx2ayf18dkmz412zj094",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"kamma_id": "kamma:property:01hb8a2kgtfq35516ygtdnhbax",
"licences": [
{
"id": "kamma:licence:01hb8a2kgtfq35516ygtdnhbax",
"file": {
"id": "kamma:file:01hb8a2kgtfq35516ygtdnhbax"
}
}
],
"permissions": [],
"tenancies": [],
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This property has been deleted successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (400, malformed request syntax):
{
"status": {
"http": 400,
"code": 400,
"message": "Bad Request",
"description": "Cannot delete property as there are associated objects linked to it"
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (422, invalid params):
{
"api_id": "01hbxh510khdmg19xccxzc5zgs",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "xkamma:property:asdasdassdas",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This property could not be deleted.",
"has_errors": true,
"error_count": 2,
"errors": {
"kamma_id": [
"The kamma id must start with one of the following: kamma:property:.",
"The kamma id format is invalid."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Restore Property.
requires authentication
Restore the specified resource in storage.
Example request:
curl --request PUT \
"https://property-service.kammadata.com/api/v1/properties/restore/kamma:property:01hb8a2kgtfq35516ygtdnhbax" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/restore/kamma:property:01hb8a2kgtfq35516ygtdnhbax"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01hbxjacb3se7fhcz6rff7grza",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"kamma_id": "kamma:property:01hbxja5971yf4cpr0mwdpbnhd",
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This property has been restored successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (400, malformed request syntax):
{
"status": {
"http": 400,
"code": 400,
"message": "Bad Request",
"description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)."
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (422, invalid params):
{
"api_id": "01hbxjbz4gyrx94qvxzdq3jrh1",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"kamma_id": "01hbxja5971yf4cpr0mwdpbnhd",
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This property could not be restored.",
"has_errors": true,
"error_count": 2,
"errors": {
"kamma_id": [
"The kamma id must start with one of the following: kamma:property:.",
"The kamma id format is invalid."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Property Export
Export properties.
requires authentication
Returns all properties belonging to an sso group id as a CSV file. Supports the same filters as the index endpoint.
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/properties/export?filter%5Baddress%5D[]=culpa&filter%5Baction_text%5D%5B%5D[]=culpa&filter%5Bauthority_code%5D=culpa&filter%5Bscheme_type%5D%5B%5D[]=culpa&filter%5Bcompliance_status%5D%5B%5D[]=culpa&filter%5Bproperty_manager%5D=filter%5Bproperty_manager%5D%3DEQUAL%3AMGR001+or+filter%5Bproperty_manager%5D%3DEQUAL%3ANULL&cursor=culpa&filter[id]=kamma%3Aproperty%3Apasy&filter[has_future_scheme]=&filter[future_scheme][]=REQUIRED&filter[address]=culpa&filter[compliance_status]=culpa&filter[authority_code]=culpa&filter[external_id]=culpa&filter[property_manager]=culpa" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/export"
);
const params = {
"filter[address][0]": "culpa",
"filter[action_text][][0]": "culpa",
"filter[authority_code]": "culpa",
"filter[scheme_type][][0]": "culpa",
"filter[compliance_status][][0]": "culpa",
"filter[property_manager]": "filter[property_manager]=EQUAL:MGR001 or filter[property_manager]=EQUAL:NULL",
"cursor": "culpa",
"filter[id]": "kamma:property:pasy",
"filter[has_future_scheme]": "",
"filter[future_scheme][0]": "REQUIRED",
"filter[address]": "culpa",
"filter[compliance_status]": "culpa",
"filter[authority_code]": "culpa",
"filter[external_id]": "culpa",
"filter[property_manager]": "culpa",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (202, success):
{
"job_id": "d6ed0850-ab66-4339-b9fd-ad9998540d6a",
"status": "pending",
"status_url": "/api/v1/properties/export/d6ed0850-ab66-4339-b9fd-ad9998540d6a/status"
}
Example response (403, when trying to access properties belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no properties found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"message": "The sso group id field is required. (and 2 more errors)",
"errors": {
"sso_group_id": [
"The sso group id field is required."
],
"external_id": [
"The external id must be a string.",
"The external id must be at least 1 characters."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Check export job status.
requires authentication
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/properties/export/550e8400-e29b-41d4-a716-446655440000/status" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/export/550e8400-e29b-41d4-a716-446655440000/status"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, job in progress):
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"processed": 750,
"total": 1500
}
Example response (200, job completed):
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"processed": 1500,
"total": 1500,
"download_url": "/api/v1/properties/export/550e8400-e29b-41d4-a716-446655440000/download"
}
Example response (404, job not found):
{
"message": "Export job not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Download completed export.
requires authentication
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/properties/export/550e8400-e29b-41d4-a716-446655440000/download" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/export/550e8400-e29b-41d4-a716-446655440000/download"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200, success):
"reference id",address,postcode,lat,lon,authority,country,people,households,bedrooms,"current licencing requirements","future licencing requirements","licence required","start date","end date","action required","licence type","licence status","compliance status","property created","property updated"
BGL250306,"Flat C, 18 Denbigh Street, London, SW1V 2ER","SW1V 2ER",51.491579,-0.139493,Westminster,England,1,0,1,"mandatory, additional (consultation), additional",selective,unknown,,,"Add occupancy information.",,,"not compliant","2025-09-09 08:13:47","2025-10-23 16:24:05"
Example response (404, job not found or not completed):
{
"message": "Export not found or not ready"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Spot Check Endpoints
API endpoint for spotcheck CRUD
Get spotchecks.
requires authentication
Retrieves spotchecks for retrieval later
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/spotchecks?cursor=eyJpZCI6MTUsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0&page=1&per_page=20" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/spotchecks"
);
const params = {
"cursor": "eyJpZCI6MTUsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"page": "1",
"per_page": "20",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01k42x62xpyks3vzc81mngznm9",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"meta": {
"per_page": 10,
"path": "https://property-service.kamma.localhost/api/v1/spotchecks",
"total": 1
},
"links": {
"before": null,
"after": null
},
"data": [
{
"address": "10, Charles Street, OX4 3AS",
"postcode": "OX4 3AS",
"uprn": null,
"category": null,
"class": null,
"is_above_commercial": false,
"storeys": null,
"households": 1,
"occupants": 1,
"determination_date": null,
"spot_check_response": {
"id": "1",
"links": [
{
"rel": "self",
"href": "https://apiv3.kamma.localhost/v3/determinations/check"
}
],
"status": {
"code": 200,
"message": "OK"
},
"schemes": [
{
"link": "https://www.oxford.gov.uk/info/20237/properties_that_need_an_hmo_licence/926/houses_or_flats_that_need_an_hmo_licence",
"type": "mandatory",
"date_end": null,
"required": "not_required",
"occupants": 5,
"scheme_id": "kamma:scheme:418",
"date_start": "2006-04-01",
"households": 2,
"is_advised": false,
"consultation": false,
"required_future": "not_applicable"
},
{
"link": "https://www.oxford.gov.uk/houses-multiple-occupation-hmos/hmo-licensing-2021-public-notice",
"type": "additional",
"date_end": "2026-06-09",
"required": "not_required",
"occupants": 3,
"scheme_id": "kamma:scheme:730",
"date_start": "2021-06-10",
"households": 2,
"is_advised": false,
"consultation": false,
"required_future": "not_applicable"
},
{
"link": "https://www.oxford.gov.uk/info/20010/housing/1520/selective_licensing/2",
"type": "selective",
"date_end": "2027-08-31",
"required": "required",
"occupants": 1,
"scheme_id": "kamma:scheme:808",
"date_start": "2022-09-01",
"households": 1,
"is_advised": true,
"consultation": false,
"required_future": "not_applicable"
}
],
"planning": [
{
"link": "https://www.oxford.gov.uk/planning-policy/planning-control-houses-multiple-occupation",
"type": "article4",
"date_end": null,
"required": "not_required",
"date_start": "2012-02-25",
"is_advised": false,
"planning_id": "kamma:planning:78",
"consultation": false,
"required_future": "not_applicable"
}
],
"advice_text": {
"scheme": {
"future": "There is currently no confirmed scheme with a future start date affecting this property.",
"current": "Selective licence is required.",
"mandatory": "A Mandatory licensing scheme covers the whole of Oxford. This scheme is permanent and includes all HMOs with at least 5 people since October 1st 2018.",
"selective": "A Selective licensing scheme covers the whole of Oxford. This scheme ends on August 31st 2027 and includes all rented properties no matter how many people live there.",
"additional": "An Additional licensing scheme covers the whole of Oxford. This scheme ends on June 9th 2026 and includes all types of HMOs with at least 3 people on 1 storey."
},
"planning": {
"future": "",
"current": "",
"article4": "An Article 4 direction covers the whole of Oxford. This direction began on February 25th 2012 requiring planning permission development rights when converting land and buildings from a C3 class to a C4 class."
}
},
"saved_status": null
},
"kamma_id": "kamma:check:01k42tjap7m2t18cpd2m4krwk6"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get single spot check.
requires authentication
Retrieves a single spot check by its kamma ID
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/spotchecks/kamma:check:01hb8a2kgtfq35516ygtdnhbax" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
--data "{
\"spotcheck_id\": \"kamma:check:7ZVPZVRXK5KMACXEVDAAG6HWRZ$\\/i\"
}"
const url = new URL(
"https://property-service.kammadata.com/api/v1/spotchecks/kamma:check:01hb8a2kgtfq35516ygtdnhbax"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
let body = {
"spotcheck_id": "kamma:check:7ZVPZVRXK5KMACXEVDAAG6HWRZ$\/i"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"api_id": "01k42ws6zsz2rc1shy0hay1gqc",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"address": "10, Charles Street, OX4 3AS",
"postcode": "OX4 3AS",
"uprn": null,
"category": null,
"class": null,
"is_above_commercial": false,
"storeys": null,
"households": 1,
"occupants": 1,
"determination_date": null,
"spot_check_response": {
"id": "1",
"links": [
{
"rel": "self",
"href": "https://apiv3.kamma.localhost/v3/determinations/check"
}
],
"status": {
"code": 200,
"message": "OK"
},
"schemes": [
{
"link": "https://www.oxford.gov.uk/info/20237/properties_that_need_an_hmo_licence/926/houses_or_flats_that_need_an_hmo_licence",
"type": "mandatory",
"date_end": null,
"required": "not_required",
"occupants": 5,
"scheme_id": "kamma:scheme:418",
"date_start": "2006-04-01",
"households": 2,
"is_advised": false,
"consultation": false,
"required_future": "not_applicable"
},
{
"link": "https://www.oxford.gov.uk/houses-multiple-occupation-hmos/hmo-licensing-2021-public-notice",
"type": "additional",
"date_end": "2026-06-09",
"required": "not_required",
"occupants": 3,
"scheme_id": "kamma:scheme:730",
"date_start": "2021-06-10",
"households": 2,
"is_advised": false,
"consultation": false,
"required_future": "not_applicable"
},
{
"link": "https://www.oxford.gov.uk/info/20010/housing/1520/selective_licensing/2",
"type": "selective",
"date_end": "2027-08-31",
"required": "required",
"occupants": 1,
"scheme_id": "kamma:scheme:808",
"date_start": "2022-09-01",
"households": 1,
"is_advised": true,
"consultation": false,
"required_future": "not_applicable"
}
],
"planning": [
{
"link": "https://www.oxford.gov.uk/planning-policy/planning-control-houses-multiple-occupation",
"type": "article4",
"date_end": null,
"required": "not_required",
"date_start": "2012-02-25",
"is_advised": false,
"planning_id": "kamma:planning:78",
"consultation": false,
"required_future": "not_applicable"
}
],
"advice_text": {
"scheme": {
"future": "There is currently no confirmed scheme with a future start date affecting this property.",
"current": "Selective licence is required.",
"mandatory": "A Mandatory licensing scheme covers the whole of Oxford. This scheme is permanent and includes all HMOs with at least 5 people since October 1st 2018.",
"selective": "A Selective licensing scheme covers the whole of Oxford. This scheme ends on August 31st 2027 and includes all rented properties no matter how many people live there.",
"additional": "An Additional licensing scheme covers the whole of Oxford. This scheme ends on June 9th 2026 and includes all types of HMOs with at least 3 people on 1 storey."
},
"planning": {
"future": "",
"current": "",
"article4": "An Article 4 direction covers the whole of Oxford. This direction began on February 25th 2012 requiring planning permission development rights when converting land and buildings from a C3 class to a C4 class."
}
},
"saved_status": null
},
"kamma_id": "kamma:check:01k42tjap7m2t18cpd2m4krwk6",
"data_status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "This spot check has been shown successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, when trying to access a spot check belonging to another company):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (404, no spot check found):
{
"api_id": "01hbqqrmhsjgfpgnttsnc2jneq",
"status": {
"http": 404,
"code": 404,
"message": "Not Found",
"description": "The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web."
}
}
Example response (422, invalid params):
{
"api_id": "01k42xm8e2gpc72pseabk4v2hs",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This spot check could not be shown.",
"has_errors": true,
"error_count": 2,
"errors": {
"spotcheck_id": [
"The spotcheck id must start with one of the following: kamma:check:.",
"The spotcheck id format is invalid."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Save spot check.
requires authentication
Saves spot checks for retrieval later
Example request:
curl --request POST \
"https://property-service.kammadata.com/api/v1/spotchecks/save" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/spotchecks/save"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"api_id": "01k42xh18bxpb2wm2nwbtkxx0j",
"status": {
"http": 201,
"code": 201,
"message": "Created",
"description": "The request succeeded, and a new resource was created as a result. This is typically the response sent after POST requests, or some PUT requests.",
"has_errors": false,
"error_count": 0
},
"data": {
"address": "10, Charles Street, OX4 3AS",
"postcode": "OX4 3AS",
"uprn": null,
"category": null,
"class": null,
"is_above_commercial": false,
"storeys": null,
"determination_date": null,
"households": 1,
"occupants": 1,
"spot_check_response": {
"hey": true
},
"kamma_id": "kamma:check:01k42xh1ng5123gsrkh2ag2k09",
"data_status": {
"http": 201,
"code": 201,
"message": "Created",
"description": "This spot check has been created successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (422, invalid params):
{
"message": "The addressing.uprn must be between 1 and 12 digits. (and 3 more errors)",
"errors": {
"addressing.uprn": [
"The addressing.uprn must be between 1 and 12 digits.",
"It looks like the uprn is incorrect. Please check both the uprn and the postcode."
],
"category": [
"The selected category is invalid."
],
"class": [
"The selected class is invalid."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Statistics Endpoints
API endpoints for property statistics
Get property statistics.
requires authentication
Returns statistics about properties including total count, compliance status, and other metrics.
Example request:
curl --request GET \
--get "https://property-service.kammadata.com/api/v1/properties/stats?exclude_determinations=1" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5"const url = new URL(
"https://property-service.kammadata.com/api/v1/properties/stats"
);
const params = {
"exclude_determinations": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"$schema": "https://apiv3.kamma.localhost/schemas/PortfolioStatsBody.json",
"total_properties": 285,
"info_needed_count": 218,
"licence_required_count": 10,
"compliant_count": 9,
"compliance_percentage": 3,
"action_texts": {
"error": 46,
"licence_additional_scheme": 0,
"licence_applied_date": 0,
"licence_expired": 2,
"licence_households": 0,
"licence_mandatory_scheme": 0,
"licence_occupants": 0,
"licence_rejected": 0,
"licence_requested": 3,
"licence_start_date": 0,
"licence_upload": 0,
"mismatch_coordinates": 92,
"missing_coordinates": 28,
"missing_licence": 10,
"none": 2,
"occupancy": 190,
"verify_address": 155
},
"determinations": {
"additional": {
"licenced": 1,
"maybe": 1,
"required": 2,
"unlicenced": 2
},
"mandatory": {
"licenced": 1,
"maybe": 0,
"required": 6,
"unlicenced": 5
},
"selective": {
"licenced": 0,
"maybe": 0,
"required": 9,
"unlicenced": 9
},
"unknown": {
"licenced": 0,
"unknown": 0,
"unlicenced": 0
}
},
"future_determinations": {
"additional": {
"licenced": 0,
"maybe": 0,
"required": 0,
"unlicenced": 0
},
"mandatory": {
"licenced": 0,
"maybe": 0,
"required": 0,
"unlicenced": 0
},
"selective": {
"licenced": 0,
"maybe": 0,
"required": 0,
"unlicenced": 0
},
"unknown": {
"licenced": 0,
"unknown": 85,
"unlicenced": 85
}
},
"status": {
"code": 200,
"message": "OK"
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
User Endpoints
API endpoint for users CRUD
Create user.
requires authentication
This endpoint creates a new user. It's a tempororary solution which we plan to replace with an SSO endpoint.
Example request:
curl --request POST \
"https://property-service.kammadata.com/api/v1/users" \
--header "X-SSO-API-Key: {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-SSO-Group-ID: 5" \
--data "{
\"name\": \"pasyzwszwtxpeqq\",
\"email\": \"tremayne.kohler@example.net\"
}"
const url = new URL(
"https://property-service.kammadata.com/api/v1/users"
);
const headers = {
"X-SSO-API-Key": "{YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
"X-SSO-Group-ID": "5",
};
let body = {
"name": "pasyzwszwtxpeqq",
"email": "tremayne.kohler@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"api_id": "01hg86yr3bvbqtd99a8ydnxsx7",
"status": {
"http": 200,
"code": 200,
"message": "OK",
"description": "The request succeeded.",
"has_errors": false,
"error_count": 0
},
"data": {
"id": 14,
"sso_group_id": 139,
"name": "Joe Biden",
"email": "joe.biden@whitehouse.org",
"origin": "reapit",
"created_at": "2023-11-27T10:59:43.000000Z",
"updated_at": "2023-11-27T10:59:43.000000Z",
"data_status": {
"http": 201,
"code": 201,
"message": "Created",
"description": "This user has been created successfully.",
"has_errors": false,
"error_count": 0,
"errors": []
}
}
}
Example response (401, unauthorized):
{
"api_id": "01hbx1y74q1c63fgvkcyg6d4te",
"status": {
"http": 401,
"code": 401,
"message": "Unauthorized",
"description": "Missing or invalid Kamma SSO API key."
}
}
Example response (403, forbidden):
{
"api_id": "01hbqr0x9cfbe31grhpvaz99fe",
"status": {
"http": 403,
"code": 403,
"message": "Forbidden",
"description": "You are not permitted to access the specified resource."
}
}
Example response (422, invalid params):
{
"api_id": "01hg87desyf7zgzw9bjsgxfwf8",
"status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "The request was well-formed but was unable to be followed due to semantic errors.",
"has_errors": true,
"error_count": 1
},
"data": {
"data_status": {
"http": 422,
"code": 422,
"message": "Unprocessable Content",
"description": "This user could not be created.",
"has_errors": true,
"error_count": 1,
"errors": {
"email": [
"The email field is required."
]
}
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.