Skip to main content

Inventory Device Serial Operation

Updates device inventory information using the device's serial number.

Base URL: https://control.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

PUT /inventory_device_serial_operation/{serial_number}/

Updates inventory information for a specific device identified by its serial number. This endpoint allows you to modify device details, status, location, or other inventory-related properties.

Parameters:

Parameter Type In Required Description
serial_number string path Yes Unique serial number of the device to update
data string body Yes JSON payload containing the device information to update

Example Request:

PUT /api/v1/inventory_device_serial_operation/SN123456789/
Content-Type: application/json
Authorization: Bearer <your-api-token>

{
  "device_name": "Laptop-HR-001",
  "status": "active",
  "location": "Building A - Floor 2",
  "assigned_user": "john.doe@company.com",
  "department": "Human Resources",
  "purchase_date": "2023-08-15",
  "warranty_expiry": "2026-08-15",
  "notes": "Updated RAM to 16GB"
}

Example Response:

{
  "serial_number": "SN123456789",
  "device_name": "Laptop-HR-001",
  "status": "active",
  "location": "Building A - Floor 2",
  "assigned_user": "john.doe@company.com",
  "department": "Human Resources",
  "purchase_date": "2023-08-15",
  "warranty_expiry": "2026-08-15",
  "notes": "Updated RAM to 16GB",
  "last_updated": "2023-11-15T10:30:00Z"
}

Response Codes:

Status Description
200 Device information successfully updated
400 Bad request - invalid data format or missing required fields
401 Unauthorized - invalid or missing authentication token
404 Device with the specified serial number not found
422 Unprocessable entity - validation errors in the provided data
500 Internal server error

Best Practices

  • Serial Number Format: Ensure the serial number in the URL path exactly matches the device's registered serial number (case-sensitive)
  • Partial Updates: You can include only the fields you want to update in the request body - unchanged fields will retain their current values
  • Data Validation: Validate date formats (YYYY-MM-DD) and email addresses before sending requests
  • Error Handling: Always check the response status code and handle 404 errors for non-existent serial numbers
  • Rate Limiting: Implement appropriate delays between bulk update operations to avoid overwhelming the API
  • Audit Trail: Consider logging update operations locally for audit and rollback purposes