Skip to content

upsertFixedAssetClass

WRITE

Upsert fixed asset class.

POST /api/v1/accounting/upsertFixedAssetClass
curl -X POST '<your-host>/api/v1/accounting/upsertFixedAssetClass' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "depreciationMethod": "Straight Line",
    "usefulLifeMonths": 0,
    "residualValuePercent": 0,
    "assetAccountId": "string",
    "accumulatedDepreciationAccountId": "string",
    "depreciationExpenseAccountId": "string",
    "writeOffAccountId": "string",
    "writeDownAccountId": "string",
    "gainOnDisposalAccountId": "string",
    "lossOnDisposalAccountId": "string",
    "_operation": "create"
  }'
Response
{
  "id": "string"
}

Parameters

ParameterType

Required. 'create' inserts a new record, 'update' modifies the existing record with this id.

"create""update"
min length 1
min length 1
min length 1
"Straight Line""Declining Balance""Units of Production"
min length 1
min length 1
min length 1
min 0max 100
> 0max 9007199254740991
min length 1
min length 1

Input schema

schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string"
    },
    "depreciationMethod": {
      "type": "string",
      "enum": [
        "Straight Line",
        "Declining Balance",
        "Units of Production"
      ]
    },
    "usefulLifeMonths": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "residualValuePercent": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "assetAccountId": {
      "type": "string",
      "minLength": 1
    },
    "accumulatedDepreciationAccountId": {
      "type": "string",
      "minLength": 1
    },
    "depreciationExpenseAccountId": {
      "type": "string",
      "minLength": 1
    },
    "writeOffAccountId": {
      "type": "string",
      "minLength": 1
    },
    "writeDownAccountId": {
      "type": "string",
      "minLength": 1
    },
    "gainOnDisposalAccountId": {
      "type": "string",
      "minLength": 1
    },
    "lossOnDisposalAccountId": {
      "type": "string",
      "minLength": 1
    },
    "taxDepreciationMethod": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Straight Line",
            "Declining Balance",
            "MACRS"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "taxUsefulLifeMonths": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "taxResidualValuePercent": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "macrsPropertyClass": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "3",
            "5",
            "7",
            "10",
            "15",
            "20",
            "39",
            "27.5"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "macrsConvention": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "Half-Year",
            "Mid-Quarter"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "bonusDepreciationPercent": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string"
    },
    "_operation": {
      "type": "string",
      "enum": [
        "create",
        "update"
      ],
      "description": "Required. 'create' inserts a new record, 'update' modifies the existing record with this id."
    }
  },
  "required": [
    "name",
    "depreciationMethod",
    "usefulLifeMonths",
    "residualValuePercent",
    "assetAccountId",
    "accumulatedDepreciationAccountId",
    "depreciationExpenseAccountId",
    "writeOffAccountId",
    "writeDownAccountId",
    "gainOnDisposalAccountId",
    "lossOnDisposalAccountId",
    "_operation"
  ]
}