Skip to main content
As our public API evolves to meet new requirements and enhance functionality, integrators, and clients need to adapt seamlessly. A key pattern supporting resilience to such changes is the Tolerant Reader. By adopting the Tolerant Reader pattern, integrations can better handle new information without frequent updates. This approach reduces maintenance needs and enhances resilience, creating a smoother integration experience.

What is a tolerant reader?


The Tolerant Reader pattern is an integration design approach where a client consuming data is built to handle potential changes—such as added fields or minor structure modifications—gracefully. This pattern promotes forward compatibility, reducing 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, ensuring continued functionality.

Implementing a tolerant reader


Below is an example Python code snippet that processes additional fields gracefully, accounting for changes in the payload.
In this example, get methods are used to safely access values. This allows for flexibility if new fields, such as phoneNumber, are introduced, as the code remains functional even if a field is absent.