A contract between programs
Humans interpret layout; programs need stable field names, types, statuses, and error shapes. Documented behavior matters more than pretty output.
Resources and endpoints
A resource is a business concept such as movies. Endpoints combine method and path: GET /api/movies reads, POST /api/movies creates.
Choose status codes deliberately
Use 200 for success, 201 for creation, 204 for empty deletion, 401 for missing identity, 403 for forbidden action, 404 for absence, 422 for invalid input, and 429 for excess.