Maintaining accurate warranty expiration dates and hardware specifications across hundreds or thousands of enterprise laptops is one of the most frustrating chores in IT Asset Management (ITAM).
Most organizations running Snipe-IT have complete lists of serial numbers, but fields like warranty expiration date, purchase date, CPU model, and factory RAM/SSD capacity often remain blank.
In this guide, we will demonstrate how to automate warranty tracking and factory hardware enrichment in Snipe-IT using an open-source Python synchronizer.
The Snipe-IT Warranty Architecture Challenge
In Snipe-IT, warranty_expires is not an independently writable database column. Instead, Snipe-IT dynamically calculates expiration dates using:
warranty_expires = purchase_date + warranty_months
If an API script attempts to send {"warranty_expires": "2026-05-01"}, Snipe-IT simply ignores the value. To update expiration dates properly via API, a synchronizer must:
- Supply or preserve the asset's
purchase_date. - Accurately calculate the integer difference in
warranty_months. - Submit both fields so Snipe-IT renders the correct expiration date across all UI dashboards.
How the Synchronizer Works
The open-source checkwarranty/snipeit-warranty-sync tool operates with zero external pip dependencies, using Python 3 standard library:
- Queries Snipe-IT hardware API for assets missing warranty dates.
- Detects manufacturer (Dell, Lenovo, HP, Apple) via serial number syntax or model name.
- Queries CheckWarranty API to fetch confirmed warranty coverage and factory component configurations.
- Updates Snipe-IT asset records: sets
purchase_dateandwarranty_months, and maps factory specs (CPU, RAM, SSD, display) to custom fields.
Step-by-Step Setup
Step 1: Clone and Configure
git clone https://github.com/checkwarranty/snipeit-warranty-sync.git
cd snipeit-warranty-sync
cp .env.example .env
Configure your environment credentials in .env:
SNIPEIT_URL=https://assets.yourcompany.com
SNIPEIT_API_TOKEN=your_snipe_it_personal_access_token
CHECKWARRANTY_API_KEY=cw_live_your_api_key
# Optional: Map factory specs to your Snipe-IT custom fields
FIELD_WARRANTY_EXPIRATION=_snipeit_warranty_exp_5
FIELD_CPU=_snipeit_cpu_1
FIELD_RAM=_snipeit_ram_2
FIELD_STORAGE=_snipeit_storage_3
Step 2: Safe Dry-Run Simulation
Always verify what the script would change before updating your production database:
python sync.py --dry-run --limit 25
The output displays simulated payloads:
[INFO] Querying CheckWarranty: #104 [Serial: 8HG76F2, Brand: dell]...
[INFO] [DRY RUN] Would update asset #104 (8HG76F2) with: {
'purchase_date': '2023-01-15',
'warranty_months': 36,
'_snipeit_cpu_1': 'Intel Core i7-1185G7',
'_snipeit_ram_2': '16GB DDR4',
'_snipeit_storage_3': '512GB NVMe SSD'
}
Step 3: Run via Docker or Cron
To run unattended via Docker Container:
docker run --rm \
-e SNIPEIT_URL="https://assets.yourcompany.com" \
-e SNIPEIT_API_TOKEN="token" \
-e CHECKWARRANTY_API_KEY="cw_live_..." \
ghcr.io/checkwarranty/snipeit-warranty-sync:latest --limit 100
Or add to Linux cron (crontab -e):
0 2 * * * cd /opt/snipeit-warranty-sync && python3 sync.py >> /var/log/snipeit-sync.log 2>&1
Resources & Discussion
- GitHub Repository: checkwarranty/snipeit-warranty-sync
- Snipe-IT Community Discussion: github.com/grokability/snipe-it/discussions/19966
- Reddit Thread: reddit.com/r/Snipe_IT
- CheckWarranty API Documentation: checkwarranty.info/docs/api
Top comments (0)