POST
https://dev-api.unduit.com/api/v1/assets/add-assetAdd Asset
This endpoint allows you to add a new asset to the Manage App inventory system. It is typically used by IT administrators or asset managers to register company equipment such as laptops, desktops, phones, or other devices.
Assets added through this endpoint will be available for tracking, assignment, warranty monitoring, and lifecycle management in the application.
When adding an asset, the email field is mandatory only if the status type is set to "deployed". For all other status types, including "undeployed", "deployable", "archived", and "pending", the email field is not required.
Request Body Parameters:
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| product_type | String | ✅ Yes | Laptop | Type of asset being added (e.g., Laptop, Mobile) |
| product_name | String | ✅ Yes | MacBook Pro 2 | Full product name including model/version |
| manufacturer | String | ✅ Yes | Apple | Brand or manufacturer of the device |
| serial_number | String | ✅ Yes | SN-XYZ-123456 | Device serial number (must be unique) |
| asset_status | String | ✅ Yes | In Use | Current state of the asset (In Use, Available, Retired) |
| model_number | String | ❌ No | A23338 | Model identifier from the manufacturer |
| sku | String | ❌ No | MBP-16-2021 | Internal stock keeping unit ID |
| asset_id | String | ✅ Yes | IT-1234-ABCD-5678 | Unique internal asset identifier |
| condition | String | ✅ Yes | Good | Condition of the asset (New, Good, Fair, Damaged) |
| purchase_date | Date | ✅ Yes | 2023-01-15 | Purchase or lease date (ISO format YYYY-MM-DD) |
| purchase_cost | Number | ❌ No | 1999.99 | Cost of the asset at acquisition |
| purchase_type | String | ✅ Yes | Leased | Acquisition method (Purchased, Leased) |
| warranty_start | Date | ❌ No | 2023-01-15 | Warranty start date |
| warranty_expire | Date | ❌ No | 2025-01-14 | Warranty end date |
| warranty_type | String | ❌ No | AppleCare | Type of warranty coverage (e.g., AppleCare) |
| assign_to_email | String | ❌ No | john.doe@example.com | Email should be required if the status type is deployed |
| department | String | ❌ No | IT | Department responsible for the asset |
| location_name | String | ❌ No | Headquarters | Physical or office location of the asset |
| imei | String | ❌ No | (optional or empty) | IMEI number (for phones/tablets only) |
Did this page help you?
Request
curl --location 'https://dev-api.unduit.com/api/v1/assets/add-asset' \
--header 'Content-Type: application/json' \
--data-raw '{
"product_type": "Laptop",
"product_name": "MacBook 2 Pro",
"manufacturer": "Apple",
"serial_number": "2322334e234",
"asset_status": "in use",
"model_number": "A23338",
"sku": "MBP-16-2021",
"asset_id": "IT-12342443122ddes341234",
"condition": "Good",
"purchase_date": "2023-01-15",
"purchase_cost": 1999.99,
"purchase_type": "Leased",
"warranty_start": "2023-01-15",
"warranty_expire": "2025-01-14",
"warranty_type": "AppleCare",
"assign_to_email": "john.doe@example.com",
"department": "IT",
"location_name": "Headquarters",
"imei": ""
}'Success Response (200)
{
"success": "Asset created successfully",
"data": {
"id": 24546,
"company_id": 317,
"user_id": 0,
"purchase_id": 0,
"product_type_id": 4108,
"product_category_id": 1,
"model_id": 1196,
"asset_id": "",
"customer_asset_id": "IT-112342443E1234",
"serial_number": "2312E2334E234",
"model_number": "A23338",
"status_id": 60,
"condition": "Good",
"purchase_date": "2023-01-15",
"price": 1999.99,
"purchase_type": 1,
"warranty_start": "2023-01-15",
"warranty_expire": "2025-01-14",
"warranty_type": "AppleCare",
"assign_to": 8019,
"department_id": 88,
"asset_location_beta": 132,
"imei": "",
"imei2": "",
"asset_assign_date": "",
"vendor_id": 0,
"currency_code": "",
"currency_symbol": "",
"sku": "MBP-16-2021",
"address_1": "",
"city": "",
"state": "",
"zip": "",
"is_old": 0,
"created_at": "2025-06-02 04:48:25",
"updatedAt": "2025-06-02T04:48:25.221Z",
"createdAt": "2025-06-02T04:48:25.216Z",
"asset_number": "2454620250602044825"
}
}Error Responses
400 Bad Request
{
"message": "Invalid request parameters",
"errors": {
"serial_number": "Serial number is required",
"product_type": "Product type is required"
}
}401 Unauthorized
{
"message": "Authentication token is missing or invalid"
}409 Conflict
{
"message": "Asset with serial number 'SN-XYZ-123456' already exists"
}422 Unprocessable Entity
{
"message": "Validation failed",
"errors": {
"purchase_date": "Invalid date format. Expected YYYY-MM-DD",
"purchase_cost": "Must be a positive number"
}
}