Bite-size
Shipping Your First API

Designing Your Endpoint

Lesson 1 of 3 · ~3 min
LESSON

Start with one resource and two verbs: GET (read) and POST (create). Name routes after nouns (/orders, not /getOrders). Decide what fields the request and response carry before writing any code — a clear contract prevents 80% of bugs.

  1. 1Pick one resource (e.g. 'orders').
  2. 2Define the GET and POST routes.
  3. 3Write down request and response fields.
RECALL · 1/1
Which route is RESTful?