Get Fixed Asset by ID
curl --request GET \
--url https://api.clemta.com/fixed-assets/{fixed_asset_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.clemta.com/fixed-assets/{fixed_asset_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.clemta.com/fixed-assets/{fixed_asset_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clemta.com/fixed-assets/{fixed_asset_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.clemta.com/fixed-assets/{fixed_asset_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.clemta.com/fixed-assets/{fixed_asset_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clemta.com/fixed-assets/{fixed_asset_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Fixed asset retrieved successfully",
"data": {
"id": "64b8f1a2e4b0c8d9f0123456",
"created_at": 1640995200,
"updated_at": 1640995200,
"title": "Office Computer",
"placed_in_service": 1640995200,
"cost": 1500,
"salvage_value": 150,
"business_use": 100,
"fixed_asset_number": 1,
"fixed_asset_number_text": "AST-1"
}
}{
"success": false,
"message": "Invalid request data",
"data": null,
"error": {
"code": "INVALID_REQUEST",
"details": "Field 'name' is required"
}
}{
"success": false,
"message": "API key is required",
"data": null,
"error": {
"code": "API_KEY_REQUIRED",
"details": ""
}
}{
"success": false,
"message": "Fixed asset not found",
"data": null,
"error": {
"code": "NOT_FOUND",
"details": ""
}
}{
"success": false,
"message": "Internal server error",
"data": null,
"error": {
"code": "INTERNAL_ERROR",
"details": "An unexpected error occurred."
}
}Fixed Assets API
Get Fixed Asset
Retrieve a specific fixed asset by its ID
GET
/
fixed-assets
/
{fixed_asset_id}
Get Fixed Asset by ID
curl --request GET \
--url https://api.clemta.com/fixed-assets/{fixed_asset_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.clemta.com/fixed-assets/{fixed_asset_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.clemta.com/fixed-assets/{fixed_asset_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clemta.com/fixed-assets/{fixed_asset_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.clemta.com/fixed-assets/{fixed_asset_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.clemta.com/fixed-assets/{fixed_asset_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clemta.com/fixed-assets/{fixed_asset_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Fixed asset retrieved successfully",
"data": {
"id": "64b8f1a2e4b0c8d9f0123456",
"created_at": 1640995200,
"updated_at": 1640995200,
"title": "Office Computer",
"placed_in_service": 1640995200,
"cost": 1500,
"salvage_value": 150,
"business_use": 100,
"fixed_asset_number": 1,
"fixed_asset_number_text": "AST-1"
}
}{
"success": false,
"message": "Invalid request data",
"data": null,
"error": {
"code": "INVALID_REQUEST",
"details": "Field 'name' is required"
}
}{
"success": false,
"message": "API key is required",
"data": null,
"error": {
"code": "API_KEY_REQUIRED",
"details": ""
}
}{
"success": false,
"message": "Fixed asset not found",
"data": null,
"error": {
"code": "NOT_FOUND",
"details": ""
}
}{
"success": false,
"message": "Internal server error",
"data": null,
"error": {
"code": "INTERNAL_ERROR",
"details": "An unexpected error occurred."
}
}Get Fixed Asset by ID
This endpoint allows you to retrieve a specific fixed asset by its ID.Headers
| Parameter | Type | Description |
|---|---|---|
| X-API-KEY | string | Formation API Key (required) |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| fixed_asset_id | string | Fixed Asset ID (required) |
Parameter Examples
- Fixed Asset ID:
64b8f1a2e4b0c8d9f0123456
Response
{
"success": true,
"message": "Fixed asset retrieved successfully",
"data": {
"id": "64b8f1a2e4b0c8d9f0123456",
"title": "Office Computer",
"placed_in_service": 1640995200,
"cost": 1500.0,
"salvage_value": 150.0,
"business_use": 100.0,
"fixed_asset_number": 1,
"fixed_asset_number_text": "AST-1",
"created_at": 1640995200,
"updated_at": 1640995200
}
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| success | boolean | Indicates if the operation was successful |
| message | string | Additional information about the operation |
| data | object | Response data for successful requests |
| data.id | string | Unique identifier for the fixed asset |
| data.title | string | Title/name of the fixed asset |
| data.placed_in_service | integer | Timestamp when asset was placed in service |
| data.cost | number | Original cost of the fixed asset |
| data.salvage_value | number | Estimated salvage value of the asset |
| data.business_use | number | Percentage of business use (0-100) |
| data.fixed_asset_number | integer | Auto-generated fixed asset number |
| data.fixed_asset_number_text | string | Formatted fixed asset number text |
| data.created_at | integer | Creation timestamp |
| data.updated_at | integer | Last update timestamp |
Error Responses
Invalid Request (400)
{
"success": false,
"message": "Invalid request",
"error": {
"code": "INVALID_REQUEST",
"details": "Invalid fixed asset ID format"
}
}
Unauthorized (401)
{
"success": false,
"message": "API key is required",
"error": {
"code": "API_KEY_REQUIRED",
"details": ""
}
}
Fixed Asset Not Found (404)
{
"success": false,
"message": "Fixed asset not found",
"error": {
"code": "FIXED_ASSET_NOT_FOUND",
"details": ""
}
}
Internal Server Error (500)
{
"success": false,
"message": "Internal server error",
"error": {
"code": "INTERNAL_ERROR",
"details": "An unexpected error occurred."
}
}
Notes
- The fixed asset ID must be a valid ObjectID format
- This endpoint returns detailed information about a single fixed asset
- All timestamps are returned in Unix timestamp format
Authorizations
Formation API key for authentication.
Path Parameters
Fixed Asset ID
Response
Fixed asset retrieved successfully
Example:
true
Example:
"Fixed asset retrieved successfully"
Show child attributes
Show child attributes
Example:
{
"id": "64b8f1a2e4b0c8d9f0123456",
"created_at": 1640995200,
"updated_at": 1640995200,
"title": "Office Computer",
"placed_in_service": 1640995200,
"cost": 1500,
"salvage_value": 150,
"business_use": 100,
"fixed_asset_number": 1,
"fixed_asset_number_text": "AST-1"
}
⌘I