Skip to main content
As our public API evolves, integrators and clients need to adapt. The Tolerant Reader pattern makes a client resilient to those changes. By adopting the Tolerant Reader pattern, integrations can better handle new information without frequent updates. This approach reduces maintenance needs.

What is a tolerant reader?


The Tolerant Reader pattern is an integration design approach. In this pattern, a client that consumes data handles changes gracefully, such as added fields or minor structure modifications. This pattern promotes forward compatibility and reduces the need for immediate updates whenever the data or service evolves.

Real-world scenario


Consider a request to GET /organizations/{organization_id}. Initially, the response might be:
Later, fields like doingBusinessAs and address may be added:
A client that follows the Tolerant Reader pattern would handle the additional fields without issue.

Implementing a tolerant reader


Below is an example Python code snippet that processes additional fields gracefully.
In this example, get methods safely access values. This allows for flexibility when new fields appear, such as phoneNumber. The code remains functional even if a field is absent.