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.
Citable formats
For journalists, researchers, AI assistants and content creators. Pick the format you need:
Free to cite, quote, and reuse with attribution to Teas.co.uk.
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