REST API design patterns — response envelopes, pagination, filtering, status codes, and resource naming
87
83%
Does it follow best practices?
Impact
98%
1.78xAverage score across 4 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent applies REST API design patterns when building an order tracking API: response envelopes, nested resource naming (customer orders), correct status codes, PATCH semantics, batch operations, and pagination.",
"type": "weighted_checklist",
"checklist": [
{
"name": "success-response-envelope",
"description": "Success responses wrap the resource or resource array in a { data: ... } envelope",
"max_score": 10
},
{
"name": "error-response-envelope",
"description": "Error responses use a consistent { error: { code: '...', message: '...' } } structure",
"max_score": 8
},
{
"name": "nested-resource-for-customer-orders",
"description": "Customer-specific orders use a nested resource path like /customers/:id/orders rather than a flat path with a query parameter",
"max_score": 8
},
{
"name": "plural-noun-resource-paths",
"description": "Resource URLs use plural nouns (/orders, /customers) with no verbs in the path",
"max_score": 6
},
{
"name": "list-endpoint-paginated",
"description": "The list orders endpoint supports pagination via query parameters",
"max_score": 8
},
{
"name": "filtering-by-status",
"description": "The list orders endpoint supports filtering by order status via a query parameter",
"max_score": 6
},
{
"name": "201-for-order-creation",
"description": "The POST create order endpoint returns 201 Created on success",
"max_score": 8
},
{
"name": "order-includes-line-items",
"description": "The create order endpoint accepts line items inline (in the same request body) rather than requiring separate requests per line item",
"max_score": 6
},
{
"name": "patch-shipping-address",
"description": "Updating the shipping address uses PATCH and only modifies the address field, not the entire order",
"max_score": 8
},
{
"name": "cancel-status-validation",
"description": "Cancelling an order that has already shipped returns an error (409 Conflict or 422) rather than silently succeeding",
"max_score": 6
},
{
"name": "batch-status-update",
"description": "A batch endpoint exists to update the status of multiple orders in a single request, accepting an array of order IDs",
"max_score": 10
},
{
"name": "batch-max-size",
"description": "The batch endpoint enforces a maximum batch size",
"max_score": 4
},
{
"name": "404-for-not-found",
"description": "GET, PATCH, and cancel for a non-existent order ID return 404",
"max_score": 6
},
{
"name": "204-for-delete-or-cancel",
"description": "Cancel or delete operations return an appropriate status code (204 or 200 with updated resource)",
"max_score": 4
}
]
}