POST
/
fixed-assets
Create Fixed Asset
curl --request POST \
  --url https://api.clemta.com/fixed-assets \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "title": "Office Computer",
  "placed_in_service": 1640995200,
  "cost": 1500,
  "salvage_value": 150,
  "business_use": 100,
  "company_id": "64b8f1a2e4b0c8d9f0123456"
}'
{
  "success": true,
  "message": "Fixed asset created successfully",
  "data": {
    "id": "64b8f1a2e4b0c8d9f0123456",
    "created_at": 1640995200,
    "updated_at": 1640995200,
    "title": "Office Computer",
    "placed_in_service": 1640995200,
    "cost": 1500,
    "salvage_value": 150,
    "business_use": 100,
    "fixed_asset_number": 1,
    "fixed_asset_number_text": "AST-1"
  }
}

Create Fixed Asset

This endpoint allows you to create a new fixed asset for a company.

Headers

ParameterTypeDescription
X-API-KEYstringFormation API Key (required)

Request Body

{
  "title": "Office Computer",
  "placed_in_service": 1640995200,
  "cost": 1500.0,
  "salvage_value": 150.0,
  "business_use": 100.0,
  "company_id": "64b8f1a2e4b0c8d9f0123456"
}

Request Parameters

ParameterTypeRequiredDescription
titlestringYesTitle/name of the fixed asset
placed_in_serviceintegerYesTimestamp when the asset was placed in service
costnumberYesOriginal cost of the fixed asset
salvage_valuenumberYesEstimated salvage value of the asset
business_usenumberYesPercentage of business use (0-100)
company_idstringYesCompany ID that owns the asset

Response

{
  "success": true,
  "message": "Fixed asset created successfully",
  "data": {
    "id": "64b8f1a2e4b0c8d9f0123456",
    "title": "Office Computer",
    "placed_in_service": 1640995200,
    "cost": 1500.0,
    "salvage_value": 150.0,
    "business_use": 100.0,
    "fixed_asset_number": 1,
    "fixed_asset_number_text": "AST-1",
    "created_at": 1640995200,
    "updated_at": 1640995200
  }
}

Response Parameters

ParameterTypeDescription
successbooleanIndicates if the operation was successful
messagestringAdditional information about the operation
dataobjectResponse data for successful requests
data.idstringUnique identifier for the created asset
data.titlestringTitle/name of the fixed asset
data.placed_in_serviceintegerTimestamp when asset was placed in service
data.costnumberOriginal cost of the fixed asset
data.salvage_valuenumberEstimated salvage value of the asset
data.business_usenumberPercentage of business use (0-100)
data.fixed_asset_numberintegerAuto-generated fixed asset number
data.fixed_asset_number_textstringFormatted fixed asset number text
data.created_atintegerCreation timestamp
data.updated_atintegerLast update timestamp

Error Responses

Invalid Request Data (400)

{
  "success": false,
  "message": "Invalid request data",
  "error": {
    "code": "VALIDATION_FAILED",
    "details": "Field 'title' is required"
  }
}

Unauthorized (401)

{
  "success": false,
  "message": "API key is required",
  "error": {
    "code": "API_KEY_REQUIRED",
    "details": ""
  }
}

Company Not Found (404)

{
  "success": false,
  "message": "Company not found",
  "error": {
    "code": "COMPANY_NOT_FOUND",
    "details": ""
  }
}

Internal Server Error (500)

{
  "success": false,
  "message": "Internal server error",
  "error": {
    "code": "INTERNAL_ERROR",
    "details": "An unexpected error occurred."
  }
}

Notes

  • The placed_in_service timestamp should be in Unix timestamp format
  • The business_use percentage must be between 0 and 100
  • The cost and salvage_value should be positive numbers
  • Fixed asset numbers are automatically generated by the system

Authorizations

X-API-Key
string
header
required

Formation API key for authentication.

Body

application/json

Response

200
application/json

Fixed asset created successfully

The response is of type object.