Autumn Sale: 20% off almost everything until 24 DecemberSee the sale →
See all 402 products Free UK delivery over £35
Wiki entry · 2 min read

What is an API? How software asks the tea shop a question

An API, short for application programming interface, is an agreed way for software to communicate with another system. A website gives people buttons and pages; an API gives software a defined way to ask for information and understand the reply.

Published Curator-written, not crowdsourced
04 / Sections · Tea Wiki

An API, short for application programming interface, is an agreed way for software to communicate with another system. A website gives people buttons and pages; an API gives software a defined way to ask for information and understand the reply.

Why a tea shop cares: an API is how an assistant asks the shop a tea question and gets an exact answer instead of guessing from a page.

Think of it as a service counter with a clear order form. The form says what can be requested, and the reply says what the shop found.

Requests and replies

A request is the question sent to the service. It can include a product identifier or conditions such as a tea type and a price limit. The service's endpoint is the address where that request goes. The response, sometimes called its payload, is the information sent back.

An answer might contain a product name, pack size, current price, stock status and a link to its page. It should distinguish no matching product from an unavailable service or an unknown fact.

The two public examples at teas.co.uk

The shop's public guide for software describes an Ask API for questions and advice, and a Product Truth API for looking up an exact item. The latter can use identifiers such as a barcode number or the shop's own product code.

These routes have different jobs. A broad question needs interpretation; an exact product lookup needs the right identity. The filters and constraints guide explains how a detailed request can be checked against product attributes.

JSON and Markdown

Software often receives JSON, a format for named values and lists. A longer article may also be available as Markdown, plain text with simple marks for headings and links. Both can make information easier to reuse. Neither is a separate source of truth if it is generated from the same maintained record.

Reading is different from changing something

Looking up a product reads information. Adding a product to a basket changes something. Paying is a further action. An API's existence says nothing by itself about which of these actions is permitted.

teas.co.uk's assistant shopping guide explains the available connection and the customer's role. The customer remains responsible for checking the basket and paying on the shop's site.

For the general technical definition, see MDN's API glossary. For the related connection standard, read Model Context Protocol.

Download as PDF

Got something to add? Logged-in customers can submit additions to the Tea Wiki, admin-approved, your name on the byline, plus reward points.

Sign in to contribute
Tea notes and stock updates

Useful tea notes, only when there is something to say.

Stock arrivals, buying notes and practical guidance from the catalogue. No filler, no daily noise, unsubscribe in one click.

By family

By moment

Brand of the monthHyson Seasonal taster packsHow the seasonal bundles work Tea of the Month ClubCurator-picked monthly box Find your tea60-second quiz 0 Basket £0.00
See all 402 products