TOPIC 03/3614 MINNOT STARTED

REST and JSON basics

See how most web APIs are built: things with addresses, a few verbs, replies in JSON and a status code that says if it worked. Includes CRUD and the REST versus SOAP question.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: The paper form. A paper form has labelled boxes: Name, Date, Amount. Both sides know what each box means, so nobody has to guess. A clerk can read it, and so can the person who filled it in.

Many web APIs work like that. Daily List, the to-do app, sends a task as a form with labelled boxes. Sam, the , reads one reply and sees the task's title, due date and status, each with its label.

The form is written in , a text format that holds data as labelled values. The letters stand for JavaScript Object Notation, but you do not need to know JavaScript to read it.

Most web APIs follow a style called (Representational State Transfer). In plain words, each thing has an address, and a few verbs act on it. The task with number seven has an address. You can read it, change it or remove it by using the right verb at that address.

Every reply carries a , a number that says if the request worked. Number two hundred means yes. Number four hundred and four means the thing was not found.

A form has no sense of its own. Both sides must follow its rules, or the labels mean nothing.

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the work.

THE REAL JOB The picture helps a newcomer remember that both sides must follow the same labelled form, and that the says how it went.

  1. Read the status
  2. Check the labels
  3. Check each value
  4. Note any nulls
  5. Match to the contract
Reading a reply

HOW THE PICTURE MAPS

How each part of the picture matches the work
In the pictureIn the work
The labelled boxes on a formThe labels in a JSON reply
A filled-in boxA value
A clerk who reads the formThe program that reads the reply
The stamp that says accepted or rejectedThe status code
The address of the form on a shelfThe address of a thing in a Representational State Transfer (REST) API

WHERE THIS PICTURE STOPS

  • A form has no sense. If a label is wrong, the clerk may still read it as it is written.
  • A paper form has fixed boxes, but JSON can nest one form inside another.
  • A clerk can ask what an unclear box means. A program cannot.

HOOK

Same boxes, same labels, same stamp.

REMEMBER IT THIS WAY

A sequence: the real steps, in order.

Check any reply in this order: status, labels, values. A missing label is not the same thing as a null.

What each part of the trick stands for
In the trickWhat it stands for
StatusThe status code says accepted or rejected
LabelsThe labels in a JSON reply
ValuesA filled-in box holds a value

TELL A FRIEND

Most web APIs give each thing an address, use a few verbs on it and answer in with a . CRUD is create, read, update and delete.

OFTEN MIXED UP WITH APIs in plain words. That topic shows the menu of requests. This one shows how the form of each request and reply is written.

PRACTISE AND KEEP

