parts 3 and 4 are in preparation · one break about halfway · the live API keeps coming back
The case · what the business handed over
The brief, and the systems behind it
Repair-shop portalvendor-hosted
FNOL
Core claims systemClaims API · source of truth
cover check
Policy APIlive · you just called it
enrich
Vehicle registryexternal · 100 calls a minute
nightly file
Reinsurer
The brief says:“register claims via API within a minute; show status in the portal.”It does not say:volumes · failures · duplicates · who owns what
Your turn · 2 minutes
What is your first question to this brief?
Write it down before the next slide.
One question. Ask for a fact, not a solution.
Concept · the discovery question set
Seven groups — which one did your question land in?
1Business context
what breaks without it?
2Systems & owners
both ends
3Data
source of truth · personal data
4Timing & volume
how fresh · the peak
5Failure tolerance
what may fail silently?
6Security & compliance
access · legal basis · retention
7Constraints
lead times · limits · versions
Open-questions log
“don't know yet” + owner + date
which group did nobody ask about?
Pro-tip · the discipline that makes discovery work
“REST API” is not an answer to “how fresh must the data be?”
✗
“We'll build a REST API.”
a solution
✓
“Within five minutes.”
a fact, in business units
Don't know yet? Open-questions log — owner and date.
Reveal · what the questions unearthed
None of this was in the brief
150 a day — 800 a day in a storm week
the peak sizes the design
The shop waits for the claim number
intake: synchronous
Status within 5 minutes is fine
status: events, not polling
Registry down must not stop intake
a fallback is needed
A claim registered twice is paid twice
duplicates: never
Portal vendor: REST and webhooks only
constraint beats preference
Checkpoint · 60 seconds, from memory
Which two groups are easiest to forget?
Name four of the seven.
Which answer changed the design most?
1 Context ✓2 Parties ✓3 FRs4 Mapping5 NFRs
6 Errors7 Security8 Tests9 Open items ✓
Spot the error · 60 seconds
requirement · draft
FR-X: The system prevents duplicate claims.
Which system? Prevents how?
What does the second sender see?
How would a tester prove it?
Demo · the Policy API has a rule of this kind
Sent twice. What comes back?
first time · recorded
POST /mtpl/v1/policies
{ "regNumber": "ABC-103" }
HTTP 201 Created
{ "id": "pol-7c41d2aa",
"regNumber": "ABC-103",
"status": "active",
… }
sent again, unchanged · recorded
POST /mtpl/v1/policies
{ "regNumber": "ABC-103" }
Predict the answer.
HTTP 409 Conflict
content-type: application/problem+json
{ "type": ".../duplicate-policy",
"title": "Vehicle already has
an active policy",
"status": 409,
"conflictingPolicyId":
"pol-7c41d2aa", … }
creating a policy needs a token — that lock is part 3
Concept · what that exchange was made of
Five parts. You just watched all five.
Triggera partner signs a vehicle up
OperationPOST /policies
Ruleone active policy per vehicle
Outcome201 · the new policy's id
Unhappy path409 · the rule named · the existing policy's id
a requirement missing its unhappy path is half a requirement
Before → after · the same intention, buildable
requirement · FR-2 · duplicate protection
Trigger: a repair shop submits an FNOL in the portal
Operation: POST /claims with an Idempotency-Key —
one key per FNOL, reused on retry
Rule: same key again → the original claim is returned,
no second claim. Same policy and incident under
a different key → 409 DUPLICATE_CLAIM
Outcome: the portal shows the returned claimIdUnhappy: on timeout the portal retries with the SAME key —
the duplicate is detected and suppressed
before “Rule” appears — what would you write there?
The spine question
Ask every arrow: “what happens when it fails?”
Every answer is a requirement.
The question, applied · the registry is silent
The fallback is a business decision
Claims system
enrich · 3 s
Vehicle registry
no answer?
register anywayflag ENRICHMENT_PENDING
3 seconds24 hours of retriesthen a human worklist
Who chose those numbers? The business did. The analyst asked.
Your turn · 2 minutes · the other arrow
The Policy API does not answer. Now what?
No answer within → the claim is .
Then for , and after that .
Which blanks can you fill in on your own?
Demo · your turn at the API · predict first
Now you create a policy
Your tab: POST /policies → Try it out → Execute. Which status, and why?
POST /mtpl/v1/policies — no token
HTTP 401 Unauthorized
www-authenticate: Bearer
content-type: application/problem+json
{
"type": "https://api.cybernotes.it/problems/unauthorized",
"title": "Missing bearer token",
"status": 401,
"detail": "Send an 'Authorization: Bearer <token>' header. Get a token from POST /mtpl/v1/auth/token.",
"instance": "/mtpl/v1/policies"
}
Checkpoint · from memory
Four answers from one API. What did each mean?
200201409401
Whose move is it after each one?
What did each body tell you to do?
1 Context ✓2 Parties ✓3 FRs ✓4 Mapping5 NFRs
6 Errors ✓7 Security8 Tests9 Open items ✓
Break
Six minutes.
Next: the requirements that hide.
Stretch. Water.
Concept · the requirements that hide
NFRs: numbers, not adjectives
an adjective
a number a tester can verify
“must be fast”
p95 ≤ 2 s at the storm peak, registry lookup included
“handle the load”
150 a day · 800 a day in a storm week · 100 an hour at peak
“always up”
99.5 % monthly · maintenance Sunday 02–04
“log everything”
every registration traceable by traceId · kept 7 years
p95 = the time 95 % of calls beat — one call in twenty may be slower
Your turn · rewrite drill · 2 minutes
Rewrite: “status updates must be reliable.”
A number, a unit, a condition — for this case.
Reliable against what: loss, delay or disorder?
Demo · a limit you can watch
Their limit becomes your requirement
GET /mtpl/v1/limited/ping
#1 200 OK ratelimit-remaining: 4#2 200 OK ratelimit-remaining: 3#3 200 OK ratelimit-remaining: 2#4 200 OK ratelimit-remaining: 1#5 200 OK ratelimit-remaining: 0#6 429 Too Many Requests retry-after: 47This endpoint allows 5 requests per minute per client address. Try again in 47 seconds.
Policy API: 60 calls a minute. Registry: 100.
After an outage, retries drain at half of that.
On a 429: wait for Retry-After. Three in a row → alert.
Concept · observability as requirements
Write down who notices
Alerterror rate above 2 % over 5 minutes → claims-ops on call
Traceone traceId through every system a request touches
Auditwho registered what, from where, when — kept 7 years
The division of labour
Numbers come from the business. Feasibility comes from the architects.
you bring
the architect brings
freshness · volumes · peaks
the integration pattern
failure tolerance · fallbacks
middleware · reuse
data ownership · classification
security mechanics
what an hour of downtime costs
effort · feasibility
expect two or three options back · the choice is recorded with its reason
Concept · the diagram that finds open questions
Can't draw the else branch? You've found your open question.
Your turn · 90 seconds · two traps are hiding
Mapping finds what nobody asked
target · our claim record
source · registry
rule
registrationNumber
reg_number
uppercase, no spaces
vin
vin_code
copy · may be absent
firstRegistrationDate
first_reg_date
DD.MM.YYYY → ISO date
fuelType
fuel_type
lowercase → UPPERCASE
—
status
dropped: no target field
fuel_type: gas — no such value in the target. Owner: product. Don't guess.
status: stolen — handlers need it for theft claims. A new requirement.
null ≠ absent ≠ empty · template and full exercise on the training page
Concept · who, and when
Roles enter during analysis — not at the security review
CONTACT · work with directly
Business Owner
Product Owner
●System Owner — each end
Data Owner
Tech Lead
●Vendor's technical contact
The other side's analyst
CONSULT · at decision points
Solution · Integration · Enterprise Architect
Security Architect
IAM
●DPO
Compliance / Risk
Network
API Platform Owner
QA Lead
INFORM · they inherit it
Operations / Support
Monitoring Owner
Release Manager
● late = weeks
the cheapest meeting is the one in week one
Exercise · pairs · 7 minutes
Switch seats: now you review someone else's contract
The Policy API's first draft is all you have.
Follow it. Try its calls. Where does it let you down?
One point per gap, phrased as a question to its owner.
six gaps are planted · you have already met three of them today
Exercise · the suspect
7:00
v0 draft · operations and responses
base path: /mtpl/v1
/coverage-options get → 200
/policies get → 200post → 201
/policies/{id} get → 200, 404put → 200
/policies/{id}/cancel post → 200
/limited/ping get → 200
“Connectivity check”
/signed/policy-check post → 200
needs X-Signature
components: schemas only
v0 draft · the request schema
PolicyRequest:
required: [vehicleId]
vehicleId: string
“The vehicle identifier.”
holder: string
POST /policies — two examples,
both titled “By vehicle id”:
vehicleId: ABC-101
vehicleId: 5TDEM000000000103
ask it what this part asked: access · refusals · identifiers · rules · volume · limits
Reveal · six gaps, six questions
the draft
your question
the live spec answers
1 · no access rules
how do callers get in?
a bearer token on five operations
2 · one 404, nothing else
what does “no” look like?
every 4xx listed, one format
3 · vehicleId: plate or VIN?
which identifier?
regNumber and vin, separately
4 · no business rules
already insured — then what?
409 duplicate-policy
5 · “the list” of policies
and at 70 policies?
page · pageSize, 100 at most
6 · no limits
what are the limits?
60 a minute · Retry-After
same API, two specifications — the difference is the work this part teaches
Back to the case
What would you now write down?
4 h→ intake through the Claims API · p95 ≤ 2 s
6 %→ field-by-field mapping · nothing re-typed
0→ status events within 5 minutes · an alert on silence
Your turn: the one question you will ask on your next integration.
1 Context ✓2 Parties ✓3 FRs ✓4 Mapping ✓5 NFRs ✓
6 Errors ✓7 Security · part 38 Tests · part 49 Open items ✓