# Fixed assets

> Fixed assets and their types, for depreciation.

Part of the [Prosaic API reference](https://developer.prosaic.works/docs/api.md). Base URL: `https://app.prosaic.works/api/public/v1`. Authenticate with `Authorization: Bearer <API key or access token>`.

## List fixed asset types (categories) for an entity

`GET /api/public/v1/entities/{entityId}/fixed-asset-types`

SDK: `prosaic.fixedAssetTypes.list(entityId)`

Returns all fixed asset types (categories) configured for the specified entity.
Asset types define default depreciation settings and account mappings.
Includes mappedCode on accounts to support external system integrations (e.g., Xero).

### Path parameters

- `entityId` (string, required)

### Responses

- `200`: Successful response
  - `data` (array of objects, required)
    - `id` (string, required)
    - `name` (string, required)
    - `depreciationMethod` (string, required)
    - `usefulLifeYears` (number, nullable, required)
    - `depreciationRate` (number, nullable, required)
    - `assetAccount` (object, required)
      - `id` (string, required)
      - `code` (string, required)
      - `name` (string, required)
      - `mappedCode` (string, nullable, required)
    - `accumulatedDepreciationAccount` (object, required)
      - `id` (string, required)
      - `code` (string, required)
      - `name` (string, required)
      - `mappedCode` (string, nullable, required)
    - `depreciationExpenseAccount` (object, required)
      - `id` (string, required)
      - `code` (string, required)
      - `name` (string, required)
      - `mappedCode` (string, nullable, required)
    - `privateUseAccount` (object, nullable, required)
      - `id` (string, required)
      - `code` (string, required)
      - `name` (string, required)
      - `mappedCode` (string, nullable, required)
  - `meta` (object)
    - `count` (number, required)
- `400`: Bad request - missing or invalid parameters
  - `error` (string)
  - `code` (string)
- `401`: Unauthorized - Invalid or missing API key
  - `error` (string)
- `403`: Forbidden - No access to the specified entity
  - `error` (string)
  - `code` (string)
- `500`: Internal server error
  - `error` (string)
  - `code` (string)

### Example (Node SDK)

```ts
const { data } = await prosaic.fixedAssetTypes.list(entityId);
```

### Example (curl)

```bash
curl https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/fixed-asset-types \
  -H "Authorization: Bearer $PROSAIC_API_KEY"
```

## Create a new fixed asset type (category)

`POST /api/public/v1/entities/{entityId}/fixed-asset-types`

SDK: `prosaic.fixedAssetTypes.create(entityId, params)`

Creates a new fixed asset type for the specified entity.
Asset types define default depreciation settings and account mappings for fixed assets.

### Path parameters

- `entityId` (string, required)

### Request body

Content type: `application/json`

- `name` (string, required)
- `depreciationMethod` (string, required)
- `assetAccountId` (string, required)
- `accumulatedDepreciationAccountId` (string, required)
- `depreciationExpenseAccountId` (string, required)
- `privateUseAccountId` (string, nullable, required)
- `usefulLifeYears` (number, nullable)
- `depreciationRate` (number, nullable)

### Responses

- `201`: Successful response
  - `data` (object, required)
    - `id` (string, required)
    - `name` (string, required)
    - `depreciationMethod` (string, required)
    - `usefulLifeYears` (number, nullable, required)
    - `depreciationRate` (number, nullable, required)
    - `assetAccount` (object, required)
      - `id` (string, required)
      - `code` (string, required)
      - `name` (string, required)
      - `mappedCode` (string, nullable, required)
    - `accumulatedDepreciationAccount` (object, required)
      - `id` (string, required)
      - `code` (string, required)
      - `name` (string, required)
      - `mappedCode` (string, nullable, required)
    - `depreciationExpenseAccount` (object, required)
      - `id` (string, required)
      - `code` (string, required)
      - `name` (string, required)
      - `mappedCode` (string, nullable, required)
    - `privateUseAccount` (object, nullable, required)
      - `id` (string, required)
      - `code` (string, required)
      - `name` (string, required)
      - `mappedCode` (string, nullable, required)
- `400`: Bad request - validation failed
  - `error` (string)
  - `code` (string)
- `401`: Unauthorized - Invalid or missing API key
  - `error` (string)
- `403`: Forbidden - No access to the specified entity
  - `error` (string)
  - `code` (string)
- `500`: Internal server error
  - `error` (string)
  - `code` (string)

### Example (Node SDK)

```ts
const { data } = await prosaic.fixedAssetTypes.create(entityId, {
  name: 'Example Ltd',
  depreciationMethod: 'string',
  assetAccountId: 'ASSET_ACCOUNT_ID',
  accumulatedDepreciationAccountId: 'ACCUMULATED_DEPRECIATION_ACCOUNT_ID',
  depreciationExpenseAccountId: 'DEPRECIATION_EXPENSE_ACCOUNT_ID',
  privateUseAccountId: 'PRIVATE_USE_ACCOUNT_ID',
});
```

### Example (curl)

```bash
curl -X POST https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/fixed-asset-types \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Ltd",
    "depreciationMethod": "string",
    "assetAccountId": "ASSET_ACCOUNT_ID",
    "accumulatedDepreciationAccountId": "ACCUMULATED_DEPRECIATION_ACCOUNT_ID",
    "depreciationExpenseAccountId": "DEPRECIATION_EXPENSE_ACCOUNT_ID",
    "privateUseAccountId": "PRIVATE_USE_ACCOUNT_ID"
  }'
```

## List fixed assets for an entity

`GET /api/public/v1/entities/{entityId}/fixed-assets`

SDK: `prosaic.fixedAssets.list(entityId, params)`

Returns paginated fixed assets for the specified entity.
Includes asset details, depreciation information, and current book values.

### Path parameters

- `entityId` (string, required)

### Query parameters

- `page` (integer): Page number (starts at 1) Default: `1`.
- `pageSize` (integer): Number of items per page. Default: `20`.
- `status` (string): Filter by asset status. One of: `draft`, `active`, `disposed`.

### Responses

- `200`: Successful response
  - `data` (array of objects, required)
    - `id` (string, required)
    - `name` (string, required)
    - `assetNumber` (string, nullable, required)
    - `description` (string, nullable, required)
    - `status` (string, required)
    - `purchaseDate` (string, nullable, required)
    - `startDate` (string, nullable, required)
    - `purchasePrice` (number, nullable, required)
    - `residualValue` (number, nullable, required)
    - `businessUsePercentage` (number, nullable, required)
    - `initialAccumulatedDepreciation` (number, nullable, required)
    - `depreciationMethod` (string, nullable, required)
    - `usefulLifeYears` (number, nullable, required)
    - `depreciationRate` (number, nullable, required)
    - `methodParams` (any, required)
    - `disposalDate` (string, nullable, required)
    - `disposalProceeds` (number, nullable, required)
    - `bookValue` (number, nullable, required)
    - `assetType` (object, nullable, required)
      - `id` (string, required)
      - `name` (string, required)
    - `mostRecentDepreciationRun` (object, nullable, required)
      - `year` (number, required)
      - `month` (number, required)
      - `accumulatedDepreciation` (number, required)
    - `createdAt` (string, required)
    - `updatedAt` (string, nullable, required)
  - `pagination` (object, required)
    - `currentPage` (number, required)
    - `pageSize` (number, required)
    - `totalCount` (number, required)
    - `totalPages` (number, required)
    - `hasNextPage` (boolean, required)
    - `hasPreviousPage` (boolean, required)
- `400`: Bad request - missing or invalid parameters
  - `error` (string)
  - `code` (string)
  - `field` (string)
  - `value` (string)
- `401`: Unauthorized - Invalid or missing API key
  - `error` (string)
- `403`: Forbidden - No access to the specified entity
  - `error` (string)
  - `code` (string)
- `500`: Internal server error
  - `error` (string)
  - `code` (string)

### Example (Node SDK)

```ts
const page = await prosaic.fixedAssets.list(entityId);
```

### Example (curl)

```bash
curl https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/fixed-assets \
  -H "Authorization: Bearer $PROSAIC_API_KEY"
```

## Get a single fixed asset by ID

`GET /api/public/v1/entities/{entityId}/fixed-assets/{assetId}`

SDK: `prosaic.fixedAssets.retrieve(entityId, assetId)`

Returns a single fixed asset by its ID for the specified entity.
Includes asset details, depreciation information, and current book value.

### Path parameters

- `entityId` (string, required)
- `assetId` (string, required)

### Responses

- `200`: Successful response
  - `data` (object, required)
    - `id` (string, required)
    - `name` (string, required)
    - `assetNumber` (string, nullable, required)
    - `description` (string, nullable, required)
    - `status` (string, required)
    - `purchaseDate` (string, nullable, required)
    - `startDate` (string, nullable, required)
    - `purchasePrice` (number, nullable, required)
    - `residualValue` (number, nullable, required)
    - `businessUsePercentage` (number, nullable, required)
    - `initialAccumulatedDepreciation` (number, nullable, required)
    - `depreciationMethod` (string, nullable, required)
    - `usefulLifeYears` (number, nullable, required)
    - `depreciationRate` (number, nullable, required)
    - `methodParams` (any, required)
    - `disposalDate` (string, nullable, required)
    - `disposalProceeds` (number, nullable, required)
    - `bookValue` (number, nullable, required)
    - `assetType` (object, nullable, required)
      - `id` (string, required)
      - `name` (string, required)
    - `mostRecentDepreciationRun` (object, nullable, required)
      - `year` (number, required)
      - `month` (number, required)
      - `accumulatedDepreciation` (number, required)
    - `createdAt` (string, required)
    - `updatedAt` (string, nullable, required)
  - `meta` (object)
    - `count` (number, required)
- `400`: Bad request - missing or invalid parameters
  - `error` (string)
  - `code` (string)
- `401`: Unauthorized - Invalid or missing API key
  - `error` (string)
- `403`: Forbidden - No access to the specified entity or asset
  - `error` (string)
  - `code` (string)
- `404`: Not found - Asset not found
  - `error` (string)
  - `code` (string)
- `500`: Internal server error
  - `error` (string)
  - `code` (string)

### Example (Node SDK)

```ts
const { data } = await prosaic.fixedAssets.retrieve(entityId, assetId);
```

### Example (curl)

```bash
curl https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/fixed-assets/$ASSET_ID \
  -H "Authorization: Bearer $PROSAIC_API_KEY"
```

## Create a new fixed asset

`POST /api/public/v1/entities/{entityId}/fixed-assets`

SDK: `prosaic.fixedAssets.create(entityId, params)`

Creates a new fixed asset for the specified entity.
Can create the asset as either a draft or immediately as active.
When creating as active, all required fields must be provided and pass validation.

### Path parameters

- `entityId` (string, required)

### Request body

Content type: `application/json`

- One of — status: active:
  - `name` (string, required)
  - `entityFixedAssetTypeId` (any, required)
  - `purchaseDate` (string, required)
  - `startDate` (string, required)
  - `purchasePrice` (any, required)
  - `depreciationMethod` (string, required)
  - `assetNumber` (string)
  - `description` (string)
  - `costLimit` (any)
  - `residualValue` (any)
  - `businessUsePercentage` (number)
  - `initialAccumulatedDepreciation` (any)
  - `usefulLifeYears` (number)
  - `depreciationRate` (number, nullable)
  - `immediateExpensePercentage` (number)
  - `dimensionOptionIds` (array of strings)
  - `status` (string, required): One of: `active`.
- One of — status: draft:
  - `name` (string, required)
  - `entityFixedAssetTypeId` (string, nullable)
  - `assetNumber` (string)
  - `description` (string)
  - `purchaseDate` (string)
  - `startDate` (string)
  - `purchasePrice` (any)
  - `costLimit` (any)
  - `residualValue` (any)
  - `businessUsePercentage` (number)
  - `initialAccumulatedDepreciation` (any)
  - `depreciationMethod` (string, nullable)
  - `usefulLifeYears` (number)
  - `depreciationRate` (number, nullable)
  - `immediateExpensePercentage` (number)
  - `dimensionOptionIds` (array of strings)
  - `status` (string): One of: `draft`.

### Responses

- `201`: Successful response
  - `data` (object, required)
    - `id` (string, required)
    - `name` (string, required)
    - `assetNumber` (string, nullable, required)
    - `description` (string, nullable, required)
    - `status` (string, required)
    - `purchaseDate` (string, nullable, required)
    - `startDate` (string, nullable, required)
    - `purchasePrice` (number, nullable, required)
    - `residualValue` (number, nullable, required)
    - `businessUsePercentage` (number, nullable, required)
    - `initialAccumulatedDepreciation` (number, nullable, required)
    - `depreciationMethod` (string, nullable, required)
    - `usefulLifeYears` (number, nullable, required)
    - `depreciationRate` (number, nullable, required)
    - `methodParams` (any, required)
    - `disposalDate` (string, nullable, required)
    - `disposalProceeds` (number, nullable, required)
    - `bookValue` (number, nullable, required)
    - `assetType` (object, nullable, required)
      - `id` (string, required)
      - `name` (string, required)
    - `mostRecentDepreciationRun` (object, nullable, required)
      - `year` (number, required)
      - `month` (number, required)
      - `accumulatedDepreciation` (number, required)
    - `createdAt` (string, required)
    - `updatedAt` (string, nullable, required)
- `400`: Bad request - validation failed
  - `error` (string)
  - `code` (string)
  - `errors` (array of objects)
    - `field` (string)
    - `message` (string)
- `401`: Unauthorized - Invalid or missing API key
  - `error` (string)
- `403`: Forbidden - No access to the specified entity
  - `error` (string)
  - `code` (string)
- `404`: Asset type not found
  - `error` (string)
  - `code` (string)
- `500`: Internal server error
  - `error` (string)
  - `code` (string)

### Example (Node SDK)

```ts
const { data } = await prosaic.fixedAssets.create(entityId, {
  name: 'Example Ltd',
  entityFixedAssetTypeId: 'ENTITY_FIXED_ASSET_TYPE_ID',
  purchaseDate: '2026-04-01',
  startDate: '2026-04-01',
  purchasePrice: '100.00',
  depreciationMethod: 'string',
  status: 'active',
});
```

### Example (curl)

```bash
curl -X POST https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/fixed-assets \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Ltd",
    "entityFixedAssetTypeId": "ENTITY_FIXED_ASSET_TYPE_ID",
    "purchaseDate": "2026-04-01",
    "startDate": "2026-04-01",
    "purchasePrice": "100.00",
    "depreciationMethod": "string",
    "status": "active"
  }'
```

## Update a draft fixed asset

`PATCH /api/public/v1/entities/{entityId}/fixed-assets/{assetId}`

SDK: `prosaic.fixedAssets.update(entityId, assetId, params)`

Updates only the supplied fields on a draft fixed asset. Omitted fields keep
their stored values; send null to clear a nullable field. The asset's own
depreciation method, rate and useful life override its asset type's defaults.
Rate and useful life are exclusive: setting one clears the other, and
method "none" clears both. Active and disposed assets cannot be edited here.

### Path parameters

- `entityId` (string, required)
- `assetId` (string, required)

### Request body

Content type: `application/json`

- `name` (string)
- `dimensionOptionIds` (array of strings)
- `depreciationRate` (number, nullable)
- `purchaseDate` (string)
- `startDate` (string)
- `purchasePrice` (any)
- `residualValue` (any)
- `initialAccumulatedDepreciation` (any)
- `entityFixedAssetTypeId` (string, nullable)
- `assetNumber` (string, nullable)
- `description` (string, nullable)
- `businessUsePercentage` (number, nullable)
- `depreciationMethod` (string, nullable): One of: `none`, `straight_line`, `diminishing_value`.
- `usefulLifeYears` (number, nullable)
- `immediateExpensePercentage` (number)

### Responses

- `200`: Successful response
  - `data` (object, required)
    - `id` (string, required)
    - `name` (string, required)
    - `assetNumber` (string, nullable, required)
    - `description` (string, nullable, required)
    - `status` (string, required)
    - `purchaseDate` (string, nullable, required)
    - `startDate` (string, nullable, required)
    - `purchasePrice` (number, nullable, required)
    - `residualValue` (number, nullable, required)
    - `businessUsePercentage` (number, nullable, required)
    - `initialAccumulatedDepreciation` (number, nullable, required)
    - `depreciationMethod` (string, nullable, required)
    - `usefulLifeYears` (number, nullable, required)
    - `depreciationRate` (number, nullable, required)
    - `methodParams` (any, required)
    - `disposalDate` (string, nullable, required)
    - `disposalProceeds` (number, nullable, required)
    - `bookValue` (number, nullable, required)
    - `assetType` (object, nullable, required)
      - `id` (string, required)
      - `name` (string, required)
    - `mostRecentDepreciationRun` (object, nullable, required)
      - `year` (number, required)
      - `month` (number, required)
      - `accumulatedDepreciation` (number, required)
    - `createdAt` (string, required)
    - `updatedAt` (string, nullable, required)
  - `meta` (object)
    - `count` (number, required)
- `400`: Invalid body, or depreciation, business use, asset number or dimension rules failed
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - No edit access to the specified entity
- `404`: Fixed asset or asset type not found
- `409`: The asset is not a draft
- `500`: Internal server error

### Example (Node SDK)

```ts
const { data } = await prosaic.fixedAssets.update(entityId, assetId, {
  name: 'Example Ltd',
  dimensionOptionIds: ['DIMENSION_OPTION_ID'],
  depreciationRate: 1,
  purchaseDate: '2026-04-01',
  startDate: '2026-04-01',
  purchasePrice: '100.00',
  residualValue: 'string',
  initialAccumulatedDepreciation: 'string',
  entityFixedAssetTypeId: 'ENTITY_FIXED_ASSET_TYPE_ID',
  assetNumber: 'string',
  description: 'Office supplies',
  businessUsePercentage: 1,
  depreciationMethod: 'none',
  usefulLifeYears: 1,
  immediateExpensePercentage: 1,
});
```

### Example (curl)

```bash
curl -X PATCH https://app.prosaic.works/api/public/v1/entities/$ENTITY_ID/fixed-assets/$ASSET_ID \
  -H "Authorization: Bearer $PROSAIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example Ltd",
    "dimensionOptionIds": [
      "DIMENSION_OPTION_ID"
    ],
    "depreciationRate": 1,
    "purchaseDate": "2026-04-01",
    "startDate": "2026-04-01",
    "purchasePrice": "100.00",
    "residualValue": "string",
    "initialAccumulatedDepreciation": "string",
    "entityFixedAssetTypeId": "ENTITY_FIXED_ASSET_TYPE_ID",
    "assetNumber": "string",
    "description": "Office supplies",
    "businessUsePercentage": 1,
    "depreciationMethod": "none",
    "usefulLifeYears": 1,
    "immediateExpensePercentage": 1
  }'
```