Sources for this topic — 11 sources
  1. Market practice

    Hypertext Transfer Protocol (HTTP) request methods (Mozilla developer docs) ↗ — Mozilla (MDN Web Docs) · Hypertext Transfer Protocol (HTTP) request methods (Mozilla developer docs): GET reads, POST submits, PUT replaces and DELETE removes (search excerpt, page not opened)

    Developer documentation. Describes GET as read only, POST as submit, PUT as replace and DELETE as remove. The search returned French and Spanish copies of this page. Search excerpt only. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    The JavaScript Object Notation (JSON) Data Interchange Format (Request for Comments 8259) ↗ — Internet Engineering Task Force · The JavaScript Object Notation (JSON) Data Interchange Format (Request for Comments 8259): JSON is a text format with objects, arrays, strings and numbers (search excerpt, page not opened)

    Internet standard. Describes JSON as a text format with objects, arrays, strings and numbers. Search excerpt only. · Checked 2026-11-06

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. Supplement6November2026: actual RFC8259 sections2–3 opened. RFC8259 is STD90; null is a literal JSON value. Earlier excerpt notes retain their historical scope.

  3. Market practice

    Representational State Transfer (REST) glossary entry (Mozilla developer docs) ↗ — Mozilla (MDN Web Docs) · Representational State Transfer (REST) glossary entry (Mozilla developer docs): REST is a style of web services built on addresses and a small set of verbs (search excerpt, page not opened)

    Developer glossary. Defines REST as a style of web services built on addresses and a small set of verbs. Search excerpt only. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    Simple Object Access Protocol (SOAP) versus Representational State Transfer (REST): two API styles compared (Upwork) ↗ — Upwork · Simple Object Access Protocol (SOAP) versus Representational State Transfer (REST): two API styles compared (Upwork): SOAP wraps XML in an envelope, REST can carry several formats and usually uses JSON, and REST uses the web status codes for errors (search excerpt, page not opened)

    Marketplace guide. Says SOAP messages are XML in an envelope, REST can carry several formats and usually uses JSON, and REST uses the web status codes for errors. Search excerpt only. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    RFC 9110 — HTTP Semantics ↗ — IETF · Request for Comments 9110, HTTP Semantics: methods, safe and idempotent methods, and the status code classes (registry source; page not opened in this batch)

    The definition of what an idempotent request method is, alongside safe methods, the status-code semantics an API contract is built on, and conditional requests.

    Used here for the systems-design questions a Payments Software Engineer and a Payments Solution Architect are asked, where the question turns on HTTP's own guarantees rather than on a scheme's rules. · Checked 2026-08-18

    Internet Standard, June 2022, obsoleting RFC 7230 through 7235.

    Cited for method semantics only. "Idempotent" in RFC 9110 is a property of a method: that repeating the request has the same intended effect on the origin server. It is not the same claim as "this payment cannot be duplicated", which is a scheme-level guarantee with its own documents.

    Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.

    Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.

    Read in full from the HTTP Working Group's own publication mirror at httpwg.github.io.

  6. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal

    This site's own simplified teaching models. · Checked 2026-07-12

    What this simplifies: Daily List, its addresses and the people are invented. Real APIs have more verbs, more codes and more rules than shown here. The create, read, update and delete (CRUD) matrix is a common analyst tool with no single standard layout.

    Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.

  7. Market practice

    HTTP request methods ↗ — MDN Web Docs · MDN pages (search excerpt, page not opened).

    Safe and idempotent methods table; DELETE may return 200 then 404 with the same server state. · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  8. Market practice

    Idempotency-Key header ↗ — MDN Web Docs · MDN pages (search excerpt, page not opened).

    Header that lets a client make POST and PATCH requests idempotent with a unique identifier. · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  9. Market practice

    Common Format and Multipurpose Internet Mail Extensions (MIME) Type for Comma-Separated Values (CSV) Files (Request for Comments 4180) ↗ — IETF · Comparison from MyHalo and Sonra format guides (search excerpts, pages not opened).

    Per the search excerpt, an informational document from October 2005 that describes the comma-separated values (CSV) layout (optional header line, records separated by line breaks, quoted fields, doubled quotes inside quoted fields) and registers the text/csv media type. It says there is no single master specification, so programs differ. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Request for Comments (RFC) 4180, October 2005. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  10. Market practice

    CSV vs XML vs JSON: which is the best response data format? ↗ — MyHalo · Comparison from MyHalo and Sonra format guides (search excerpts, pages not opened).

    When to use each of the three formats. · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  11. Market practiceDraft, not in force09, 21 November 2026; expires 25 May 2027

    The Idempotency-Key HTTP Header Field — draft-ietf-httpapi-idempotency-key-header-09 ↗ — IETF HTTPAPI Working Group · draft-ietf-httpapi-idempotency-key-header-08,22October2026, §§2.2–2.7,expires25April2027. Opened draft; work in progress, not RFC. §2.6 completion-consistent response; do not claim identical status/body mandatory. Server expiry/fingerprint/duplicate/concurrency rules need explicit contract. Preserve dated local201/200 stand-in observations.

    The proposed convention for an Idempotency-Key request header: how a client marks a retry, what a server is expected to do with a repeated key, and the error responses for a reused or malformed one.

    Used here only where a systems-design question is about the proposal, and always alongside a scheme document that actually binds. · Checked 2026-11-23

    Primary IETF revision 09 §§2.2–2.7 and Appendix A checked 23 November 2026. It is an active Internet-Draft. Section 2.6 describes a response consistent with completion according to user intent. Revision 09 clarifies optional fingerprints, lets each resource define uniqueness, and recommends that resources document behaviour and expiry. The provider contract determines actual payment retry behaviour.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.