CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/api-design-patterns

REST API design patterns — response envelopes, pagination, filtering, status codes, and resource naming

87

1.78x
Quality

83%

Does it follow best practices?

Impact

98%

1.78x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-1/

Inventory Management API for a Warehouse System

Problem Description

A warehouse management company needs an API to track inventory across multiple warehouse locations. The system manages tens of thousands of inventory items and warehouse staff use a web dashboard to check stock levels, receive new shipments, and transfer items between locations.

Build a Python/Flask REST API that supports:

  • Listing inventory items with filtering by warehouse location, category, and stock level (e.g., items below reorder threshold)
  • Getting the details of a single inventory item
  • Receiving new stock (creating a new inventory record or updating quantity of an existing item)
  • Transferring stock between warehouses (decrement from source, increment at destination)
  • Bulk receiving: processing a shipment manifest with dozens of items in a single API call
  • Getting inventory summary by warehouse (total items, total value, items below reorder threshold)

Inventory items have: id, sku, name, category, quantity, unit_cost, reorder_threshold, warehouse_id, last_updated.

Output Specification

Implement the API in an app/ directory with an entry point at app/__init__.py or app.py. Use SQLite or in-memory storage.

Produce a requirements.txt with dependencies.

Do not start the server — just produce the source files.

evals

scenario-1

criteria.json

task.md

tile.json