API Documentation
RESTful API · JSON responses · Bearer token auth
Authentication
All API requests require a Bearer token in the Authorization header. Obtain tokens via the /api/auth/login endpoint. Access tokens expire after 15 minutes; use the refresh token to obtain new ones.
Authorization: Bearer <your_access_token>Base URL
https://asset-node.com/apiRate Limits
API requests are rate-limited to 60 requests per minute per authenticated user. Authentication endpoints have stricter limits (5–10 req/min). When exceeded, the API returns 429 Too Many Requests.
Key Endpoints
/api/hardwareList all hardware assets with filters, pagination, and search./api/hardwareRegister a new hardware asset./api/hardware/:idGet detailed information about a specific asset./api/hardware/:idUpdate fields on an existing hardware asset./api/employeesList employees with department and status filters./api/employeesCreate a new employee record./api/assignmentsCreate a new hardware assignment to an employee./api/assignments/:id/returnInitiate a return for an active assignment./api/licensesList software licenses with seat tracking./api/audit-logQuery the full audit trail with time-range filters./api/webhooksRegister webhook endpoints for asset events./api/reports/depreciationGenerate depreciation reports for tax and compliance./api/dashboardGet KPI overview: total assets, assignments, alerts.Pagination
List endpoints support ?page=1&limit=50 query parameters. Responses include total, page, and pages fields for client-side pagination.
Webhooks
Subscribe to real-time events (asset created, assignment changed, maintenance due) by registering webhook URLs. Payloads are signed with HMAC-SHA256 for verification.
Example: List Hardware
curl -H "Authorization: Bearer $TOKEN" \ https://asset-node.com/api/hardware?page=1&limit=10&category=laptopResponse (200 OK):
{ "data": [{ "_id": "...", "model": "MacBook Pro 16\"", "category": "laptop", ... }], "total": 42, "page": 1, "pages": 5 }Error Codes
SDKs & Tools
Official client libraries are coming soon. In the meantime, use any HTTP client — the API follows REST conventions with standard JSON request/response bodies.