Skip to main content
PUT
/
coa
/
api
/
fixed-asset-class
/
{id}
Update Fixed Asset Class
curl --request PUT \
  --url https://api.meetcampfire.com/coa/api/fixed-asset-class/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "useful_life": -1,
  "asset_account": 123,
  "accumulated_depreciation_account": 123,
  "depreciation_expense_account": 123
}
'
import requests

url = "https://api.meetcampfire.com/coa/api/fixed-asset-class/{id}"

payload = {
"name": "<string>",
"useful_life": -1,
"asset_account": 123,
"accumulated_depreciation_account": 123,
"depreciation_expense_account": 123
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
useful_life: -1,
asset_account: 123,
accumulated_depreciation_account: 123,
depreciation_expense_account: 123
})
};

fetch('https://api.meetcampfire.com/coa/api/fixed-asset-class/{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.meetcampfire.com/coa/api/fixed-asset-class/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'useful_life' => -1,
'asset_account' => 123,
'accumulated_depreciation_account' => 123,
'depreciation_expense_account' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$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.meetcampfire.com/coa/api/fixed-asset-class/{id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"useful_life\": -1,\n \"asset_account\": 123,\n \"accumulated_depreciation_account\": 123,\n \"depreciation_expense_account\": 123\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "<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.put("https://api.meetcampfire.com/coa/api/fixed-asset-class/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"useful_life\": -1,\n \"asset_account\": 123,\n \"accumulated_depreciation_account\": 123,\n \"depreciation_expense_account\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.meetcampfire.com/coa/api/fixed-asset-class/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"useful_life\": -1,\n \"asset_account\": 123,\n \"accumulated_depreciation_account\": 123,\n \"depreciation_expense_account\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "is_deleted": false,
  "deleted_at": "2023-11-07T05:31:56Z",
  "asset_account_name": "<string>",
  "accumulated_depreciation_account_name": "<string>",
  "depreciation_expense_account_name": "<string>",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "last_modified_at": "2023-11-07T05:31:56Z",
  "customer": 123,
  "useful_life": -1,
  "asset_account": 123,
  "accumulated_depreciation_account": 123,
  "depreciation_expense_account": 123
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

id
integer
required

Body

name
string
required
Maximum string length: 250
useful_life
integer | null
Required range: -2147483648 <= x <= 2147483647
asset_account
integer | null
accumulated_depreciation_account
integer | null
depreciation_expense_account
integer | null

Response

200 - application/json
id
integer
required
read-only
is_deleted
boolean
default:false
required
read-only
deleted_at
string<date-time> | null
required
read-only
asset_account_name
string
required
read-only
accumulated_depreciation_account_name
string
required
read-only
depreciation_expense_account_name
string
required
read-only
name
string
required
Maximum string length: 250
created_at
string<date-time>
required
read-only
last_modified_at
string<date-time>
required
read-only
customer
integer
required
read-only
useful_life
integer | null
Required range: -2147483648 <= x <= 2147483647
asset_account
integer | null
accumulated_depreciation_account
integer | null
depreciation_expense_account
integer | null