Warehouse Cycle Count Variance API
Pricing
$1.00 / 1,000 unique count line revieweds
Warehouse Cycle Count Variance API
Review warehouse cycle count discrepancies with exact quantities, explicit recount selection and evidence. CSV, XLSX and JSON.
Pricing
$1.00 / 1,000 unique count line revieweds
Rating
0.0
(0)
Developer
AFK Digital
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 days ago
Last modified
Categories
Features
Share
Compare physical cycle counts with a matching warehouse inventory snapshot. Review shortages, overages and recount candidates without connecting to a WMS/ERP or changing source inventory. Inputs and outputs support CSV, XLSX and JSON.
Quick start
Run the prefilled synthetic demo. It contains a shortage, an overage, a missing cost and a missing count. It uses no external website, proxy, AI model or customer credentials. A normal demo should complete well under five minutes.
Input files
Required: countFile, inventorySnapshotFile, unitCostsFile, snapshotTime (ISO 8601 with explicit UTC offset). Additional inputs: columnMapping, optionalStockMovementsFile, quantityTolerance, valueTolerance, maxCountLines and optional unitConversions.
Each file is an object. Use {"rows":[...]} for JSON rows, {"format":"csv","content":"sku,qty\n001,2\n"} for CSV text, {"format":"xlsx","base64":"..."} for XLSX, or {"format":"csv","keyValueStoreId":"YOUR_PRIVATE_STORE","key":"COUNTS.csv"} for a private Apify record. Select the referenced store in the read-only sourceKeyValueStores picker (API: an array of store IDs) so the run receives narrowly scoped READ access. Inline rows/content/base64 need no storage permission. JSON and XLSX also work with KVS references. Arbitrary HTTP URLs and filesystem paths are not accepted. XLSX must contain one worksheet with literal values, no formulas/macros/external links. Use text cells for SKU, lot and serial identifiers to preserve leading zeros and long numeric IDs.
| File / mapping group | Columns |
|---|---|
| countFile / count | warehouse, location, sku, lot_or_serial (optional), count_id, counted_at, qty or counted_qty, unit, is_valid (optional) |
| inventorySnapshotFile / inventory | warehouse, location, sku, lot_or_serial (optional), qty or system_qty, unit, snapshot_at (optional) |
| unitCostsFile / costs | sku, unit_cost, currency, unit; optional warehouse/location/lot_or_serial scopes |
| optionalStockMovementsFile / movements | warehouse, location, sku, lot_or_serial (optional), movement_id, occurred_at, qty or quantity_delta (signed), unit |
Map canonical names to your headers: {"count":{"sku":"Item Code","qty":"Physical Qty"},"inventory":{"sku":"Item Code"}}. A group mapping must include every column needed from that file. With no mapping the canonical names are used. Identifiers are trimmed, case-sensitive, and blank lot/serial values match only other blanks. One row is one complete count of its exact stock key; split-bin partial counts are not automatically summed.
Reconciliation rules
- Match warehouse + location + SKU + lot/serial. Do not collapse lots, locations or currencies. Missing inventory is flagged, never assumed zero.
- Exact duplicate rows are ignored while their evidence row numbers are retained. Distinct duplicate inventory or cost rows are ambiguous, not summed or arbitrarily selected.
- Counts marked
is_valid:falseare excluded. Select the newest validcounted_atat each key. Earlier counts are evidence only. Same-time distinct records areambiguous_count. Missing quantity, count ID, valid timestamp or nonnegative finite quantity yields review rather than silently selecting an older count. A blank/missing count is never physical zero. Use explicitqty:"0"for a real zero count. - At the same timestamp:
quantity_variance = counted_qty - system_qty. For different times, provide complete movement coverage: a movement descriptor withcomplete:true,coverageStart,coverageEnd, plus rows or file content. The interval must cover both timestamps, including an explicit empty rows array if there were no movements. Apply signed movements in(earlier, later]; reverse the adjustment when the count precedes the snapshot. Missing/incomplete coverage or invalid movement data producestime_mismatchand null variance. Completeness is the customer's assertion; the API cannot verify omitted movements. - Units must be explicit and equal, or have exactly one customer-provided SKU conversion
{sku,fromUnit,toUnit,factor}. Factors are positive decimal strings and directional. Never infer a case size or measurement conversion. Quantities and costs use decimal arithmetic with up to 12 decimal places and absolute input values up to 1e18. Output decimals are strings to preserve precision. - A unique applicable unit cost produces
value_variance = quantity_variance * unit_costin its own currency. Missing/ambiguous/invalid cost leaves value null but keeps a valid quantity variance. ISO-style uppercase three-letter currency codes are required; no currency conversion or combined currency totals. - A row requires recount when absolute quantity difference exceeds
quantityToleranceOR absolute value difference exceedsvalueTolerance. Boundary values are within tolerance. Value tolerance applies independently in the row currency; missing values are not treated as zero.
Results
Default Dataset: JSON/CSV exports through Apify. Additional private run KVS records: REPORT, REPORT.csv, RECOUNT_QUEUE, RECOUNT_QUEUE.csv, SUMMARY. The recount queue includes every row requiring attention, including missing data; it does not update a WMS or send messages.
Main fields: count_id, warehouse, location, sku, lot_or_serial, system_qty, counted_qty, quantity_variance, unit_cost, value_variance, currency, review_status, evidence_rows. Evidence identifies 1-based data rows (header excluded), with the selected count distinguished from previous counts. Additional fields describe quantity unit, timing and issues; SUMMARY records billing status.
Limits and data handling
10 MiB per file, 40 MiB total input JSON, 100,000 rows per input file, 100 columns, 50 MiB expanded XLSX and 500 ZIP entries. maxCountLines is 1..100,000 (default 10,000), counted before duplicate removal. Files exceeding limits fail; no silent truncation. Output CSV protects textual formula prefixes. Customer rows are not logged and no third-party data enrichment is used. Customer files, Dataset and KVS outputs stay in the customer's Apify account under its access controls and retention settings. Avoid including unneeded personal data; delete inputs/outputs through Apify when no longer required. Any sharing of a public run or Dataset can expose uploaded data.
Pricing
USD 1.00 per 1,000 successfully reviewed unique selected count rows, implemented as one count-line-reviewed event at USD 0.001 per row. A final partial thousand is proportional, not rounded up. Quantity-only reviews with missing cost count as reviewed; unresolved keys, counts, time or units do not. No startup fee or default Dataset-item event should be enabled. Platform execution costs are intended to be included; post-run storage access follows Apify's platform terms.
An atomic named request queue reserves a hash before charging, scoped to the Actor and the running user. Identical selected count + stock key + timestamp + reconciled quantities/unit/snapshot is not charged again on reupload, even when tolerances or costs change. Earlier recounts and duplicate input rows do not generate additional events. Only opaque hashes are retained in the billing queue, not customer rows. Concurrent reservations deduplicate atomically. To avoid double billing after a crash, an interrupted reservation may waive one fee. Deleting this billing queue resets cross-run deduplication; retain it while you require repeat-upload protection. All results are persisted before billing. If the billing budget stops charging, the complete computed report remains available and SUMMARY flags budget_stopped; unfinished billing may waive fees. Pricing uses only the count-line-reviewed event. Startup and automatic Dataset-item fees are disabled. See the Store Pricing tab for the current rate.
Development
Python 3.12. Install requirements, then python -m unittest discover -s tests -v. Run python -m src.main with an Apify INPUT record. Version 0.1.0. This API produces reconciliation candidates based on customer-provided data; it does not certify stock ownership, valuation or movement completeness.