liveBook · Manning

Client

As explained in The Design of Web APIs, Second Edition

A customer is a business-domain entity representing a person or organization whose information is managed by a system.

A client is a business-domain customer whose information or transactions a system manages. Treat clients as users with goals, workflows, and constraints rather than merely as records. section 15.5.1 section 2.14

In API work, distinguish the domain client from the API client: an application, developer, or organization may consume the API on behalf of the customer. Designing for both keeps business needs visible without exposing implementation details. section 2.3.1 section 1.1.3

Model and design around the client by:

  • Identifying who the clients are, what they do, and how their workflows create business value. section 2.3.1
  • Balancing individual client requests against reusable capabilities instead of tailoring the API to one consumer. section 2.6.2
  • Recording client constraints, such as supported HTTP methods, data formats, availability expectations, and compatibility requirements. section 14.2
  • Considering security by identifying which client and end user the access token represents. section 12.4.1

Event-ticket client

An event-management API may serve customers who search for available events, add tickets to an order, and pay. The mobile application or website acts as the API client, while the customer is the domain user whose booking journey defines the needed capabilities. section 2.14 section 2.3.1

Figure 3.2 A browser or curl command loads a web page by sending an HTTP request containing a standard method and a path identifying the page. The server returns with an HTTP response confirming that the page is found and its content.
figure

A browser or curl command illustrates the API-client role: a client sends an HTTP request with a method and path, then receives the server response. section 3.1.1

How The Design of Web APIs, Second Edition covers it

How deep it goes
Connects clients to workflows, API consumption, constraints, and security checks, but stops short of defining a customer data schema.
Examples
Uses event-ticket booking, online shopping applications, browser requests, curl commands, and partner consumers affected by breaking changes.
What it assumes
Assumes familiarity with users and use cases while distinguishing domain customers from applications, developers, and organizations consuming an API.
What you can do after
Designs reusable API capabilities around customer workflows while accounting for consumer limitations, security, and compatibility.
How it connects
Connects domain clients with API consumers, end users, HTTP, REST APIs, security contexts, and API capabilities.

Also explained in

Compare how 15 books explain client →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Design of Web APIs, Second Edition. The section links point to the parts of the book it draws on.