Download OpenAPI specification:Download
API for managing asset part types
Retrieve a list of all asset part types with optional filtering and pagination
| limit | integer [ 1 .. 100 ] Default: 50 Maximum number of records to return |
| offset | integer >= 0 Default: 0 Number of records to skip for pagination |
| sort | string Field to sort by |
| order | string Default: "desc" Enum: "asc" "desc" Sort order (asc or desc) |
| filter | string Filter conditions in JSON format |
| search | string Search term for text fields |
{- "success": true,
- "data": [
- {
- "_id": "60f7b1b3e4b0e8b3f8b3f8b3",
- "name": "Engine Parts",
- "description": "string",
- "category": "Mechanical",
- "subcategory": "string",
- "specifications": {
- "material": "Steel",
- "dimensions": "10x5x2 cm",
- "weight": "0.5 kg"
}, - "compatibleAssetTypes": [
- "string"
], - "maintenanceSchedule": {
- "frequency": "daily",
- "intervalDays": 1,
- "description": "string"
}, - "warrantPeriod": 365,
- "supplier": "string",
- "standardCost": 0,
- "isActive": true,
- "metadata": { },
- "createdAt": "2023-01-15T08:00:00Z",
- "updatedAt": "2023-01-15T10:30:00Z"
}
], - "total": 0
}Create a new asset part type with the provided data
| name required | string Name of the asset part type |
| description | string Description of the asset part type |
| category required | string Category of the asset part type |
| subcategory | string Subcategory of the asset part type |
object Technical specifications | |
| compatibleAssetTypes | Array of strings List of compatible asset type IDs |
object | |
| warrantPeriod | integer Warranty period in days |
| supplier | string Default supplier ID |
| standardCost | number <double> >= 0 Standard cost of the part |
| isActive | boolean Default: true Whether the part type is active |
object Additional metadata |
{- "name": "Engine Parts",
- "description": "string",
- "category": "Mechanical",
- "subcategory": "string",
- "specifications": {
- "material": "Steel",
- "dimensions": "10x5x2 cm",
- "weight": "0.5 kg"
}, - "compatibleAssetTypes": [
- "string"
], - "maintenanceSchedule": {
- "frequency": "daily",
- "intervalDays": 1,
- "description": "string"
}, - "warrantPeriod": 365,
- "supplier": "string",
- "standardCost": 0,
- "isActive": true,
- "metadata": { }
}{- "success": true,
- "data": {
- "_id": "60f7b1b3e4b0e8b3f8b3f8b3",
- "name": "Engine Parts",
- "description": "string",
- "category": "Mechanical",
- "subcategory": "string",
- "specifications": {
- "material": "Steel",
- "dimensions": "10x5x2 cm",
- "weight": "0.5 kg"
}, - "compatibleAssetTypes": [
- "string"
], - "maintenanceSchedule": {
- "frequency": "daily",
- "intervalDays": 1,
- "description": "string"
}, - "warrantPeriod": 365,
- "supplier": "string",
- "standardCost": 0,
- "isActive": true,
- "metadata": { },
- "createdAt": "2023-01-15T08:00:00Z",
- "updatedAt": "2023-01-15T10:30:00Z"
}
}Retrieve a specific asset part type by its ID
| id required | string Asset part type ID |
{- "success": true,
- "data": {
- "_id": "60f7b1b3e4b0e8b3f8b3f8b3",
- "name": "Engine Parts",
- "description": "string",
- "category": "Mechanical",
- "subcategory": "string",
- "specifications": {
- "material": "Steel",
- "dimensions": "10x5x2 cm",
- "weight": "0.5 kg"
}, - "compatibleAssetTypes": [
- "string"
], - "maintenanceSchedule": {
- "frequency": "daily",
- "intervalDays": 1,
- "description": "string"
}, - "warrantPeriod": 365,
- "supplier": "string",
- "standardCost": 0,
- "isActive": true,
- "metadata": { },
- "createdAt": "2023-01-15T08:00:00Z",
- "updatedAt": "2023-01-15T10:30:00Z"
}
}Update an existing asset part type with new data
| id required | string Asset part type ID |
| name required | string Name of the asset part type |
| description | string Description of the asset part type |
| category required | string Category of the asset part type |
| subcategory | string Subcategory of the asset part type |
object Technical specifications | |
| compatibleAssetTypes | Array of strings List of compatible asset type IDs |
object | |
| warrantPeriod | integer Warranty period in days |
| supplier | string Default supplier ID |
| standardCost | number <double> >= 0 Standard cost of the part |
| isActive | boolean Default: true Whether the part type is active |
object Additional metadata |
{- "name": "Engine Parts",
- "description": "string",
- "category": "Mechanical",
- "subcategory": "string",
- "specifications": {
- "material": "Steel",
- "dimensions": "10x5x2 cm",
- "weight": "0.5 kg"
}, - "compatibleAssetTypes": [
- "string"
], - "maintenanceSchedule": {
- "frequency": "daily",
- "intervalDays": 1,
- "description": "string"
}, - "warrantPeriod": 365,
- "supplier": "string",
- "standardCost": 0,
- "isActive": true,
- "metadata": { }
}{- "success": true,
- "data": {
- "_id": "60f7b1b3e4b0e8b3f8b3f8b3",
- "name": "Engine Parts",
- "description": "string",
- "category": "Mechanical",
- "subcategory": "string",
- "specifications": {
- "material": "Steel",
- "dimensions": "10x5x2 cm",
- "weight": "0.5 kg"
}, - "compatibleAssetTypes": [
- "string"
], - "maintenanceSchedule": {
- "frequency": "daily",
- "intervalDays": 1,
- "description": "string"
}, - "warrantPeriod": 365,
- "supplier": "string",
- "standardCost": 0,
- "isActive": true,
- "metadata": { },
- "createdAt": "2023-01-15T08:00:00Z",
- "updatedAt": "2023-01-15T10:30:00Z"
}
}