How to Change an API Without Breaking Your Partners’ Apps

A customer orders lunch for pickup. The restaurant’s kitchen screen says 12:30, but the confirmation on the customer’s phone says Time unavailable. Both systems received the same order. Both got a successful response. That morning, someone had renamed a field from pickup_time to ready_at. The kitchen screen knew the new name. The partner app was still looking for the old one.

The customer has a simple question. When should I collect my lunch? For the teams behind the two screens, the question is one of backward compatibility. Can yesterday’s app still do its job with today’s API?

The contract includes what the data means

An API gives one system an agreed way to ask another for information or an action. Part of that agreement is easy to see. A pickup time has a field name, a data type, and a format. Another part shows up in the decisions people make with the answer. Does 12:30 mean the time the customer booked, the time the kitchen expects to finish, or the time the food actually reached the counter?

On a quiet day, all three might coincide. During the lunch rush, a customer can book 12:30, the kitchen can predict 12:40, and the order can be ready at 12:36. Replacing the booked time with the latest estimate could leave the app displaying a valid timestamp while quietly rewriting what the customer agreed to. This is why semantic compatibility matters. Existing clients rely on the meaning of a response as well as its structure. google.aip.dev

Proposed changeWhat an existing partner could experienceHow to handle it
Rename pickup_time to ready_atThe app looks up the original field and displays a blank.Keep the original field available to existing clients.
Change pickup_time from the booked time to the kitchen estimateThe booking confirmation changes whenever the kitchen updates its forecast.Give the estimate its own clearly named field.
Require a new pickup_location_id on every orderOlder apps can no longer submit orders that used to succeed.Preserve the old default where it remains valid, or introduce the requirement in a new version.

When does a change deserve a new version?

Suppose the restaurant simply wants to show when the kitchen expects an order to be ready. It could keep pickup_time and add an optional estimated_ready_at field. A partner that ignores unfamiliar response fields can keep displaying the booked time. Another can adopt the estimate and show both. Before shipping, check how existing clients parse responses. A strict parser can reject even an unfamiliar field. google.aip.dev

Now suppose the team wants to redesign the order response so that every field has an unambiguous name. A new major version lets partners choose when to adopt that change. During the transition, two endpoints can describe the same delayed order. google.aip.dev

Order detailGET /v1/orders/4821GET /v2/orders/4821
Booked pickuppickup_time = 12:30scheduled_pickup_at = 12:30
Kitchen estimateOmittedestimated_ready_at = 12:40

The times are shortened here for readability. The most useful part of the migration guide is the field mapping. A partner updating its booking confirmation should switch to scheduled_pickup_at. Its live order tracker can use estimated_ready_at. That one example saves every partner from having to guess what “ready” means.

Give partners a deprecation notice they can act on

A release note saying “Orders v1 is deprecated” leaves the partner’s engineer with three questions. Is anything broken today? Which screen needs updating? How soon does the change need to ship? A notice can answer all three in a few lines.

Example partner notice
Orders v2 is available for testing today. We’ll continue serving Orders v1 until 1 October 2027 at 00:00 UTC, when the v1 endpoint is scheduled to close. For booking confirmations, replace pickup_time with scheduled_pickup_at. For live estimates, use estimated_ready_at. Our sandbox includes a delayed order so you can check both displays. Reply to the integrations team if this date conflicts with your release schedule.

Send the notice to the teams making v1 calls, put the field mapping in the migration guide, and check usage as the date approaches. A partner’s website might already be on v2 while its Monday morning export still calls v1. Looking at traffic by client over a full reporting cycle can reveal the job everyone forgot.

HTTP also gives teams a way to carry these signals in responses. The Deprecation header tells clients that a resource is or will be deprecated. The Sunset header communicates when it is expected to become unavailable. One helps a partner start planning the work. The other gives them a date to plan around. rfc-editor.org

Turn the lunch-rush example into a contract test

In consumer-driven contract testing, the partner app exercises the request it makes and records the response details it relies on. The API team verifies those expectations against its implementation. A tool such as Pact can replay the request against a test instance of the service before a change goes live. Each team can then check its side of the agreement in its own development workflow. Pact Docs

For this integration, the most revealing test order is one that’s running late. Set up a booking for 12:30 with a kitchen estimate of 12:40. On the partner side, check that the booking confirmation shows 12:30. On the API side, verify that v1 still returns 12:30 under pickup_time and that v2 returns each time under its agreed name.

Why choose a late order? If someone accidentally swaps the fields, both values will still pass a timestamp-format check. And if the test order happens to be on time, even a check for the exact displayed time can pass. The ten-minute delay is what makes the mistake visible.

Keep the contract focused on what the partner uses. The lunch confirmation depends on the booked pickup time. An unrelated change to the receipt footer should be able to ship without forcing the mobile team to rewrite its test. Pact Docs

Conclusion

Before changing an API field, ask “What decision does someone make with this value?” In the lunch app, one time records a promise to the customer. The other helps them decide when to leave the office. Once those meanings are clear, the engineering choices follow. Preserve the booked time for existing clients, give partners a version and a date they can plan around, and test the delayed order that proves both systems still agree.