Skip to main content
PATCH
/
coa
/
api
/
fixed-asset
/
{id}
Partial Update Fixed Asset
curl --request PATCH \
  --url https://api.meetcampfire.com/coa/api/fixed-asset/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "depreciations": [
    {
      "post_date": "2023-12-25",
      "id": 123,
      "fixed_asset": 123,
      "depreciated_until": "2023-12-25",
      "posted": true,
      "amount": 0,
      "journal_entry": 123
    }
  ],
  "depreciation_start_date": "2023-12-25",
  "depreciation_end_date": "2023-12-25",
  "depreciated_until": "2023-12-25",
  "chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "currency": "<string>",
  "initial_value": 0,
  "salvage_value": 0,
  "purchase_date": "2023-12-25",
  "tag_ids": [
    0
  ],
  "tag_group_ids": [
    0
  ],
  "exchange_rate": 0,
  "exchange_rate_book": 0,
  "is_non_depreciable": true,
  "chat_id": -1,
  "entity": 123,
  "asset_class": 123,
  "purchase_journal_entry": 123,
  "purchase_transaction": 123,
  "vendor": 123,
  "department": 123,
  "purchase_transactions": [
    123
  ]
}
'
import requests

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

payload = {
"depreciations": [
{
"post_date": "2023-12-25",
"id": 123,
"fixed_asset": 123,
"depreciated_until": "2023-12-25",
"posted": True,
"amount": 0,
"journal_entry": 123
}
],
"depreciation_start_date": "2023-12-25",
"depreciation_end_date": "2023-12-25",
"depreciated_until": "2023-12-25",
"chat_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"currency": "<string>",
"initial_value": 0,
"salvage_value": 0,
"purchase_date": "2023-12-25",
"tag_ids": [0],
"tag_group_ids": [0],
"exchange_rate": 0,
"exchange_rate_book": 0,
"is_non_depreciable": True,
"chat_id": -1,
"entity": 123,
"asset_class": 123,
"purchase_journal_entry": 123,
"purchase_transaction": 123,
"vendor": 123,
"department": 123,
"purchase_transactions": [123]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
depreciations: [
{
post_date: '2023-12-25',
id: 123,
fixed_asset: 123,
depreciated_until: '2023-12-25',
posted: true,
amount: 0,
journal_entry: 123
}
],
depreciation_start_date: '2023-12-25',
depreciation_end_date: '2023-12-25',
depreciated_until: '2023-12-25',
chat_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
currency: '<string>',
initial_value: 0,
salvage_value: 0,
purchase_date: '2023-12-25',
tag_ids: [0],
tag_group_ids: [0],
exchange_rate: 0,
exchange_rate_book: 0,
is_non_depreciable: true,
chat_id: -1,
entity: 123,
asset_class: 123,
purchase_journal_entry: 123,
purchase_transaction: 123,
vendor: 123,
department: 123,
purchase_transactions: [123]
})
};

