Delete Fixed Asset
curl --request DELETE \
--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.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', 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 => "DELETE",
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("DELETE", 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.delete("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::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Fixed asset deleted successfully",
"data": {}
}{
"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
Delete Fixed Asset
Delete a fixed asset
DELETE
/
fixed-assets
/
{fixed_asset_id}
Delete Fixed Asset
curl --request DELETE \
--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.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', 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 => "DELETE",
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("DELETE", 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.delete("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::Delete.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Fixed asset deleted successfully",
"data": {}
}{
"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."
}
}Delete Fixed Asset
This endpoint allows you to delete a fixed asset from the system.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 deleted successfully",
"data": null
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| success | boolean | Indicates if the operation was successful |
| message | string | Additional information about the operation |
| data | null | No data returned for delete operation |
Error Responses
Invalid Request (400)
{
"success": false,
"message": "Invalid request data",
"error": {
"code": "INVALID_REQUEST",
"details": "Invalid fixed asset ID format"
}
}
Unauthorized (401)
{
"success": false,
"message": "API key is required",
"error": {
"code": "API_KEY_REQUIRED"
}
}
Fixed Asset Not Found (404)
{
"success": false,
"message": "Fixed asset not found",
"error": {
"code": "FIXED_ASSET_NOT_FOUND"
}
}
Internal Server Error (500)
{
"success": false,
"message": "Internal server error",
"error": {
"code": "INTERNAL_ERROR"
}
}
Notes
- Once a fixed asset is deleted, it cannot be recovered
- The fixed asset ID must be a valid ObjectID format
- Deletion is permanent and will remove all associated data
- No data is returned in the response for successful delete operations
Authorizations
Formation API key for authentication.
Path Parameters
Fixed Asset ID
⌘I