Skip to content

feat(euclid): add endpoint to deactivate static routing rule#228

Open
bot4pk wants to merge 2 commits intojuspay:mainfrom
bot4pk:feature/deactivate-routing-rule
Open

feat(euclid): add endpoint to deactivate static routing rule#228
bot4pk wants to merge 2 commits intojuspay:mainfrom
bot4pk:feature/deactivate-routing-rule

Conversation

@bot4pk
Copy link
Copy Markdown
Collaborator

@bot4pk bot4pk commented Apr 7, 2026

Summary

Add POST /routing/deactivate endpoint that removes an active static routing rule mapping from the RoutingAlgorithmMapper table.

Changes

  • Add DeactivateRoutingConfigRequest struct in types.rs
  • Add RoutingAlgorithmNotActive error variant in errors.rs
  • Implement deactivate_routing_rule handler in routing_rules.rs
  • Register POST /routing/deactivate route in app.rs

API Contract

  • Method: POST
  • Path: /routing/deactivate
  • Request: { "created_by": "merchant_id", "routing_algorithm_id": "rule_id" }
  • Success: 200 OK
  • Errors:
    • 400 - Routing algorithm not found
    • 200 - Returns success if already deactivated (idempotent)

Behavior

The endpoint is idempotent - returns success if the mapping doesn't exist (already deactivated).

Closes #227

bot4pk and others added 2 commits April 8, 2026 01:02
Add POST /routing/deactivate endpoint that removes an active static
routing rule mapping from the RoutingAlgorithmMapper table.

Changes:
- Add DeactivateRoutingConfigRequest struct in types.rs
- Add RoutingAlgorithmNotActive error variant in errors.rs
- Implement deactivate_routing_rule handler in routing_rules.rs
- Register POST /routing/deactivate route in app.rs

The endpoint is idempotent - returns success if the mapping doesn't
exist (already deactivated). Returns 404 if the routing algorithm
is not found.

Closes juspay#227
@bot4pk bot4pk requested a review from prajjwalkumar17 April 8, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(euclid): add endpoint to deactive an already activeted static routing rule

2 participants