Assets
Assets represent items of value owned by a company, such as equipment, vehicles, or property. The assets API allows you to manage and track these assets within Snapbooks.
Endpoints
List Assets
GET /api/v2/assets
Retrieves a paginated list of assets.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| client_account_id | integer | No | Filter assets by client account |
| page | integer | No | Page number (default: 1) |
| per_page | integer | No | Items per page (default: 100, max: 100) |
| with | string | No | Include related resources (supported: client_account, created_by) |
Response
{
"data": [
{
"id": 123,
"name": "Office Equipment",
"client_account_id": 456,
"sequence_number": 1,
"created_at": "2024-03-15T10:00:00Z",
"updated_at": "2024-03-15T10:00:00Z",
"created_by_id": 789,
"updated_by_id": 789,
"client_account": { // Only included when with=client_account
"id": 456,
"unique_name": "company-abc",
"display_name": "Company ABC"
},
"created_by": { // Only included when with=created_by
"id": 789,
"first_name": "John",
"last_name": "Doe",
"created_at": "2023-01-01T00:00:00Z",
"profile_image_url": null,
"last_login": "2024-03-15T14:30:00Z"
}
}
],
"meta": {
"page": 1,
"pages": 1,
"per_page": 100,
"records": 1
}
}
Get Asset
GET /api/v2/assets/{id}
Retrieves a specific asset by ID.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| with | string | No | Include related resources (supported: client_account, created_by) |
Response
{
"id": 123,
"name": "Office Equipment",
"client_account_id": 456,
"sequence_number": 1,
"created_at": "2024-03-15T10:00:00Z",
"updated_at": "2024-03-15T10:00:00Z",
"created_by_id": 789,
"updated_by_id": 789
}
Create Asset
POST /api/v2/assets
Creates a new asset.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The name of the asset |
| client_account_id | integer | Yes | The ID of the client account |
Example Request
{
"name": "Office Equipment",
"client_account_id": 456
}
Response
{
"id": 123,
"name": "Office Equipment",
"client_account_id": 456,
"sequence_number": 1,
"created_at": "2024-03-15T10:00:00Z",
"updated_at": "2024-03-15T10:00:00Z",
"created_by_id": 789,
"updated_by_id": 789
}
Update Asset
PUT /api/v2/assets/{id}
Updates an existing asset.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | The new name for the asset |
Example Request
{
"name": "Updated Equipment Name"
}
Response
{
"id": 123,
"name": "Updated Equipment Name",
"client_account_id": 456,
"sequence_number": 1,
"created_at": "2024-03-15T10:00:00Z",
"updated_at": "2024-03-15T15:30:00Z",
"created_by_id": 789,
"updated_by_id": 789
}
Deactivate Asset
DELETE /api/v2/assets/{id}
Deactivates an asset by setting its is_active status to false. The asset record is preserved for historical purposes.
Response
{
"id": 123,
"name": "Office Equipment",
"client_account_id": 456,
"sequence_number": 1,
"is_active": false,
"created_at": "2024-03-15T10:00:00Z",
"updated_at": "2024-03-15T16:00:00Z",
"created_by_id": 789,
"updated_by_id": 789
}
Deactivation Validation
When attempting to deactivate an asset, the system performs validation to ensure data integrity:
- Balance Checking: The system checks if any accounting accounts with mandatory asset dimensions have non-zero balances for this specific asset.
- Validation Failure: If any accounts have non-zero balances, the deactivation is denied with a 400 Bad Request error.
- Error Details: The error message includes specific account codes and their balances to help identify which transactions need to be resolved.
Example Error Response
{
"error": "Cannot deactivate asset: account 1200: 15000.00, account 1210: -2500.00",
"status": 400
}
This validation ensures that assets cannot be deactivated while they still have outstanding balances, maintaining the integrity of your accounting records.
Asset Classes
Asset classes define categories of fixed assets based on IFRS standards (IAS 16, IAS 38, IAS 40). Each class specifies a depreciation method and includes Norwegian-specific tax rules (saldogruppe, depreciation rates, and default GL accounts per skatteloven chapter 14).
List Asset Classes
GET /api/v2/asset-classes
Returns all available asset classes with their depreciation configuration and Norwegian tax rules.
Response
[
{
"code": "OFFICE_EQUIPMENT",
"name": "Office equipment",
"description": "Computers, printers, phones, and other office equipment",
"depreciation_method": "saldo",
"ifrs_standard": "IAS 16",
"no": {
"saldogruppe": "a",
"depreciation_rate": "0.30",
"default_asset_account": "1280",
"default_accumulated_account": "1299",
"default_expense_account": "6015"
}
},
{
"code": "MOTOR_VEHICLES",
"name": "Motor vehicles",
"description": "Cars and other passenger vehicles",
"depreciation_method": "saldo",
"ifrs_standard": "IAS 16",
"no": {
"saldogruppe": "d",
"depreciation_rate": "0.20",
"default_asset_account": "1230",
"default_accumulated_account": "1299",
"default_expense_account": "6010"
}
},
{
"code": "SOFTWARE",
"name": "Software",
"description": "Purchased or internally developed software",
"depreciation_method": "linear",
"ifrs_standard": "IAS 38",
"no": {
"saldogruppe": null,
"depreciation_rate": "0.33",
"default_asset_account": "1060",
"default_accumulated_account": "1299",
"default_expense_account": "6029"
}
}
]
The response above shows a subset. The full response includes all 18 asset classes.
Asset Class Attributes
| Attribute | Type | Description |
|---|---|---|
| code | string | Unique asset class code (e.g. OFFICE_EQUIPMENT, MOTOR_VEHICLES) |
| name | string | Localized display name |
| description | string | Localized description of what the class covers |
| depreciation_method | string | Method used: saldo (declining balance), linear, or none |
| ifrs_standard | string | Applicable IFRS standard (IAS 16, IAS 38, or IAS 40) |
| no.saldogruppe | string or null | Norwegian tax saldogruppe (a-j), or null for linear/non-depreciable assets |
| no.depreciation_rate | string | Maximum annual depreciation rate (e.g. "0.30" = 30%) |
| no.default_asset_account | string | Default GL account code for the asset balance |
| no.default_accumulated_account | string or null | Default GL account for accumulated depreciation |
| no.default_expense_account | string or null | Default GL account for depreciation expense |
Available Asset Classes
| Code | Name | Method | IFRS | Saldogruppe | Rate |
|---|---|---|---|---|---|
OFFICE_EQUIPMENT |
Office equipment | saldo | IAS 16 | a | 30% |
GOODWILL |
Goodwill | saldo | IAS 38 | b | 20% |
COMMERCIAL_VEHICLES |
Commercial vehicles | saldo | IAS 16 | c | 24% |
MACHINERY_AND_PLANT |
Machinery and plant | saldo | IAS 16 | d | 20% |
MOTOR_VEHICLES |
Motor vehicles | saldo | IAS 16 | d | 20% |
FURNITURE_AND_FIXTURES |
Furniture and fixtures | saldo | IAS 16 | d | 20% |
SHIPS_AND_VESSELS |
Ships and vessels | saldo | IAS 16 | e | 14% |
AIRCRAFT |
Aircraft | saldo | IAS 16 | f | 12% |
POWER_DISTRIBUTION |
Power distribution | saldo | IAS 16 | g | 5% |
BUILDINGS_AND_STRUCTURES |
Buildings and structures | saldo | IAS 16 | h | 4% |
AGRICULTURAL_BUILDINGS |
Agricultural buildings | saldo | IAS 16 | h | 6% |
COMMERCIAL_BUILDINGS |
Commercial buildings | saldo | IAS 16 | i | 2% |
BUILDING_INSTALLATIONS |
Building installations | saldo | IAS 16 | j | 10% |
LAND |
Land | none | IAS 16 | — | 0% |
PATENTS_AND_LICENSES |
Patents and licenses | linear | IAS 38 | — | 10% |
SOFTWARE |
Software | linear | IAS 38 | — | 33% |
RESEARCH_AND_DEVELOPMENT |
Research and development | linear | IAS 38 | — | 20% |
INVESTMENT_PROPERTY |
Investment property | saldo | IAS 40 | h | 4% |
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid request (e.g., missing required fields) |
| 403 | Forbidden (no access to client account) |
| 404 | Asset not found |
Business Rules
- Assets are associated with a specific client account
- Users must have access to the client account to manage its assets
- The client_account_id cannot be changed after asset creation
- Each asset is automatically assigned a unique sequence number
- Creation and update timestamps and user IDs are automatically tracked
Common Use Cases
- Creating an inventory of company assets
- Tracking office equipment and furniture
- Managing vehicle fleet assets
- Recording property and real estate holdings
Best Practices
- Use clear and descriptive names for assets
- Maintain consistent naming conventions
- Regularly review and update asset information
- Use the sequence_number for internal reference