fetch('https://api.meetcampfire.com/coa/api/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.meetcampfire.com/coa/api/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([
'depreciations' => [
[
'post_date' => '2023-12-25',
'id' => 123,
'fixed_asset' => 123,
'depreciated_until' => '2023-12-25',
'posted' => true,
'amount' => 0,
'journal_entry' => 123
]
],
'depreciation_start_date' => '2023-12-25',
'depreciation_end_date' => '2023-12-25',
'depreciated_until' => '2023-12-25',
'chat_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'currency' => '<string>',
'initial_value' => 0,
'salvage_value' => 0,
'purchase_date' => '2023-12-25',
'tag_ids' => [
0
],
'tag_group_ids' => [
0
],
'exchange_rate' => 0,
'exchange_rate_book' => 0,
'is_non_depreciable' => true,
'chat_id' => -1,
'entity' => 123,
'asset_class' => 123,
'purchase_journal_entry' => 123,
'purchase_transaction' => 123,
'vendor' => 123,
'department' => 123,
'purchase_transactions' => [
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/{id}"

payload := strings.NewReader("{\n \"depreciations\": [\n {\n \"post_date\": \"2023-12-25\",\n \"id\": 123,\n \"fixed_asset\": 123,\n \"depreciated_until\": \"2023-12-25\",\n \"posted\": true,\n \"amount\": 0,\n \"journal_entry\": 123\n }\n ],\n \"depreciation_start_date\": \"2023-12-25\",\n \"depreciation_end_date\": \"2023-12-25\",\n \"depreciated_until\": \"2023-12-25\",\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"initial_value\": 0,\n \"salvage_value\": 0,\n \"purchase_date\": \"2023-12-25\",\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"is_non_depreciable\": true,\n \"chat_id\": -1,\n \"entity\": 123,\n \"asset_class\": 123,\n \"purchase_journal_entry\": 123,\n \"purchase_transaction\": 123,\n \"vendor\": 123,\n \"department\": 123,\n \"purchase_transactions\": [\n 123\n ]\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.meetcampfire.com/coa/api/fixed-asset/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"depreciations\": [\n {\n \"post_date\": \"2023-12-25\",\n \"id\": 123,\n \"fixed_asset\": 123,\n \"depreciated_until\": \"2023-12-25\",\n \"posted\": true,\n \"amount\": 0,\n \"journal_entry\": 123\n }\n ],\n \"depreciation_start_date\": \"2023-12-25\",\n \"depreciation_end_date\": \"2023-12-25\",\n \"depreciated_until\": \"2023-12-25\",\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"initial_value\": 0,\n \"salvage_value\": 0,\n \"purchase_date\": \"2023-12-25\",\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"is_non_depreciable\": true,\n \"chat_id\": -1,\n \"entity\": 123,\n \"asset_class\": 123,\n \"purchase_journal_entry\": 123,\n \"purchase_transaction\": 123,\n \"vendor\": 123,\n \"department\": 123,\n \"purchase_transactions\": [\n 123\n ]\n}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"depreciations\": [\n {\n \"post_date\": \"2023-12-25\",\n \"id\": 123,\n \"fixed_asset\": 123,\n \"depreciated_until\": \"2023-12-25\",\n \"posted\": true,\n \"amount\": 0,\n \"journal_entry\": 123\n }\n ],\n \"depreciation_start_date\": \"2023-12-25\",\n \"depreciation_end_date\": \"2023-12-25\",\n \"depreciated_until\": \"2023-12-25\",\n \"chat_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"currency\": \"<string>\",\n \"initial_value\": 0,\n \"salvage_value\": 0,\n \"purchase_date\": \"2023-12-25\",\n \"tag_ids\": [\n 0\n ],\n \"tag_group_ids\": [\n 0\n ],\n \"exchange_rate\": 0,\n \"exchange_rate_book\": 0,\n \"is_non_depreciable\": true,\n \"chat_id\": -1,\n \"entity\": 123,\n \"asset_class\": 123,\n \"purchase_journal_entry\": 123,\n \"purchase_transaction\": 123,\n \"vendor\": 123,\n \"department\": 123,\n \"purchase_transactions\": [\n 123\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "entity_name": "<string>",
  "entity_currency": "<string>",
  "useful_life": "<string>",
  "asset_class_useful_life": 123,
  "asset_class_name": "<string>",
  "asset_account": "<string>",
  "asset_account_name": "<string>",
  "depreciation_expense_account": "<string>",
  "depreciation_expense_account_name": "<string>",
  "accumulated_depreciation_account": "<string>",
  "accumulated_depreciation_account_name": "<string>",
  "purchase_journal_entry_order": "<string>",
  "purchase_transaction_id": "<string>",
  "vendor_name": "<string>",
  "department_name": "<string>",
  "tags": [
    {}
  ],
  "attachments": [
    {
      "id": 123,
      "customer": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "created_by": 123,
      "created_by_name": "<string>",
      "created_by_email": "<string>",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "url": "<string>",
      "s3_path": "<string>",
      "app": "<string>",
      "model": "<string>",
      "is_deleted": false,
      "deleted_at": "2023-11-07T05:31:56Z",
      "s3_content_type": "<string>",
      "s3_content_length": 1073741823,
      "object_id": 1073741823
    }
  ],
  "disposals": [
    {
      "id": 123,
      "journal_entry_order": "<string>",
      "disposal_percentage": 0,
      "disposal_date": "2023-12-25",
      "created_at": "2023-11-07T05:31:56Z",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "customer": 123,
      "fixed_asset": 123,
      "proceeds_amount": 0,
      "journal_entry": 123
    }
  ],
  "transfers": [
    {
      "id": 123,
      "source_asset_class_name": "<string>",
      "new_asset_class_name": "<string>",
      "reclassification_journal_entry_order": "<string>",
      "catchup_depreciation_journal_entry_order": "<string>",
      "created_asset_name": "<string>",
      "effective_date": "2023-12-25",
      "created_at": "2023-11-07T05:31:56Z",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "customer": 123,
      "fixed_asset": 123,
      "source_asset_class": 123,
      "new_asset_class": 123,
      "is_partial": true,
      "transfer_amount": 0,
      "transfer_accumulated_depreciation": 0,
      "transfer_percentage": 0,
      "new_useful_life_months": -1,
      "new_salvage_value": 0,
      "new_depreciation_start_date": "2023-12-25",
      "new_depreciation_end_date": "2023-12-25",
      "memo": "<string>",
      "reclassification_journal_entry": 123,
      "catchup_depreciation_journal_entry": 123,
      "created_asset": 123
    }
  ],
  "net_book_value": "<string>",
  "last_modified_at": "2023-11-07T05:31:56Z",
  "is_deleted": false,
  "deleted_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "purchase_date": "2023-12-25",
  "created_at": "2023-11-07T05:31:56Z",
  "pause_date": "2023-12-25",
  "pause_reason": "<string>",
  "last_resume_date": "2023-12-25",
  "customer": 123,
  "depreciations": [
    {
      "journal_entry_order": "<string>",
      "post_date": "2023-12-25",
      "created_at": "2023-11-07T05:31:56Z",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "customer": 123,
      "id": 123,
      "posted": true,
      "amount": 0,
      "journal_entry": 123
    }
  ],
  "depreciation_start_date": "2023-12-25",
  "depreciation_end_date": "2023-12-25",
  "description": "<string>",
  "currency": "<string>",
  "initial_value": 0,
  "salvage_value": 0,
  "tag_ids": [
    0
  ],
  "tag_group_ids": [
    0
  ],
  "exchange_rate": 0,
  "exchange_rate_book": 0,
  "is_non_depreciable": true,
  "chat_id": -1,
  "entity": 123,
  "asset_class": 123,
  "purchase_journal_entry": 123,
  "purchase_transaction": 123,
  "vendor": 123,
  "department": 123,
  "purchase_transactions": [
    123
  ]
}

Authorizations

Authorization
string
header
required

Token-based authentication with required prefix "Token"

Path Parameters

id
integer
required

Body

depreciations
object[] | null
depreciation_start_date
string<date> | null
depreciation_end_date
string<date> | null
depreciated_until
string<date> | null
write-only
chat_uuid
string<uuid>
write-only
name
string
Maximum string length: 250
description
string | null
currency
string
Maximum string length: 3
initial_value
number<double>
Required range: -1000000000000000000 < x < 1000000000000000000
salvage_value
number<double>
Required range: -1000000000000000000 < x < 1000000000000000000
purchase_date
string<date>
status
enum<string>
  • ACTIVE - Active
  • PAUSED - Paused
  • DEPRECIATED - Depreciated
  • DISPOSED - Disposed
Available options:
ACTIVE,
PAUSED,
DEPRECIATED,
DISPOSED
tag_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
tag_group_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
exchange_rate
number<double> | null
Required range: -100000000000000 < x < 100000000000000
exchange_rate_book
number<double> | null
Required range: -100000000000000 < x < 100000000000000
is_non_depreciable
boolean | null
chat_id
integer | null
Required range: -2147483648 <= x <= 2147483647
entity
integer | null
asset_class
integer | null
purchase_journal_entry
integer | null
purchase_transaction
integer | null
vendor
integer | null
department
integer | null
purchase_transactions
integer[]

Response

200 - application/json
id
integer
required
read-only
entity_name
string
required
read-only
entity_currency
string
required
read-only
useful_life
string
required
read-only
asset_class_useful_life
integer
required
read-only
asset_class_name
string
required
read-only
asset_account
string
required
read-only
asset_account_name
string
required
read-only
depreciation_expense_account
string
required
read-only
depreciation_expense_account_name
string
required
read-only
accumulated_depreciation_account
string
required
read-only
accumulated_depreciation_account_name
string
required
read-only
purchase_journal_entry_order
string
required
read-only
purchase_transaction_id
string
required
read-only
vendor_name
string
required
read-only
department_name
string
required
read-only
tags
object[]
required
read-only
attachments
object[]
required
read-only
disposals
object[] | null
required
read-only
transfers
object[] | null
required
read-only
net_book_value
string
required
read-only
last_modified_at
string<date-time>
required
read-only
is_deleted
boolean
default:false
required
read-only
deleted_at
string<date-time> | null
required
read-only
name
string
required
Maximum string length: 250
purchase_date
string<date>
required
created_at
string<date-time>
required
read-only
pause_date
string<date> | null
required
read-only
pause_reason
string | null
required
read-only
last_resume_date
string<date> | null
required
read-only
customer
integer
required
read-only
depreciations
object[] | null
depreciation_start_date
string<date> | null
depreciation_end_date
string<date> | null
description
string | null
currency
string
Maximum string length: 3
initial_value
number<double>
Required range: -1000000000000000000 < x < 1000000000000000000
salvage_value
number<double>
Required range: -1000000000000000000 < x < 1000000000000000000
status
enum<string>
  • ACTIVE - Active
  • PAUSED - Paused
  • DEPRECIATED - Depreciated
  • DISPOSED - Disposed
Available options:
ACTIVE,
PAUSED,
DEPRECIATED,
DISPOSED
tag_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
tag_group_ids
integer<int64>[]
Required range: -9223372036854776000 <= x <= 9223372036854776000
exchange_rate
number<double> | null
Required range: -100000000000000 < x < 100000000000000
exchange_rate_book
number<double> | null
Required range: -100000000000000 < x < 100000000000000
is_non_depreciable
boolean | null
chat_id
integer | null
Required range: -2147483648 <= x <= 2147483647
entity
integer | null
asset_class
integer | null
purchase_journal_entry
integer | null
purchase_transaction
integer | null
vendor
integer | null
department
integer | null
purchase_transactions
integer[]