How I Mapped an Undocumented Vendor API in 2 Days With Claude Code
TL;DR A vendor handed us a sandbox key, a 6-page PDF, and no OpenAPI spec. I used Claude Code to turn ~40 exploratory requests into an inferred schema, a typed client, and a contract test suite in two days. The trick was never letting the agent write types from the docs — only from captured responses. Here's the loop, plus the three times it confidently made things up. The Problem We had to…
The challenge was integrating a partner's billing API using only a sandbox key, a 6-page PDF with example requests, and no OpenAPI spec or SDK. The PDF mentioned the amount field was an integer, but the real payloads contained string values in three endpoints. The invoice object had six fields according to the PDF, but thirty-one fields in practice.
To avoid issues where documented types and nullability didn't match actual responses, the author's solution required tracing every type, enum, and nullability decision back to actual HTTP responses observed during testing.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.