Fixed Assets
Partial update fixed asset
Partially update a fixed asset. If depreciation_schedules is sent, it replaces all existing schedules.
PATCH
/
public
/
v2
/
fixed-assets
/
{fixed_asset_number}
/
Partial update fixed asset
curl --request PATCH \
--url https://api.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"company_id": 123,
"name": "<string>",
"serial_number": "<string>",
"exchange_rate": 123,
"purchase_date": "2023-12-25",
"memo": "<string>",
"cost": 123,
"asset_account_number": 123,
"expense_account_number": 123,
"accumulation_account_number": 123,
"vendor_id": 123,
"customer_id": 123,
"fixed_asset_class_id": 123,
"depreciation_schedules": [
{
"depreciation_book_code": "<string>",
"depreciation_start_date": "2023-12-25",
"useful_life": 123,
"salvage_value": 123,
"depreciation_frequency": "monthly",
"acceleration_factor": "1.0",
"accumulated_beginning_balance": "0",
"accumulated_through": "2023-12-25",
"custom_schedule": [
{
"value": 123,
"period_count": 123
}
]
}
],
"address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"classifications": [
{
"id": 123,
"name": "<string>",
"line_id": 123,
"line_name": "<string>",
"parent_classification_id": 123,
"parent_classification_line_id": 123
}
],
"source_lines": [
{
"id": 123
}
]
}
'import requests
url = "https://api.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/"
payload = {
"company_id": 123,
"name": "<string>",
"serial_number": "<string>",
"exchange_rate": 123,
"purchase_date": "2023-12-25",
"memo": "<string>",
"cost": 123,
"asset_account_number": 123,
"expense_account_number": 123,
"accumulation_account_number": 123,
"vendor_id": 123,
"customer_id": 123,
"fixed_asset_class_id": 123,
"depreciation_schedules": [
{
"depreciation_book_code": "<string>",
"depreciation_start_date": "2023-12-25",
"useful_life": 123,
"salvage_value": 123,
"depreciation_frequency": "monthly",
"acceleration_factor": "1.0",
"accumulated_beginning_balance": "0",
"accumulated_through": "2023-12-25",
"custom_schedule": [
{
"value": 123,
"period_count": 123
}
]
}
],
"address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"classifications": [
{
"id": 123,
"name": "<string>",
"line_id": 123,
"line_name": "<string>",
"parent_classification_id": 123,
"parent_classification_line_id": 123
}
],
"source_lines": [{ "id": 123 }]
}
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({
company_id: 123,
name: '<string>',
serial_number: '<string>',
exchange_rate: 123,
purchase_date: '2023-12-25',
memo: '<string>',
cost: 123,
asset_account_number: 123,
expense_account_number: 123,
accumulation_account_number: 123,
vendor_id: 123,
customer_id: 123,
fixed_asset_class_id: 123,
depreciation_schedules: [
{
depreciation_book_code: '<string>',
depreciation_start_date: '2023-12-25',
useful_life: 123,
salvage_value: 123,
depreciation_frequency: 'monthly',
acceleration_factor: '1.0',
accumulated_beginning_balance: '0',
accumulated_through: '2023-12-25',
custom_schedule: [{value: 123, period_count: 123}]
}
],
address: {
street: '<string>',
city: '<string>',
postal_code: '<string>',
state: '',
country: '',
second_line: '',
name: '<string>'
},
classifications: [
{
id: 123,
name: '<string>',
line_id: 123,
line_name: '<string>',
parent_classification_id: 123,
parent_classification_line_id: 123
}
],
source_lines: [{id: 123}]
})
};
fetch('https://api.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/', 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.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/",
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([
'company_id' => 123,
'name' => '<string>',
'serial_number' => '<string>',
'exchange_rate' => 123,
'purchase_date' => '2023-12-25',
'memo' => '<string>',
'cost' => 123,
'asset_account_number' => 123,
'expense_account_number' => 123,
'accumulation_account_number' => 123,
'vendor_id' => 123,
'customer_id' => 123,
'fixed_asset_class_id' => 123,
'depreciation_schedules' => [
[
'depreciation_book_code' => '<string>',
'depreciation_start_date' => '2023-12-25',
'useful_life' => 123,
'salvage_value' => 123,
'depreciation_frequency' => 'monthly',
'acceleration_factor' => '1.0',
'accumulated_beginning_balance' => '0',
'accumulated_through' => '2023-12-25',
'custom_schedule' => [
[
'value' => 123,
'period_count' => 123
]
]
]
],
'address' => [
'street' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '',
'country' => '',
'second_line' => '',
'name' => '<string>'
],
'classifications' => [
[
'id' => 123,
'name' => '<string>',
'line_id' => 123,
'line_name' => '<string>',
'parent_classification_id' => 123,
'parent_classification_line_id' => 123
]
],
'source_lines' => [
[
'id' => 123
]
]
]),
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.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/"
payload := strings.NewReader("{\n \"company_id\": 123,\n \"name\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"exchange_rate\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"cost\": 123,\n \"asset_account_number\": 123,\n \"expense_account_number\": 123,\n \"accumulation_account_number\": 123,\n \"vendor_id\": 123,\n \"customer_id\": 123,\n \"fixed_asset_class_id\": 123,\n \"depreciation_schedules\": [\n {\n \"depreciation_book_code\": \"<string>\",\n \"depreciation_start_date\": \"2023-12-25\",\n \"useful_life\": 123,\n \"salvage_value\": 123,\n \"depreciation_frequency\": \"monthly\",\n \"acceleration_factor\": \"1.0\",\n \"accumulated_beginning_balance\": \"0\",\n \"accumulated_through\": \"2023-12-25\",\n \"custom_schedule\": [\n {\n \"value\": 123,\n \"period_count\": 123\n }\n ]\n }\n ],\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"classifications\": [\n {\n \"id\": 123,\n \"name\": \"<string>\",\n \"line_id\": 123,\n \"line_name\": \"<string>\",\n \"parent_classification_id\": 123,\n \"parent_classification_line_id\": 123\n }\n ],\n \"source_lines\": [\n {\n \"id\": 123\n }\n ]\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.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": 123,\n \"name\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"exchange_rate\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"cost\": 123,\n \"asset_account_number\": 123,\n \"expense_account_number\": 123,\n \"accumulation_account_number\": 123,\n \"vendor_id\": 123,\n \"customer_id\": 123,\n \"fixed_asset_class_id\": 123,\n \"depreciation_schedules\": [\n {\n \"depreciation_book_code\": \"<string>\",\n \"depreciation_start_date\": \"2023-12-25\",\n \"useful_life\": 123,\n \"salvage_value\": 123,\n \"depreciation_frequency\": \"monthly\",\n \"acceleration_factor\": \"1.0\",\n \"accumulated_beginning_balance\": \"0\",\n \"accumulated_through\": \"2023-12-25\",\n \"custom_schedule\": [\n {\n \"value\": 123,\n \"period_count\": 123\n }\n ]\n }\n ],\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"classifications\": [\n {\n \"id\": 123,\n \"name\": \"<string>\",\n \"line_id\": 123,\n \"line_name\": \"<string>\",\n \"parent_classification_id\": 123,\n \"parent_classification_line_id\": 123\n }\n ],\n \"source_lines\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/")
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 \"company_id\": 123,\n \"name\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"exchange_rate\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"cost\": 123,\n \"asset_account_number\": 123,\n \"expense_account_number\": 123,\n \"accumulation_account_number\": 123,\n \"vendor_id\": 123,\n \"customer_id\": 123,\n \"fixed_asset_class_id\": 123,\n \"depreciation_schedules\": [\n {\n \"depreciation_book_code\": \"<string>\",\n \"depreciation_start_date\": \"2023-12-25\",\n \"useful_life\": 123,\n \"salvage_value\": 123,\n \"depreciation_frequency\": \"monthly\",\n \"acceleration_factor\": \"1.0\",\n \"accumulated_beginning_balance\": \"0\",\n \"accumulated_through\": \"2023-12-25\",\n \"custom_schedule\": [\n {\n \"value\": 123,\n \"period_count\": 123\n }\n ]\n }\n ],\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"classifications\": [\n {\n \"id\": 123,\n \"name\": \"<string>\",\n \"line_id\": 123,\n \"line_name\": \"<string>\",\n \"parent_classification_id\": 123,\n \"parent_classification_line_id\": 123\n }\n ],\n \"source_lines\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"internal_id": 123,
"number": 123,
"company_id": 123,
"company_name": "<string>",
"name": "<string>",
"serial_number": "<string>",
"exchange_rate": "<string>",
"purchase_date": "2023-12-25",
"memo": "<string>",
"cost": "<string>",
"asset_account_number": 123,
"expense_account_number": 123,
"accumulation_account_number": 123,
"created_by": {
"actor_type": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"updated_by": {
"actor_type": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"vendor_id": 123,
"vendor_name": "<string>",
"customer_id": 123,
"customer_name": "<string>",
"fixed_asset_class_id": 123,
"depreciation_schedules": [],
"classifications": [],
"source_lines": []
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}Authorizations
Path Parameters
Body
application/json
V2 PATCH schema. If depreciation_schedules is sent, it replaces all existing schedules.
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL Available options:
active, inactive, disposed, fully_amortized Show child attributes
Show child attributes
Available options:
draft, posted, archived Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
V2 output schema with multi-book depreciation_schedules array.
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,16}0*$Pattern:
^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$Available options:
active, inactive, disposed, fully_amortized Available options:
draft, posted, archived Schema for audit actor information.
Show child attributes
Show child attributes
Schema for audit actor information.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Last modified on July 13, 2026
Was this page helpful?
⌘I
Partial update fixed asset
curl --request PATCH \
--url https://api.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/ \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"company_id": 123,
"name": "<string>",
"serial_number": "<string>",
"exchange_rate": 123,
"purchase_date": "2023-12-25",
"memo": "<string>",
"cost": 123,
"asset_account_number": 123,
"expense_account_number": 123,
"accumulation_account_number": 123,
"vendor_id": 123,
"customer_id": 123,
"fixed_asset_class_id": 123,
"depreciation_schedules": [
{
"depreciation_book_code": "<string>",
"depreciation_start_date": "2023-12-25",
"useful_life": 123,
"salvage_value": 123,
"depreciation_frequency": "monthly",
"acceleration_factor": "1.0",
"accumulated_beginning_balance": "0",
"accumulated_through": "2023-12-25",
"custom_schedule": [
{
"value": 123,
"period_count": 123
}
]
}
],
"address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"classifications": [
{
"id": 123,
"name": "<string>",
"line_id": 123,
"line_name": "<string>",
"parent_classification_id": 123,
"parent_classification_line_id": 123
}
],
"source_lines": [
{
"id": 123
}
]
}
'import requests
url = "https://api.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/"
payload = {
"company_id": 123,
"name": "<string>",
"serial_number": "<string>",
"exchange_rate": 123,
"purchase_date": "2023-12-25",
"memo": "<string>",
"cost": 123,
"asset_account_number": 123,
"expense_account_number": 123,
"accumulation_account_number": 123,
"vendor_id": 123,
"customer_id": 123,
"fixed_asset_class_id": 123,
"depreciation_schedules": [
{
"depreciation_book_code": "<string>",
"depreciation_start_date": "2023-12-25",
"useful_life": 123,
"salvage_value": 123,
"depreciation_frequency": "monthly",
"acceleration_factor": "1.0",
"accumulated_beginning_balance": "0",
"accumulated_through": "2023-12-25",
"custom_schedule": [
{
"value": 123,
"period_count": 123
}
]
}
],
"address": {
"street": "<string>",
"city": "<string>",
"postal_code": "<string>",
"state": "",
"country": "",
"second_line": "",
"name": "<string>"
},
"classifications": [
{
"id": 123,
"name": "<string>",
"line_id": 123,
"line_name": "<string>",
"parent_classification_id": 123,
"parent_classification_line_id": 123
}
],
"source_lines": [{ "id": 123 }]
}
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({
company_id: 123,
name: '<string>',
serial_number: '<string>',
exchange_rate: 123,
purchase_date: '2023-12-25',
memo: '<string>',
cost: 123,
asset_account_number: 123,
expense_account_number: 123,
accumulation_account_number: 123,
vendor_id: 123,
customer_id: 123,
fixed_asset_class_id: 123,
depreciation_schedules: [
{
depreciation_book_code: '<string>',
depreciation_start_date: '2023-12-25',
useful_life: 123,
salvage_value: 123,
depreciation_frequency: 'monthly',
acceleration_factor: '1.0',
accumulated_beginning_balance: '0',
accumulated_through: '2023-12-25',
custom_schedule: [{value: 123, period_count: 123}]
}
],
address: {
street: '<string>',
city: '<string>',
postal_code: '<string>',
state: '',
country: '',
second_line: '',
name: '<string>'
},
classifications: [
{
id: 123,
name: '<string>',
line_id: 123,
line_name: '<string>',
parent_classification_id: 123,
parent_classification_line_id: 123
}
],
source_lines: [{id: 123}]
})
};
fetch('https://api.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/', 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.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/",
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([
'company_id' => 123,
'name' => '<string>',
'serial_number' => '<string>',
'exchange_rate' => 123,
'purchase_date' => '2023-12-25',
'memo' => '<string>',
'cost' => 123,
'asset_account_number' => 123,
'expense_account_number' => 123,
'accumulation_account_number' => 123,
'vendor_id' => 123,
'customer_id' => 123,
'fixed_asset_class_id' => 123,
'depreciation_schedules' => [
[
'depreciation_book_code' => '<string>',
'depreciation_start_date' => '2023-12-25',
'useful_life' => 123,
'salvage_value' => 123,
'depreciation_frequency' => 'monthly',
'acceleration_factor' => '1.0',
'accumulated_beginning_balance' => '0',
'accumulated_through' => '2023-12-25',
'custom_schedule' => [
[
'value' => 123,
'period_count' => 123
]
]
]
],
'address' => [
'street' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'state' => '',
'country' => '',
'second_line' => '',
'name' => '<string>'
],
'classifications' => [
[
'id' => 123,
'name' => '<string>',
'line_id' => 123,
'line_name' => '<string>',
'parent_classification_id' => 123,
'parent_classification_line_id' => 123
]
],
'source_lines' => [
[
'id' => 123
]
]
]),
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.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/"
payload := strings.NewReader("{\n \"company_id\": 123,\n \"name\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"exchange_rate\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"cost\": 123,\n \"asset_account_number\": 123,\n \"expense_account_number\": 123,\n \"accumulation_account_number\": 123,\n \"vendor_id\": 123,\n \"customer_id\": 123,\n \"fixed_asset_class_id\": 123,\n \"depreciation_schedules\": [\n {\n \"depreciation_book_code\": \"<string>\",\n \"depreciation_start_date\": \"2023-12-25\",\n \"useful_life\": 123,\n \"salvage_value\": 123,\n \"depreciation_frequency\": \"monthly\",\n \"acceleration_factor\": \"1.0\",\n \"accumulated_beginning_balance\": \"0\",\n \"accumulated_through\": \"2023-12-25\",\n \"custom_schedule\": [\n {\n \"value\": 123,\n \"period_count\": 123\n }\n ]\n }\n ],\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"classifications\": [\n {\n \"id\": 123,\n \"name\": \"<string>\",\n \"line_id\": 123,\n \"line_name\": \"<string>\",\n \"parent_classification_id\": 123,\n \"parent_classification_line_id\": 123\n }\n ],\n \"source_lines\": [\n {\n \"id\": 123\n }\n ]\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.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": 123,\n \"name\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"exchange_rate\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"cost\": 123,\n \"asset_account_number\": 123,\n \"expense_account_number\": 123,\n \"accumulation_account_number\": 123,\n \"vendor_id\": 123,\n \"customer_id\": 123,\n \"fixed_asset_class_id\": 123,\n \"depreciation_schedules\": [\n {\n \"depreciation_book_code\": \"<string>\",\n \"depreciation_start_date\": \"2023-12-25\",\n \"useful_life\": 123,\n \"salvage_value\": 123,\n \"depreciation_frequency\": \"monthly\",\n \"acceleration_factor\": \"1.0\",\n \"accumulated_beginning_balance\": \"0\",\n \"accumulated_through\": \"2023-12-25\",\n \"custom_schedule\": [\n {\n \"value\": 123,\n \"period_count\": 123\n }\n ]\n }\n ],\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"classifications\": [\n {\n \"id\": 123,\n \"name\": \"<string>\",\n \"line_id\": 123,\n \"line_name\": \"<string>\",\n \"parent_classification_id\": 123,\n \"parent_classification_line_id\": 123\n }\n ],\n \"source_lines\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualentry.com/public/v2/fixed-assets/{fixed_asset_number}/")
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 \"company_id\": 123,\n \"name\": \"<string>\",\n \"serial_number\": \"<string>\",\n \"exchange_rate\": 123,\n \"purchase_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"cost\": 123,\n \"asset_account_number\": 123,\n \"expense_account_number\": 123,\n \"accumulation_account_number\": 123,\n \"vendor_id\": 123,\n \"customer_id\": 123,\n \"fixed_asset_class_id\": 123,\n \"depreciation_schedules\": [\n {\n \"depreciation_book_code\": \"<string>\",\n \"depreciation_start_date\": \"2023-12-25\",\n \"useful_life\": 123,\n \"salvage_value\": 123,\n \"depreciation_frequency\": \"monthly\",\n \"acceleration_factor\": \"1.0\",\n \"accumulated_beginning_balance\": \"0\",\n \"accumulated_through\": \"2023-12-25\",\n \"custom_schedule\": [\n {\n \"value\": 123,\n \"period_count\": 123\n }\n ]\n }\n ],\n \"address\": {\n \"street\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"\",\n \"country\": \"\",\n \"second_line\": \"\",\n \"name\": \"<string>\"\n },\n \"classifications\": [\n {\n \"id\": 123,\n \"name\": \"<string>\",\n \"line_id\": 123,\n \"line_name\": \"<string>\",\n \"parent_classification_id\": 123,\n \"parent_classification_line_id\": 123\n }\n ],\n \"source_lines\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"internal_id": 123,
"number": 123,
"company_id": 123,
"company_name": "<string>",
"name": "<string>",
"serial_number": "<string>",
"exchange_rate": "<string>",
"purchase_date": "2023-12-25",
"memo": "<string>",
"cost": "<string>",
"asset_account_number": 123,
"expense_account_number": 123,
"accumulation_account_number": 123,
"created_by": {
"actor_type": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"updated_by": {
"actor_type": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"vendor_id": 123,
"vendor_name": "<string>",
"customer_id": 123,
"customer_name": "<string>",
"fixed_asset_class_id": 123,
"depreciation_schedules": [],
"classifications": [],
"source_lines": []
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}{
"errors": {},
"success": false
}