Add an asset to a project
This API endpoint allows you to add an asset to a project. The asset is the main container for all the data and analysis results of a specific asset.
API Endpoint
[POST] https://api.intensel.net/apiv2/add_single_asset/
Request Arguments
Argument | Type | Description |
---|---|---|
project_name | string | The Name of the project. |
asset_data | dict | The data of the asset. |
Asset Data
The asset data is a dictionary with the following keys:
Key | Type | Description |
---|---|---|
name | string | The name of the asset. |
latitude | float | The latitude of the asset. |
longitude | float | The longitude of the asset. |
area | float | The area of the asset. (optional) |
valuation | float | The valuation of the asset. (optional) |
stories | int | The number of stories of the asset. (optional) |
revenue | float | The revenue of the asset. (optional) |
property_type | string | The property type of the asset. (optional) |
ownership | string | The ownership of the asset. (optional) |
replacement_value | float | The replacement value of the asset. (optional) |
The
area
,valuation
,stories
,revenue
,property_type
,ownership
, andreplacement_value
keys are optional and can be omitted if not available.
Request Example
- Python
- JavaScript
- cURL
import requests
URL = "https://api.intensel.net/apiv2/add_single_asset/"
headers = {
'X-Intensel-Api-Key': 'YOUR_API_KEY',
}
payload = {
"project_name": "My Awesome Project",
"asset_data" : {
"name": "Hong Kong Park",
"latitude": 22.424645494250665,
"longitude" : 114.2135547607693,
"area": 2509,
"valuation": 2117.25,
"stories": 3
}
}
response = requests.post(URL, json=payload, headers=headers)
data = response.json()
print(data)
const axios = require("axios");
const URL = "https://api.intensel.net/apiv2/add_single_asset/";
const headers = {
"X-Intensel-Api-Key": "YOUR_API_KEY",
};
const payload = {
project_name: "My Awesome Project",
asset_data: {
name: "Hong Kong Park",
latitude: 22.424645494250665,
longitude: 114.2135547607693,
area: 2509,
valuation: 2117.25,
stories: 3,
},
};
axios
.post(URL, payload, { headers: headers })
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error);
});
curl -X POST "https://api.intensel.net/apiv2/add_single_asset/" \
-H "X-Intensel-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"project_name": "My Awesome Project", "asset_data" : {"name": "Hong Kong Park", "latitude": 22.424645494250665, "longitude" : 114.2135547607693, "area": 2509, "valuation": 2117.25, "stories": 3}}'
Response
The response is a JSON object with the following keys:
{
"message": "Asset added successfully"
}
{
"message": "You have reached your limit of assets. Please Contact Intensel to increase asset limit."
}
Example Response
Add Asset Response JSON -> view response