88. An assistant returns valid JSON for a stock transfer. What checks remain before the application can use it?
EasyProgramming fundamentals
Technical
Show model answer
JSON validity establishes syntax, not whether the transfer makes sense or is authorized. Validate the schema, allowed values and business rules, such as positive quantities, different locations and sufficient available stock.
Resolve referenced records within the current user's scope and recheck relevant state when applying the change. Return clear validation errors; do not silently invent missing destinations or let generated identifiers bypass normal application checks.
What interviewers listen for
- Validate business invariants
- Resolve identifiers within user scope
- Recheck state before applying changes