Create the API cases your software needs to handle.
A collection of unrelated sample responses cannot describe a complete workflow. Prepare linked records and API examples for the conditions that matter, review their relationships, and put those cases in front of your application or agent.
Show what shipped and what is still waiting
Orders / ORD-1042
Order #1042
Partially fulfilled2 line items · 1 shipment
- Ceramic serving bowl
ITEM-01 · Qty 1Shipped - Linen table runner
ITEM-02 · Qty 1Backordered
SHP-07Contains ITEM-01 onlyLinked records
ORD-1042ITEM-01On shipmentSHP-07ITEM-02Open on the order
When to use it
The records need to describe one coherent situation.
Use a linked scenario when the application makes one decision from several responses. A partial shipment is useful only when the order summary, line items and shipment record agree about what happened.
What to check
- Shared identity
- One order ID links two line items to the shipment lookup.
- Meaningful variation
- The shipment includes the available item. The backordered item remains open.
- Application check
- The interface identifies both items and shows a shipped state only for the item on the shipment.
How to approach it
Create and review a linked API case
4 steps
- Gostly Studio
- API fixtures
- Gostly MOCK mode
Start with the decision the application must make
Write down what the customer should see for each item. Specify which identifiers connect the calls and which values distinguish a complete shipment from a partial one.
Prepare linked records for the calls
Author examples directly or use Studio with a configured compatible model to draft a synthetic world. Include collection and detail responses when the application uses both. Give the application enough data to exercise the decision without unrelated records.
Review the relationships before importing
Check that every shipment line resolves to the intended order line, that quantities agree and that the waiting item is still represented. Export approved fixtures and import them into the selected simulated service.
Run through the application and retain the case
Confirm the client received the intended responses, then check what it displays for each item. Retain a fully shipped control so the partial-shipment check can distinguish the two outcomes.
What this gets you
Give the team one coherent test case
One reviewed partial-shipment case the application can read across order, line-item and shipment endpoints.
What the check tells you
A reviewed synthetic case can establish consistency across the calls you configured. Your test still checks the application’s decision, and the fixture covers only the workflow and values you included.
Where Gostly fits
Studio authors bounded synthetic worlds with a configured compatible model. Export and import are explicit steps. Application checks remain in your harness. Optional Studio execution has separate isolated-runner setup.
Put it into practice
- DocsCreate API fixtures in StudioConfigure a compatible model, review a draft and export the fixtures you approved.
- DocsImport collection and detail responsesChoose an importer and verify the prepared service.
- DocsModel a scenario that changes across requestsDefine how a later response should reflect the current state.
More worked examples
Compare sample API conditions with the checks your application can run.
Build against an API that isn’t finished
Authored worked example · synthetic data
Build an inventory screen before its API ships
A synthetic inventory example contains an in-stock item. A separate reviewed example covers an empty result. The client can use both cases while the team keeps the API contract under review.
| Your action | API condition | Your test checks |
|---|---|---|
| Import the definition or collection | The importer creates library entries from supported content | Read warnings and inspect the selected example responses |
| Call the populated case | A reviewed synthetic item is returned | Assert the client renders its name, availability and expected fields |
| Select the empty case | The reviewed example contains no inventory items | Assert a useful empty state rather than a broken screen |
| Record the implemented API | Real responses replace or complement the authored assumptions | Review contract differences and update the client tests |
An imported specification or collection does not reproduce the full server implementation. Business rules, side effects and state transitions need explicit examples or supported scenario configuration.
Seeding setupGive agent versions the same API conditions
Authored worked example · synthetic data
Two agent versions handle a delayed order
Both versions receive a synthetic order response showing a delayed shipment. Compare whether they acknowledge the delay, avoid inventing a delivery promise and offer the allowed next step.
| Your action | API condition | Your test checks |
|---|---|---|
| Prepare the tool response | The order API reports a delay with no new delivery estimate | Confirm the request resolves from the intended library entry |
| Run agent version A | The tool receives the reviewed order condition | Save its answer and tool actions in your eval harness |
| Restore the case and run version B | Use the same API input and relevant starting state | Apply the same rubric and task configuration |
| Compare repeated runs | API inputs stay controlled for covered requests | Report model variability separately from API differences |
Controlling API responses does not make a model or agent deterministic. Model sampling, prompts, tool choice and application state can still change the outcome.
Record the tool APIs