Skip to content

Tenant API v1 — Assets

Base path: /api/tenant/v1

Middleware: auth:tenant-api, tenant.user, verified, module:assets, plus permission middleware / policies.

Assignee scoping: without assets.assign (and not superadmin), list/stats/view/update only include assets where assigned_to is the current user.

Stats

GET /assets/stats

Same filters as list (minus pagination/sort). Payload includes:

total_assets, my_assets, unassigned, active, in_repair, retired, disposed, scope (org|mine).

Assets CRUD

GET /assets

Query: search (name, number, serial_number, manufacturer, model, location), status, category, assigned_to (unassigned or user id), my_assets, trashed, sort, direction, page, per_page.

List items include latest_note and nested assignee / creator / optional vendor / optional employee.

POST /assets

Body:

FieldRules
namerequired, string
statusactive | in_repair | retired | disposed (default active)
categoryequipment | furniture | vehicle | electronics | software_license | other
manufacturer, model, serial_number, locationoptional strings
purchased_at, warranty_ends_atoptional dates
purchase_costoptional numeric
currencyoptional, max 3 chars
assigned_tooptional user id (EligibleAssetAssignee — same pool as leads; owners excluded for explicit assign; null clears)
vendor_idoptional; requires Vendors entitled (LinkableVendor)
employee_idoptional; requires Employees entitled (LinkableEmployee)

number is server-generated (AST- + sequence; prefix from assets_number_prefix).

GET /assets/{id}

Includes assignee, creator, vendor, employee, notes, and activities. Embedded notes and timeline/domain activities are newest-first (created_at DESC, then id DESC).

PUT /assets/{id}

Partial update of asset fields (including soft FKs and assigned_to).

DELETE /assets/{id}

Soft delete. Permission: assets.delete.

POST /assets/{id}/restore

Restore a soft-deleted asset. Permission: assets.restore.

DELETE /assets/{id}/force

Permanently delete a soft-deleted asset. Permission: assets.force.delete.

Actions

POST /assets/{id}/assign

{ "assigned_to": number|null } — must be an eligible custodian (CRM lead pool) or null to unassign. Workspace owners cannot be selected for explicit assign.

POST /assets/{id}/notes

{ "body": string }

GET /assets/{id}/timeline

Asset activity timeline entries.

Official documentation for the EloSync SaaS Platform.