Assign Assets
Assign an existing asset to a user within the system.
POST
/api/v1/assets/assign/userDescription
This endpoint assigns an existing asset to a user within the system, based on the asset number and the user's email address. It's typically used by administrators or asset managers to link devices or hardware to specific employees for accountability and lifecycle tracking. Asset status type must be 'Deployable' to assign the asset.
Request
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| asset_number | string | Yes | The unique ID of the asset to assign |
| assign_to_email | string | Yes | The email of the user to whom the asset is being assigned |
| asset_status | string | Yes | Status of the asset post-assignment (e.g., Ready to Deploy) |
Related Endpoints
Did this page help you?
Request
curl -X POST https://dev-api.unduit.com/api/v1/assets/assign/user \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"asset_number": "441819700101000000",
"assign_to_email": "john.doe@example.com",
"asset_status": "Ready to Deploy"
}'Success Response (200)
{
"message": "Asset assigned successfully."
}Error Responses
400 Bad Request
{
"message": "Invalid asset number or user email"
}401 Unauthorized
{
"message": "Authentication token is missing or invalid"
}404 Not Found
{
"message": "Asset or user not found"
}409 Conflict
{
"message": "Asset is already assigned to a user"
}