R/Pulse
Blog

Your API changed. Are the business rules still being enforced?

R/Pulse Team6 min read

A $8,000 transfer should be rejected because the limit is $1,000. After an update, the API starts accepting it. The service stays up, the request has the expected format, and the response says the operation went through.

In this hypothetical example, the failure is in the amount the application let through. If you only check uptime or the shape of the response, you won't see the problem.

That's why validating APIs after changes means checking the rules each operation has to follow. Permissions, limits, step order, and error handling are all part of the job, even when the API contract stays the same.

If you lead Engineering, Architecture, or Security, the challenge is keeping that validation in step with your release pace without losing sight of what a failure costs the business.

How a change can introduce API risk

An API's behavior depends on the code that runs the operation, the services it calls, its configuration, and the controls applied along the flow. A change in any of these can change the result.

Take an update to the component that checks transfer limits. The endpoint still takes the same fields and returns the same response structure. But if the check stops applying under one of the expected conditions, the operation gets approved when it shouldn't.

The same thing happens when you revise permissions, switch vendors, or change how an error response is handled. The change looks contained to one part of the system, but its effects reach everything that depends on it.

The spec shows changes to endpoints and contracts. Internal changes and dependency changes also alter behavior, and those don't show up in the spec.

What business logic flaws look like in APIs

A business logic flaw happens when the application allows an operation that breaks the rules of the process it's supposed to run. An input can have the right format, use a valid credential, and still produce the wrong result.

In the transfer, the amount is a valid number. The problem shows up when it's compared with the limit for that operation.

Other rules depend on where the process stands. An order can only ship after payment is confirmed. A refund has to account for what was already returned. An approval may require steps that can't be skipped.

OWASP's testing guide covers flows that let users skip, repeat, or run steps out of order. Test cases start from each application's specific requirements. OWASP Web Security Testing Guide.

Which behaviors need to be reassessed

The examples below are hypothetical. Each one shows a situation worth investigating, depending on what changed.

Access from another profile

A permissions update lets an authenticated user view another account's information. The assessment needs to check that the response only contains data that user should see.

Repeated operation

An integration resends a request after it doesn't get a confirmation in time. If the operation should have a single effect, the assessment needs to check whether the retry created an extra charge, booking, or stock deduction.

Dependency failure

An external service stops responding mid-process. Here you need to check the operation's final state and whether the API reported a result that matches what actually happened.

Usage beyond what was expected

A feature accepts requests that are allowed one by one, but whose repeated use hurts the business. This concern appears in OWASP's API6:2023, which covers unrestricted access to sensitive business flows such as purchases and bookings. OWASP API Security Top 10.

These cases need clear acceptance criteria. The team has to know which result is allowed, under what conditions, and what should happen when the operation can't complete.

Where to start when you can't reassess everything

A practical way to prioritize API validation is to cross what changed with the consequences of the wrong behavior.

A change to an informational lookup and a change to payment authorization don't call for the same effort. It also matters how many systems depend on the changed component and which conditions current coverage already checks.

To pick the scope, answer these:

  • Which operations depend on the code, configuration, or integration that changed?
  • Which rules have to keep holding in those operations?
  • What happens if one of those rules stops being applied?
  • Do the existing tests check that behavior, including rejections, retries, and failures?

The answers show where the assessment needs to go deeper. A component shared by several services, for example, may need a broader review than the changed endpoint suggests.

The role of continuous API validation

Continuous API validation is the practice of reassessing API behavior with every version of the system, updating coverage as changes and new risks appear.

A regression suite covers an important part of this work. But it has to keep up with current requirements: a test written for the old integration doesn't check a condition that only the new vendor introduced.

In practice, validation has two fronts: keeping the relevant checks up to date and investigating what isn't covered yet. How often and how deep you go depends on how critical the APIs are and on what changed.

There's also an alignment task. Product and business teams make the limits of the operation explicit; Engineering, QA, and Security turn those rules into behaviors you can verify. When the expected result stays implicit, it's harder to show it's still being respected.

How to confirm a fix removed the risk

An identified risk needs enough information to guide the fix: the affected operation, the test conditions, the observed behavior, and the expected result.

After the fix, the same case goes through a new assessment. In the transfer example, that means checking that the amount over the limit is rejected again. Depending on the scope of the change, you may also need to check nearby conditions, such as operations within the limit.

This retest confirms the fix's effect on the behavior found and leaves the result on record for the teams involved.

How ARC supports API reassessment

R/Pulse API Resilience Core (ARC) runs validations on critical APIs to identify risks and support their remediation. It tracks changes in the spec and points new validations at what changed.

When it finds a risk, it shows the observed behavior and evidence to reproduce it, with a priority rating. After the fix, a new assessment checks whether the behavior still occurs.

Conclusion

A test that passed on the previous version guarantees nothing about the current one. All it takes is a change to permissions, integrations, or rules along the way. The $8,000 transfer from the start would pass any uptime or contract check.

What catches this kind of flaw is reassessing business rules alongside every relevant change. That way the team knows whether a change can ship, what needs fixing, and which behaviors still need investigation.

Learn about R/Pulse ARC and talk to our team about validating your APIs.

Share