IronGate Supply introduced pagination to its inventory API after record counts exceeded one million. Existing consumers assumed all records would arrive in a single response and processed only the first page for an entire quarter, causing widespread inventory reconciliation errors.
What happened
IronGate Supply’s inventory API had always returned all matching records in a single response. As the product catalog grew past one million SKUs, the team introduced cursor-based pagination to protect database performance. The new behavior was documented in release notes and the OpenAPI spec was updated.
Warehouse management systems, replenishment applications, and reporting services had all been written assuming a complete result set. None of them had been updated. Each consumed the first page of results as if it were everything, quietly reconciling inventory against a fraction of actual stock.
An entire quarter passed before stockouts, excess purchasing orders, and reporting discrepancies triggered a cross-team investigation. By then, carrying costs and emergency corrections ran into millions.
Root cause
API tests verified that the new pagination behavior worked correctly. Nobody tested existing consumers against the updated API. No contract tests existed that would have surfaced the broken assumption: “this response contains all records.”
The fix
The team introduced a migration period where the API returned both the paginated response and a deprecation header. Contract tests were written for each known consumer, failing until the consumer correctly iterated all pages. A total_count field was added to make it obvious when the first page didn’t contain everything.
Lesson learned
Adding pagination to a previously unpaginated API is a breaking change, even if the first page looks identical to the old response. Consumers need to be explicitly tested against the new behavior before the change ships.