What is a REST API map?
A REST API is organized around resources: things with an address, such as a product or an order, that clients read and change with a small set of HTTP methods. An API map is one page that shows all of those addresses as a tree, with the methods each one accepts.
This template maps the public API of an online store. The left side is the tree of paths under /v1, with a Methods column and a “What it does” column. The right side holds two reference panels, Status codes and Conventions. The board’s own summary gives the rule of thumb: “Nouns in the path, verbs in the method.”
Reading a row: the products branch
Each row is one path. Indentation shows nesting, so /reviews under /{productId} under /products reads as /v1/products/{productId}/reviews. The root row gives the base URL, https://api.shop.example/v1.
The colored badges are the methods the path accepts, and the text explains them in order:
- /products takes GET and POST: “List and filter products; staff create them”.
- /{productId} takes GET, PATCH and DELETE: “Read, update or retire one product”.
- /reviews takes GET and POST: “Reviews of a product; buyers add one”.
This is the standard pattern for a collection and its items. The collection lists and creates. The item reads, changes and removes. Curly braces mark the part of the path that is an ID.
Orders: when a verb belongs in the path
The orders branch has one row that breaks the nouns-only rule on purpose. Under /orders/{orderId} there is /cancel, which takes only POST: “Cancel an order that is not packed yet”.
Canceling is not a simple field change. It has a condition and side effects, so the example models it as an action you POST to rather than a PATCH of a status field. Its neighbor /items is GET only, “The lines of an order”, a sign that order lines are fixed once the order is placed. The item row itself allows PATCH for one narrow case: “change the address before packing”. A map makes such choices visible in a way a list of endpoints does not.
The signed-in customer, the cart and the legend
The third branch is /customers/me. “Me” stands for whoever holds the token, so the client never puts a customer ID in the path and cannot ask for someone else’s profile by changing a number. Below it, /addresses lists and adds saved addresses and /{addressId} edits or removes one.
The last row, /carts/{cartId}/items, takes POST, PATCH and DELETE to add, change or remove cart lines. A strip under the tree spells out what the four badges mean: GET reads, POST creates or acts, PATCH changes some fields, DELETE removes.
Agree on status codes once
The Status codes panel lists the eleven codes this API uses, each with a plain sentence. A few show the tone:
- 201 Created: “New resource; see Location”.
- 401 Unauthorized: “Missing or expired token”. 403 Forbidden: “Signed in, not allowed”.
- 409 Conflict: “Clashes with its state”, the answer when someone cancels a packed order.
- 422 Unprocessable: “Fails validation”.
- 429 Too Many Requests: “Slow down; see Retry-After”.
Write the meaning in your own team’s words, as the example does. The difference between 400, 409 and 422 is where APIs drift apart endpoint by endpoint, and one shared table stops that.
How to use the REST API map template
- Open it as a new board and replace the base URL in the root row.
- List your nouns first. Rename /products, /orders and /customers/me to your top-level resources before you touch any method.
- Nest only what cannot exist alone. A review belongs to a product, so it nests. Copy a row and indent it to add a level.
- Set the badges per row, then write the “What it does” sentence. If you cannot say it in one line, the endpoint does two jobs.
- Rewrite the Conventions panel. It covers five topics: Auth, Pages, Errors, Retries and Versions. The example pages with ?cursor= and ?limit= (100 at most) and asks for an Idempotency-Key on POST.
When to map an API, and what to draw instead
Draw the map before the first endpoint is coded, when names are still cheap to change, and keep it as the overview page of your API docs. It shows shape, not detail: request bodies and field types belong in a schema file.
To show the order of calls in one use case, such as sign-in followed by a request, use the OAuth 2.0 sequence or a plain sequence diagram. For the tables behind the resources, see the database schema template.
Questions about the REST API map template
What is the difference between PUT and PATCH?
PUT replaces a whole resource with the body you send. PATCH changes only the fields you include. The example API uses PATCH everywhere, which its legend describes as “changes some fields”, so a client can update one value without sending the rest.
Should API versions go in the path or in a header?
Both work. The template puts the version in the path: the tree starts at /v1 and the Conventions panel says breaking changes mean /v2. A path version is visible in every log line and easy to route, which is why many public APIs choose it.
How deep should resources be nested?
Two levels below the collection is a sensible limit, and the example never goes deeper than /orders/{orderId}/items. Deeper paths get long and force clients to know every parent ID. If a child has its own unique ID, give it a top-level path too.
Is the REST API map template free?
Yes. It has 128 elements and a Free board holds 150, so it opens on the Free plan with room for a few more rows. You can edit every path and badge and export the map as PNG, SVG, PDF or JSON.