Update Fixed Asset
curl --request PATCH \
--url https://api.clemta.com/fixed-assets/{fixed_asset_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "Office Computer",
"placed_in_service": 1640995200,
"cost": 1500,
"salvage_value": 150,
"business_use": 100,
"company_id": "64b8f1a2e4b0c8d9f0123456"
}
'import requests
url = "https://api.clemta.com/fixed-assets/{fixed_asset_id}"
payload = {
"title": "Office Computer",
"placed_in_service": 1640995200,
"cost": 1500,
"salvage_value": 150,
"business_use": 100,
"company_id": "64b8f1a2e4b0c8d9f0123456"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Office Computer',
placed_in_service: 1640995200,
cost: 1500,
salvage_value: 150,
business_use: 100,
company_id: '64b8f1a2e4b0c8d9f0123456'
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Office Computer',
'placed_in_service' => 1640995200,
'cost' => 1500,
'salvage_value' => 150,
'business_use' => 100,
'company_id' => '64b8f1a2e4b0c8d9f0123456'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clemta.com/fixed-assets/{fixed_asset_id}"
payload := strings.NewReader("{\n \"title\": \"Office Computer\",\n \"placed_in_service\": 1640995200,\n \"cost\": 1500,\n \"salvage_value\": 150,\n \"business_use\": 100,\n \"company_id\": \"64b8f1a2e4b0c8d9f0123456\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.clemta.com/fixed-assets/{fixed_asset_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Office Computer\",\n \"placed_in_service\": 1640995200,\n \"cost\": 1500,\n \"salvage_value\": 150,\n \"business_use\": 100,\n \"company_id\": \"64b8f1a2e4b0c8d9f0123456\"\n}")
.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::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Office Computer\",\n \"placed_in_service\": 1640995200,\n \"cost\": 1500,\n \"salvage_value\": 150,\n \"business_use\": 100,\n \"company_id\": \"64b8f1a2e4b0c8d9f0123456\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Fixed asset updated 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
Update Fixed Asset
Update an existing fixed asset
PATCH
/
fixed-assets
/
{fixed_asset_id}
Update Fixed Asset
curl --request PATCH \
--url https://api.clemta.com/fixed-assets/{fixed_asset_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"title": "Office Computer",
"placed_in_service": 1640995200,
"cost": 1500,
"salvage_value": 150,
"business_use": 100,
"company_id": "64b8f1a2e4b0c8d9f0123456"
}
'import requests
url = "https://api.clemta.com/fixed-assets/{fixed_asset_id}"
payload = {
"title": "Office Computer",
"placed_in_service": 1640995200,
"cost": 1500,
"salvage_value": 150,
"business_use": 100,
"company_id": "64b8f1a2e4b0c8d9f0123456"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Office Computer',
placed_in_service: 1640995200,
cost: 1500,
salvage_value: 150,
business_use: 100,
company_id: '64b8f1a2e4b0c8d9f0123456'
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'Office Computer',
'placed_in_service' => 1640995200,
'cost' => 1500,
'salvage_value' => 150,
'business_use' => 100,
'company_id' => '64b8f1a2e4b0c8d9f0123456'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clemta.com/fixed-assets/{fixed_asset_id}"
payload := strings.NewReader("{\n \"title\": \"Office Computer\",\n \"placed_in_service\": 1640995200,\n \"cost\": 1500,\n \"salvage_value\": 150,\n \"business_use\": 100,\n \"company_id\": \"64b8f1a2e4b0c8d9f0123456\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.clemta.com/fixed-assets/{fixed_asset_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Office Computer\",\n \"placed_in_service\": 1640995200,\n \"cost\": 1500,\n \"salvage_value\": 150,\n \"business_use\": 100,\n \"company_id\": \"64b8f1a2e4b0c8d9f0123456\"\n}")
.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::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Office Computer\",\n \"placed_in_service\": 1640995200,\n \"cost\": 1500,\n \"salvage_value\": 150,\n \"business_use\": 100,\n \"company_id\": \"64b8f1a2e4b0c8d9f0123456\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Fixed asset updated 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."
}
}Update Fixed Asset
This endpoint allows you to update an existing fixed asset.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) |
Request Body
{
"title": "Updated Office Computer",
"placed_in_service": 1640995200,
"cost": 1600.0,
"salvage_value": 160.0,
"business_use": 90.0,
"company_id": "64b8f1a2e4b0c8d9f0123456"
}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Title/name of the fixed asset |
| placed_in_service | integer | Yes | Timestamp when the asset was placed in service |
| cost | number | Yes | Original cost of the fixed asset |
| salvage_value | number | Yes | Estimated salvage value of the asset |
| business_use | number | Yes | Percentage of business use (0-100) |
| company_id | string | Yes | Company ID that owns the asset |
Parameter Examples
- Fixed Asset ID:
64b8f1a2e4b0c8d9f0123456
Response
{
"success": true,
"message": "Fixed asset updated successfully",
"data": {
"id": "64b8f1a2e4b0c8d9f0123456",
"title": "Updated Office Computer",
"placed_in_service": 1640995200,
"cost": 1600.0,
"salvage_value": 160.0,
"business_use": 90.0,
"fixed_asset_number": 1,
"fixed_asset_number_text": "AST-1",
"created_at": 1640995200,
"updated_at": 1640995300
}
}
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 Data (400)
{
"success": false,
"message": "Invalid request data",
"error": {
"code": "VALIDATION_FAILED",
"details": "Field 'title' is required"
}
}
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
placed_in_servicetimestamp should be in Unix timestamp format - The
business_usepercentage must be between 0 and 100 - The
costandsalvage_valueshould be positive numbers - Fixed asset numbers cannot be modified and remain unchanged
- The
updated_attimestamp will be automatically updated when the asset is modified
Authorizations
Formation API key for authentication.
Path Parameters
Fixed Asset ID
Body
application/json
Title/name of the fixed asset
Example:
"Office Computer"
Timestamp when the asset was placed in service
Example:
1640995200
Original cost of the fixed asset
Example:
1500
Estimated salvage value of the asset
Example:
150
Percentage of business use (0-100)
Example:
100
Company ID
Example:
"64b8f1a2e4b0c8d9f0123456"
Response
Fixed asset updated successfully
Example:
true
Example:
"Fixed asset updated 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