{{ t.story.eyebrow }}

{{ t.story.t1 }}{{ t.story.t2 }}

{{ t.story.lead }}

{{ c.eyebrow }}

{{ c.title }}

{{ c.p }}

OrdersController.cs — shop-wt\48213
[HttpGet]
public async Task<IActionResult> List(
    [FromQuery] string? status) {
  var filter = StatusFilter.Parse(status);
  if (!filter.IsValid) return BadRequest(filter.Valid);
  return Ok(await _repo.Filter(filter));
}
{{ sInfo }}
#48213 #48190 #48177 +3
#48152 #48140 #48121
#48213
Orders API: filter by status
shop feat/48213-orders-api-filter-by-status
Spec Design2 Bugs2 Source2 Plan Sessions2
Description Docs2 Q&A4 Changes Discussion3 Search in spec⌘F Drive
Acceptance criteria
• GET /orders?status=paid returns only paid orders
• Several statuses at once: status=paid,shipped
• An unknown status returns 400 with the list of valid values
• Without status: every order, newest first (unchanged)
Flow
Diagram
Code Open
Admin UI
status=paid,shipped
OrdersController
Valid status?
yes
no
OrdersRepository
400 · valid values
Description Docs2 Q&A4 Changes Discussion3 Search Q&A
Google Sheet · Q&A 4 questions · 1 awaiting answers
2 Orders list High Answered Bao Le · Mon
Can `status` take several values?
Answer · Linh Tran
Yes — comma separated: status=paid,shipped.
3 API High Answered QA · Mai Vo · Mon
Should an unknown status be ignored or rejected?
Answer · Linh Tran
Rejected with 400 and the list of valid values.
5 Filter bar Normal Awaiting Hoa · Thu