Analyst Bootcamp Join on TelegramJoin
Junior+ · Systems Analysis

Reading an API spec: what is missing

🕥 10 min read🧭 SA📅 updated 2026-10-15Читать на русском

A ten-minute method for reading an OpenAPI contract the way a system analyst must: not "does it have the fields" but "what happens when it goes wrong".

Why "it has all the fields" is not a review

Most API contracts you receive as a Junior+ system analyst look complete: endpoints, request and response schemas, a 200 and a 400. The problems that will cost your team weeks are not in what is written. They are in what is absent: what the server does with a duplicate request, how a client finds out that a list has a second page, which error means "retry" and which means "stop". Reading a spec is the discipline of asking those questions before the integration is built.

Below is the order in which to read any REST contract, with the question to ask at each step. It works for an OpenAPI file, a partner's PDF or a Confluence page.

1. Resources and identifiers

Find the nouns. For each one ask: what is its identifier, who issues it, is it stable?

paths:
  /orders/{orderId}:
    get:
      parameters:
        - name: orderId
          in: path
          schema: { type: string }

Questions this fragment leaves open: is orderId the merchant's order number or the provider's? If the provider issues it, when does the client learn it? If both exist, which one appears in webhooks? A contract that answers "string" and nothing else will produce two systems that disagree about which id they are talking about.

2. Operations and their side effects

For every POST, PUT, PATCH, DELETE ask: what changes, and what happens if the same call arrives twice? Networks retry; so do mobile clients and queue consumers. A POST /payments with no idempotency rule means double charges.

What to look for:

If the spec is silent, write the question down with the exact endpoint. Do not assume.

3. Errors: the part nobody writes

Count the error responses. A contract with only 400 and 500 is telling you that error handling is undefined. The minimum a client needs:

SituationStatusWhat the client should do
Invalid input (missing field, wrong format)400 / 422Fix the request; never retry as is
Not authenticated / token expired401Refresh the token, retry once
Not allowed403Stop; surface to a human
Object not found404Decide: stale id or race (created a second ago)?
Conflict (duplicate, wrong state)409Read the current state, then decide
Rate limit429Wait as told by Retry-After, then retry
Server error5xxRetry with backoff, then alert

Then look at the error body. A good contract uses one shape for every error, with a machine-readable code and a human message. RFC 9457 ("Problem Details") is the standard shape; many providers use their own but equivalent format:

{ "type": "https://api.example.com/errors/insufficient-funds",
  "title": "Insufficient funds", "status": 409,
  "code": "insufficient_funds", "detail": "Balance is 12.40, requested 50.00" }

The question to ask: can a program decide what to do from this response without reading the message? If the only distinguishing part is the English text, every client will string-match it and break when the text changes.

4. Lists: pagination, filtering, ordering

Any endpoint that returns a list needs three answers: how do I get the next page, how do I get only what I need, and in what order do results come. Cursor pagination (next_cursor) is safer than page numbers when the underlying data changes between calls. Check the maximum page size and what happens if you exceed it (error or silent truncation: silent truncation is a data-loss bug waiting to happen).

5. Time, money, text

Three fields that are wrong in half of all contracts:

6. Asynchronous parts: webhooks and callbacks

If the provider calls you back, read that section twice. The picture below is the classic trap: the webhook about the result arrives before the answer to the request that caused it.

A webhook can overtake the synchronous response; a handler that assumes order will reject it as
A webhook can overtake the synchronous response; a handler that assumes order will reject it as "unknown order".

Questions:

A spec that does not answer these is not ready for an integration design. Those are the exact questions to send back.

7. Versioning and change

How will the contract change: a version in the path (/v2/), a header, or "we only add fields"? The last one is fine if your client ignores unknown fields; write that down as a requirement for your team. Ask for the deprecation policy: how long an old version lives after a new one ships.

Putting it together: the review note

The output of reading a spec is a short note, not a verdict. A good structure:

  1. Understood: the resources, ids and flows in two or three sentences, so the provider can correct you.
  2. Gaps: numbered questions, each pointing at an endpoint or field. "Section 4.2, POST /refunds: behaviour on duplicate request is not specified. Proposal: accept Idempotency-Key, 24 h window."
  3. Risks for us: the two or three items that change our design (for example: at-least-once webhooks mean we need an events table with unique event ids).
  4. Proposed decisions: what you will assume if there is no answer by a date.

Using AI here

A model is useful for the mechanical part: paste the spec and ask it to list every endpoint with its error responses and whether pagination is defined. It is also decent at generating the gap list from the checklist above. It is unreliable at knowing the provider's actual behaviour: it will confidently describe retry policies that are not in the document. Everything it outputs about behaviour goes into the "questions" section, never into "understood".

Try it (5–10 minutes)

Open a real public contract, for example the Stripe API reference for creating a refund, or any provider your company uses.

  1. Run the seven steps above on one POST endpoint and one list endpoint. Time-box: 10 minutes.
  2. Write the review note with at least four numbered gaps that point at specific fields or sections.
  3. Mark which gaps would change your team's design (events table, retry logic, id mapping) and which are just documentation.

Where this shows up in real work

  • "Integration analyst" and "System analyst (API)" job posts ask for "experience reviewing API contracts / OpenAPI"; the interview task is usually a spec with deliberate gaps.
  • In real tickets the phrase "the partner's API docs are incomplete" is the start of most integration delays; the review note above is what turns it into a plan.
  • Freelance briefs "integrate X with Y" rarely mention errors, retries or webhooks; the analyst who asks about them wins the bid.

Sources worth reading

Practice it on real drills

Review a draft API contractREST API design for a featureIntegration between two systemsIdempotency & duplicate handling

Finished reading and did the exercise?