Agent Wranglers

Lists Required

Return empty lists as empty

Answer an empty result with 200 and an empty array. Never answer 404 or null for a list with nothing in it.

How to do it

A list resource exists even when it has no items. Keep 404 for an unknown parent, such as a missing customer.

How to check

List the orders of a test customer with no orders. The answer is 200 with "items": [].

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/lists/empty-lists.