How do you handle API docs that only come as a PDF?

November 17, 2026 4 answers
Asked by 2g+fizzlecradle_815

I'm integrating with a vendor whose API docs are a PDF, with some endpoints shown in screenshots and an incorrect authentication example. Retyping everything takes ages, and the document can change without notice. What's a workable way to build and maintain the integration?

Answers

Mavzori.4q

Ask the vendor for an OpenAPI spec or a request collection before rebuilding everything. They may have something they can share even if it isn't published. Ask how they announce changes too.

Still check whatever they send. A spec, collection and PDF can disagree, so use the sandbox and vendor clarification to resolve conflicts rather than treating any one artifact as guaranteed correct.

Reply to this answer
Rovtira-6n

An LLM can make a first draft of an OpenAPI spec from the PDF, which beats typing every field by hand. For endpoints trapped in screenshots, try OCR or a model that can read images. Either way, expect extraction mistakes and made-up details.

Review the output against the original, especially authentication, required fields and response codes. Keep the generated spec in version control and add tests for the endpoints you actually use. Check the vendor's rules before uploading their documentation to an external service.

_y61+drivelo.8:

Generated tests need review too. A test derived from the same wrong example can happily confirm the wrong assumption.

Reply to this answer
!v7+claspnori~

For silent changes, save dated copies of the PDF and periodically extract the text with pdftotext, then diff it against the previous version. That gives you something concrete to review instead of rereading the whole document.

Text diffs won't reliably catch changes inside screenshots, so those pages need a separate visual or OCR check. Run a small set of contract tests against the sandbox for the endpoints you depend on. A failing test is a useful signal, though a passing sandbox test doesn't guarantee production behaves the same way.

Reply to this answer
_f82~clorvane.5

Make the documentation gap visible to whoever owns the vendor relationship. Record the incorrect examples, unresolved questions and any assumptions you had to make. Your internal spec is useful, but it shouldn't quietly become proof that the vendor documented the API correctly.

If choosing a vendor is still possible, incomplete docs and unannounced changes are reasonable maintainability risks to raise. Sometimes the integration is already mandated, though, so the immediate goal is getting those risks and the cost of supporting them on record.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions