How to Check Hardware Warranty in Bulk Inside Google Sheets: Complete REST API Guide & Free Script
Stop copy-pasting serial numbers into vendor portals. Learn how to transform Google Sheets into an automated hardware audit workstation using a free Google Apps Script and CheckWarranty REST API.
=CHECK_WARRANTY(A2, "auto")The formula spills 4 verified columns: Status, Expiration Date, Remaining Days, and Service Tier.
Check your device
Enter your serial or click an example to view a saved result from our database immediately. Checking your own device starts only when you submit. Sign in for bulk checks and exports.
The Spreadsheet Bottleneck: Moving Beyond Manual Lookup
Google Sheets is the universal operating system of warehouse intake, IT asset tracking, and refurbished hardware remarketing. Technicians paste hundreds of serial numbers from barcode scanners or packing manifests into column A — and then spend hours manually checking each device on manufacturer websites.
In this guide, we will transform your Google Spreadsheet into an automated audit engine. With our open-source Google Apps Script, typing =CHECK_WARRANTY(A2, "lenovo") automatically populates warranty status, expiration date, remaining days, and service entitlement tier directly into adjacent columns.
Step 1: Get Your Free CheckWarranty API Key
CheckWarranty provides an ultra-fast REST API designed for high-concurrency batch queries. To connect Google Sheets:
- 1. Sign Up: Create a free account at checkwarranty.info/dashboard. Every account receives 10 free scans instantly.
- 2. Generate API Key: Navigate to the API Keys tab in your dashboard and copy your secret bearer token.
Step 2: Add Google Apps Script to Your Spreadsheet
Open your Google Sheet, click on Extensions > Apps Script, replace any existing code with the following snippet, and save:
/**
* CheckWarranty Google Sheets Automation Connector
* @param {string} serial The device serial number or Service Tag
* @param {string} brand Optional brand hint: "lenovo", "dell", "hp", "apple", or "auto"
* @return {Array} Array of [Status, Expiration Date, Remaining Days, Entitlement Tier]
* @customfunction
*/
function CHECK_WARRANTY(serial, brand) {
if (!serial || String(serial).trim() === "") {
return [["", "", "", ""]];
}
// Replace with your CheckWarranty API key
const API_KEY = "YOUR_CHECKWARRANTY_API_KEY";
const ENDPOINT = "https://api.checkwarranty.info/api/v1/scans";
const payload = {
serial: String(serial).trim(),
brand: brand ? String(brand).toLowerCase().trim() : "auto"
};
const options = {
method: "post",
contentType: "application/json",
headers: {
"Authorization": "Bearer " + API_KEY,
"Idempotency-Key": "gsheet_" + Utilities.getUuid()
},
payload: JSON.stringify(payload),
muteHttpExceptions: true
};
try {
const response = UrlFetchApp.fetch(ENDPOINT, options);
const code = response.getResponseCode();
const data = JSON.parse(response.getContentText());
if (code === 200 || code === 201) {
const status = data.status || "verified";
const expiration = data.warrantyEnd ? data.warrantyEnd.split("T")[0] : "N/A";
const days = data.remainingDays !== undefined ? data.remainingDays : "N/A";
const tier = data.entitlementTier || data.model || "Standard Warranty";
return [[status, expiration, days, tier]];
} else if (code === 404) {
return [["Not Found", "—", "—", "Invalid Serial"]];
} else {
return [["Error " + code, "—", "—", data.message || "Failed"]];
}
} catch (error) {
return [["Network Error", "—", "—", error.message]];
}
}Step 3: Run Bulk Audits in Real Time
Return to your spreadsheet. In cell B2, enter the custom formula referencing your serial in column A:
=CHECK_WARRANTY(A2, "auto")The formula spills four verified data columns across cells B2:E2: Warranty Status, Expiration Date, Remaining Days, and Entitlement Tier. Drag the formula down to audit up to 500 serials simultaneously.
Zero-Risk Billing Guarantee
CheckWarranty operates under strict financial safety rules: credits are deducted only when verified hardware data is returned. If a serial number has a typo, does not exist in manufacturer records, or the vendor database returns empty results, your account incurs zero charge. You never pay for unverified requests.
Automate Your Fleet Today
Claim your 10 free checks and test the Google Sheets automation with your actual warehouse inventory in minutes.
Tags
Ready for Bulk Warranty Audits?
Check warranty coverage, entitlement dates, and hardware specifications across Lenovo, Dell, HP, and Apple in seconds. Zero-Risk Guarantee: 0 credits deducted for missing serials.