Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(router): Make v2 endpoints follow standard naming conventions (#8630)
Anurag Thakurdb14764671d1
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.jsonindex 1bce9a47e2..266aa6cec9 100644--- a/api-reference/v2/openapi_spec_v2.json+++ b/api-reference/v2/openapi_spec_v2.json@@ -20,7 +20,7 @@}],"paths": {- "/v2/organization": {+ "/v2/organizations": {"post": {"tags": ["Organization"@@ -67,7 +67,7 @@]}},- "/v2/organization/{id}": {+ "/v2/organizations/{id}": {"get": {"tags": ["Organization"@@ -164,7 +164,7 @@]}},- "/v2/organization/{id}/merchant-accounts": {+ "/v2/organizations/{id}/merchant-accounts": {"get": {"tags": ["Organization"@@ -1220,7 +1220,7 @@]}},- "/v2/routing-algorithm": {+ "/v2/routing-algorithms": {"post": {"tags": ["Routing"@@ -1275,7 +1275,7 @@]}},- "/v2/routing-algorithm/{id}": {+ "/v2/routing-algorithms/{id}": {"get": {"tags": ["Routing"@@ -2850,7 +2850,7 @@]}},- "/v2/payment-method-session": {+ "/v2/payment-method-sessions": {"post": {"tags": ["Payment Method Session"@@ -2897,7 +2897,7 @@]}},- "/v2/payment-method-session/{id}": {+ "/v2/payment-method-sessions/{id}": {"get": {"tags": ["Payment Method Session"@@ -2994,7 +2994,7 @@]}},- "/v2/payment-method-session/{id}/list-payment-methods": {+ "/v2/payment-method-sessions/{id}/list-payment-methods": {"get": {"tags": ["Payment Method Session"@@ -3035,7 +3035,7 @@]}},- "/v2/payment-method-session/{id}/update-saved-payment-method": {+ "/v2/payment-method-sessions/{id}/update-saved-payment-method": {"put": {"tags": ["Payment Method Session"@@ -3098,7 +3098,7 @@]}},- "/v2/payment-method-session/{id}/confirm": {+ "/v2/payment-method-sessions/{id}/confirm": {"post": {"tags": ["Payment Method Session"@@ -3241,7 +3241,7 @@]}},- "/v2/refunds/{id}/update_metadata": {+ "/v2/refunds/{id}/update-metadata": {"put": {"tags": ["Refunds"@@ -3377,7 +3377,7 @@]}},- "/v2/process_tracker/revenue_recovery_workflow/{revenue_recovery_id}": {+ "/v2/process-trackers/revenue-recovery-workflow/{revenue_recovery_id}": {"get": {"tags": ["Revenue Recovery"diff --git a/api-reference/v2/organization/organization--create.mdx b/api-reference/v2/organization/organization--create.mdxindex 07f4e13222..4ccc77f2b4 100644--- a/api-reference/v2/organization/organization--create.mdx+++ b/api-reference/v2/organization/organization--create.mdx@@ -1,3 +1,3 @@----openapi: post /v2/organization+openapi: post /v2/organizations---\ No newline at end of filediff --git a/api-reference/v2/organization/organization--merchant-account--list.mdx b/api-reference/v2/organization/organization--merchant-account--list.mdxindex 9a03e8713d..594cc72b13 100644--- a/api-reference/v2/organization/organization--merchant-account--list.mdx+++ b/api-reference/v2/organization/organization--merchant-account--list.mdx@@ -1,3 +1,3 @@----openapi: get /v2/organization/{id}/merchant-accounts+openapi: get /v2/organizations/{id}/merchant-accounts---\ No newline at end of filediff --git a/api-reference/v2/organization/organization--retrieve.mdx b/api-reference/v2/organization/organization--retrieve.mdxindex ba06f4cfb6..d49e4db37a 100644--- a/api-reference/v2/organization/organization--retrieve.mdx+++ b/api-reference/v2/organization/organization--retrieve.mdx@@ -1,3 +1,3 @@----openapi: get /v2/organization/{id}+openapi: get /v2/organizations/{id}---\ No newline at end of filediff --git a/api-reference/v2/organization/organization--update.mdx b/api-reference/v2/organization/organization--update.mdxindex c365eb093f..1fd238c28f 100644--- a/api-reference/v2/organization/organization--update.mdx+++ b/api-reference/v2/organization/organization--update.mdx@@ -1,3 +1,3 @@----openapi: put /v2/organization/{id}+openapi: put /v2/organizations/{id}---\ No newline at end of filediff --git a/api-reference/v2/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx b/api-reference/v2/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdxindex ed9cec389d..0609477953 100644--- a/api-reference/v2/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx+++ b/api-reference/v2/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx@@ -1,3 +1,3 @@----openapi: post /v2/payment-method-session/{id}/confirm+openapi: post /v2/payment-method-sessions/{id}/confirm---\ No newline at end of filediff --git a/api-reference/v2/payment-method-session/payment-method-session--create.mdx b/api-reference/v2/payment-method-session/payment-method-session--create.mdxindex b75390a47d..ad6de7041a 100644--- a/api-reference/v2/payment-method-session/payment-method-session--create.mdx+++ b/api-reference/v2/payment-method-session/payment-method-session--create.mdx@@ -1,3 +1,3 @@----openapi: post /v2/payment-method-session+openapi: post /v2/payment-method-sessions---diff --git a/api-reference/v2/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx b/api-reference/v2/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdxindex a4bcd483c6..cb438fe1b4 100644--- a/api-reference/v2/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx+++ b/api-reference/v2/payment-method-session/payment-method-session--delete-a-saved-payment-method.mdx@@ -1,3 +1,3 @@----openapi: delete /v2/payment-method-session/{id}+openapi: delete /v2/payment-method-sessions/{id}---diff --git a/api-reference/v2/payment-method-session/payment-method-session--list-payment-methods.mdx b/api-reference/v2/payment-method-session/payment-method-session--list-payment-methods.mdxindex 1dc6cc5eb3..c007728318 100644--- a/api-reference/v2/payment-method-session/payment-method-session--list-payment-methods.mdx+++ b/api-reference/v2/payment-method-session/payment-method-session--list-payment-methods.mdx@@ -1,3 +1,3 @@----openapi: get /v2/payment-method-session/{id}/list-payment-methods+openapi: get /v2/payment-method-sessions/{id}/list-payment-methods---\ No newline at end of filediff --git a/api-reference/v2/payment-method-session/payment-method-session--retrieve.mdx b/api-reference/v2/payment-method-session/payment-method-session--retrieve.mdxindex 4e504390a4..a6f77047a7 100644--- a/api-reference/v2/payment-method-session/payment-method-session--retrieve.mdx+++ b/api-reference/v2/payment-method-session/payment-method-session--retrieve.mdx@@ -1,3 +1,3 @@----openapi: get /v2/payment-method-session/{id}+openapi: get /v2/payment-method-sessions/{id}---\ No newline at end of filediff --git a/api-reference/v2/payment-method-session/payment-method-session--update-a-saved-payment-method.mdx b/api-reference/v2/payment-method-session/payment-method-session--update-a-saved-payment-method.mdxindex f7e887dbb9..8d42dac66b 100644--- a/api-reference/v2/payment-method-session/payment-method-session--update-a-saved-payment-method.mdx+++ b/api-reference/v2/payment-method-session/payment-method-session--update-a-saved-payment-method.mdx@@ -1,3 +1,3 @@----openapi: put /v2/payment-method-session/{id}/update-saved-payment-method+openapi: put /v2/payment-method-sessions/{id}/update-saved-payment-method---diff --git a/api-reference/v2/revenue-recovery/revenue-recovery--retrieve.mdx b/api-reference/v2/revenue-recovery/revenue-recovery--retrieve.mdxindex 119f750a7a..aed5332391 100644--- a/api-reference/v2/revenue-recovery/revenue-recovery--retrieve.mdx+++ b/api-reference/v2/revenue-recovery/revenue-recovery--retrieve.mdx@@ -1,3 +1,3 @@----openapi: get /v2/process_tracker/revenue_recovery_workflow/{revenue_recovery_id}+openapi: get /v2/process-trackers/revenue-recovery-workflow/{revenue_recovery_id}---\ No newline at end of filediff --git a/api-reference/v2/routing/routing--create.mdx b/api-reference/v2/routing/routing--create.mdxindex 438abd8e23..74a59ae397 100644--- a/api-reference/v2/routing/routing--create.mdx+++ b/api-reference/v2/routing/routing--create.mdx@@ -1,3 +1,3 @@----openapi: post /v2/routing-algorithm+openapi: post /v2/routing-algorithms---\ No newline at end of filediff --git a/api-reference/v2/routing/routing--retrieve.mdx b/api-reference/v2/routing/routing--retrieve.mdxindex 10db0200e1..85efd57b9c 100644--- a/api-reference/v2/routing/routing--retrieve.mdx+++ b/api-reference/v2/routing/routing--retrieve.mdx@@ -1,3 +1,3 @@----openapi: get /v2/routing-algorithm/{id}+openapi: get /v2/routing-algorithms/{id}---\ No newline at end of filediff --git a/crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs b/crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rsindex d7e0e93c59..e6007d1e24 100644--- a/crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs+++ b/crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs@@ -85,7 +85,7 @@ impl ConnectorIntegration<ExternalVaultCreateFlow, VaultRequestData, VaultResponconnectors: &Connectors,) -> CustomResult<String, errors::ConnectorError> {Ok(format!(- "{}/v2/payment-methods-session",+ "{}/v2/payment-method-sessions",self.base_url(connectors)))}diff --git a/crates/openapi/src/routes/organization.rs b/crates/openapi/src/routes/organization.rsindex d677131d5d..832b203729 100644--- a/crates/openapi/src/routes/organization.rs+++ b/crates/openapi/src/routes/organization.rs@@ -77,7 +77,7 @@ pub async fn organization_update() {}/// Create a new organization#[utoipa::path(post,- path = "/v2/organization",+ path = "/v2/organizations",request_body(content = OrganizationCreateRequest,examples(@@ -104,7 +104,7 @@ pub async fn organization_create() {}/// Retrieve an existing organization#[utoipa::path(get,- path = "/v2/organization/{id}",+ path = "/v2/organizations/{id}",params (("id" = String, Path, description = "The unique identifier for the Organization")),responses((status = 200, description = "Organization Created", body =OrganizationResponse),@@ -122,7 +122,7 @@ pub async fn organization_retrieve() {}/// Create a new organization for .#[utoipa::path(put,- path = "/v2/organization/{id}",+ path = "/v2/organizations/{id}",request_body(content = OrganizationUpdateRequest,examples(@@ -150,7 +150,7 @@ pub async fn organization_update() {}/// List merchant accounts for an Organization#[utoipa::path(get,- path = "/v2/organization/{id}/merchant-accounts",+ path = "/v2/organizations/{id}/merchant-accounts",params (("id" = String, Path, description = "The unique identifier for the Organization")),responses((status = 200, description = "Merchant Account list retrieved successfully", body = Vec<MerchantAccountResponse>),diff --git a/crates/openapi/src/routes/payment_method.rs b/crates/openapi/src/routes/payment_method.rsindex 0cfcde2cb7..3f0ed7d799 100644--- a/crates/openapi/src/routes/payment_method.rs+++ b/crates/openapi/src/routes/payment_method.rs@@ -353,7 +353,7 @@ pub async fn list_customer_payment_method_api() {}#[cfg(feature = "v2")]#[utoipa::path(post,- path = "/v2/payment-method-session",+ path = "/v2/payment-method-sessions",request_body(content = PaymentMethodSessionRequest,examples (( "Create a payment method session with customer_id" = (@@ -378,7 +378,7 @@ pub fn payment_method_session_create() {}#[cfg(feature = "v2")]#[utoipa::path(get,- path = "/v2/payment-method-session/{id}",+ path = "/v2/payment-method-sessions/{id}",params (("id" = String, Path, description = "The unique identifier for the Payment Method Session"),),@@ -399,7 +399,7 @@ pub fn payment_method_session_retrieve() {}#[cfg(feature = "v2")]#[utoipa::path(get,- path = "/v2/payment-method-session/{id}/list-payment-methods",+ path = "/v2/payment-method-sessions/{id}/list-payment-methods",params (("id" = String, Path, description = "The unique identifier for the Payment Method Session"),),@@ -419,7 +419,7 @@ pub fn payment_method_session_list_payment_methods() {}#[cfg(feature = "v2")]#[utoipa::path(put,- path = "/v2/payment-method-session/{id}/update-saved-payment-method",+ path = "/v2/payment-method-sessions/{id}/update-saved-payment-method",params (("id" = String, Path, description = "The unique identifier for the Payment Method Session"),),@@ -453,7 +453,7 @@ pub fn payment_method_session_update_saved_payment_method() {}#[cfg(feature = "v2")]#[utoipa::path(delete,- path = "/v2/payment-method-session/{id}",+ path = "/v2/payment-method-sessions/{id}",params (("id" = String, Path, description = "The unique identifier for the Payment Method Session"),),@@ -520,7 +520,7 @@ pub async fn tokenize_card_using_pm_api() {}/// **Confirms a payment method session object with the payment method data**#[utoipa::path(post,- path = "/v2/payment-method-session/{id}/confirm",+ path = "/v2/payment-method-sessions/{id}/confirm",params (("id" = String, Path, description = "The unique identifier for the Payment Method Session"),("X-Profile-Id" = String, Header,diff --git a/crates/openapi/src/routes/refunds.rs b/crates/openapi/src/routes/refunds.rsindex f33369d388..be8c63e469 100644--- a/crates/openapi/src/routes/refunds.rs+++ b/crates/openapi/src/routes/refunds.rs@@ -221,7 +221,7 @@ pub async fn refunds_create() {}/// Updates the properties of a Refund object. This API can be used to attach a reason for the refund or metadata fields#[utoipa::path(put,- path = "/v2/refunds/{id}/update_metadata",+ path = "/v2/refunds/{id}/update-metadata",params(("id" = String, Path, description = "The identifier for refund")),diff --git a/crates/openapi/src/routes/revenue_recovery.rs b/crates/openapi/src/routes/revenue_recovery.rsindex 8e3b2aaf41..0f22b340bd 100644--- a/crates/openapi/src/routes/revenue_recovery.rs+++ b/crates/openapi/src/routes/revenue_recovery.rs@@ -4,7 +4,7 @@/// Retrieve the Revenue Recovery Payment Info#[utoipa::path(get,- path = "/v2/process_tracker/revenue_recovery_workflow/{revenue_recovery_id}",+ path = "/v2/process-trackers/revenue-recovery-workflow/{revenue_recovery_id}",params(("recovery_recovery_id" = String, Path, description = "The payment intent id"),),diff --git a/crates/openapi/src/routes/routing.rs b/crates/openapi/src/routes/routing.rsindex f657915e6a..78f4c8b187 100644--- a/crates/openapi/src/routes/routing.rs+++ b/crates/openapi/src/routes/routing.rs@@ -26,7 +26,7 @@ pub async fn routing_create_config() {}/// Create a routing algorithm#[utoipa::path(post,- path = "/v2/routing-algorithm",+ path = "/v2/routing-algorithms",request_body = RoutingConfigRequest,responses((status = 200, description = "Routing Algorithm created", body = RoutingDictionaryRecord),@@ -92,7 +92,7 @@ pub async fn routing_retrieve_config() {}/// Retrieve a routing algorithm with its algorithm id#[utoipa::path(get,- path = "/v2/routing-algorithm/{id}",+ path = "/v2/routing-algorithms/{id}",params(("id" = String, Path, description = "The unique identifier for a routing algorithm"),),diff --git a/crates/router/src/lib.rs b/crates/router/src/lib.rsindex e002f7fd05..01676a11d4 100644--- a/crates/router/src/lib.rs+++ b/crates/router/src/lib.rs@@ -210,7 +210,10 @@ pub fn mk_app(#[cfg(feature = "v2")]{- server_app = server_app.service(routes::ProcessTracker::server(state.clone()));+ server_app = server_app+ .service(routes::UserDeprecated::server(state.clone()))+ .service(routes::ProcessTrackerDeprecated::server(state.clone()))+ .service(routes::ProcessTracker::server(state.clone()));}}diff --git a/crates/router/src/routes.rs b/crates/router/src/routes.rsindex fcf7270fa8..b8fde79e2a 100644--- a/crates/router/src/routes.rs+++ b/crates/router/src/routes.rs@@ -91,8 +91,9 @@ pub use self::app::{ApiKeys, AppState, ApplePayCertificatesMigration, Authentication, Cache, Cards, Chat, Configs,ConnectorOnboarding, Customers, Disputes, EphemeralKey, FeatureMatrix, Files, Forex, Gsm,Health, Hypersense, Mandates, MerchantAccount, MerchantConnectorAccount, PaymentLink,- PaymentMethods, Payments, Poll, ProcessTracker, Profile, ProfileAcquirer, ProfileNew, Refunds,- Relay, RelayWebhooks, SessionState, ThreeDsDecisionRule, User, Webhooks,+ PaymentMethods, Payments, Poll, ProcessTracker, ProcessTrackerDeprecated, Profile,+ ProfileAcquirer, ProfileNew, Refunds, Relay, RelayWebhooks, SessionState, ThreeDsDecisionRule,+ User, UserDeprecated, Webhooks,};#[cfg(feature = "olap")]pub use self::app::{Blocklist, Organization, Routing, Verify, WebhookEvents};diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rsindex 917d9050d8..dbf4c5af13 100644--- a/crates/router/src/routes/app.rs+++ b/crates/router/src/routes/app.rs@@ -657,10 +657,15 @@ impl Payments {web::resource("/confirm-intent").route(web::post().to(payments::payment_confirm_intent)),)+ // TODO: Deprecated. Remove this in favour of /list-attempts.service(web::resource("/list_attempts").route(web::get().to(payments::list_payment_attempts)),)+ .service(+ web::resource("/list-attempts")+ .route(web::get().to(payments::list_payment_attempts)),+ ).service(web::resource("/proxy-confirm-intent").route(web::post().to(payments::proxy_confirm_intent)),@@ -882,7 +887,7 @@ pub struct Routing;#[cfg(all(feature = "olap", feature = "v2"))]impl Routing {pub fn server(state: AppState) -> Scope {- web::scope("/v2/routing-algorithm")+ web::scope("/v2/routing-algorithms").app_data(web::Data::new(state.clone())).service(web::resource("").route(web::post().to(|state, req, payload| {@@ -1255,7 +1260,7 @@ impl Refunds {.route(web::post().to(refunds::refunds_retrieve_with_gateway_creds)),).service(- web::resource("/{id}/update_metadata")+ web::resource("/{id}/update-metadata").route(web::put().to(refunds::refunds_metadata_update)),);}@@ -1425,7 +1430,7 @@ pub struct PaymentMethodSession;#[cfg(all(feature = "v2", feature = "oltp"))]impl PaymentMethodSession {pub fn server(state: AppState) -> Scope {- let mut route = web::scope("/v2/payment-methods-session").app_data(web::Data::new(state));+ let mut route = web::scope("/v2/payment-method-sessions").app_data(web::Data::new(state));route = route.service(web::resource("").route(web::post().to(payment_methods::payment_methods_session_create)),@@ -1558,7 +1563,7 @@ impl Organization {#[cfg(all(feature = "v2", feature = "olap"))]impl Organization {pub fn server(state: AppState) -> Scope {- web::scope("/v2/organization")+ web::scope("/v2/organizations").app_data(web::Data::new(state)).service(web::resource("").route(web::post().to(admin::organization_create))).service(@@ -2282,11 +2287,12 @@ impl Verify {}}-pub struct User;+pub struct UserDeprecated;#[cfg(all(feature = "olap", feature = "v2"))]-impl User {+impl UserDeprecated {pub fn server(state: AppState) -> Scope {+ // TODO: Deprecated. Remove this in favour of /v2/userslet mut route = web::scope("/v2/user").app_data(web::Data::new(state));route = route.service(@@ -2327,6 +2333,51 @@ impl User {}}+pub struct User;++#[cfg(all(feature = "olap", feature = "v2"))]+impl User {+ pub fn server(state: AppState) -> Scope {+ let mut route = web::scope("/v2/users").app_data(web::Data::new(state));++ route = route.service(+ web::resource("/create-merchant")+ .route(web::post().to(user::user_merchant_account_create)),+ );+ route = route.service(+ web::scope("/list")+ .service(+ web::resource("/merchant")+ .route(web::get().to(user::list_merchants_for_user_in_org)),+ )+ .service(+ web::resource("/profile")+ .route(web::get().to(user::list_profiles_for_user_in_org_and_merchant)),+ ),+ );++ route = route.service(+ web::scope("/switch")+ .service(+ web::resource("/merchant")+ .route(web::post().to(user::switch_merchant_for_user_in_org)),+ )+ .service(+ web::resource("/profile")+ .route(web::post().to(user::switch_profile_for_user_in_org_and_merchant)),+ ),+ );++ route = route.service(+ web::resource("/data")+ .route(web::get().to(user::get_multiple_dashboard_metadata))+ .route(web::post().to(user::set_dashboard_metadata)),+ );++ route+ }+}+#[cfg(all(feature = "olap", feature = "v1"))]impl User {pub fn server(state: AppState) -> Scope {@@ -2696,6 +2747,23 @@ impl FeatureMatrix {}}+#[cfg(feature = "olap")]+pub struct ProcessTrackerDeprecated;++#[cfg(all(feature = "olap", feature = "v2"))]+impl ProcessTrackerDeprecated {+ pub fn server(state: AppState) -> Scope {+ use super::process_tracker::revenue_recovery;+ // TODO: Deprecated. Remove this in favour of /v2/process-trackers+ web::scope("/v2/process_tracker/revenue_recovery_workflow")+ .app_data(web::Data::new(state.clone()))+ .service(+ web::resource("/{revenue_recovery_id}")+ .route(web::get().to(revenue_recovery::revenue_recovery_pt_retrieve_api)),+ )+ }+}+#[cfg(feature = "olap")]pub struct ProcessTracker;@@ -2703,7 +2771,7 @@ pub struct ProcessTracker;impl ProcessTracker {pub fn server(state: AppState) -> Scope {use super::process_tracker::revenue_recovery;- web::scope("/v2/process_tracker/revenue_recovery_workflow")+ web::scope("/v2/process-trackers/revenue-recovery-workflow").app_data(web::Data::new(state.clone())).service(web::resource("/{revenue_recovery_id}")diff --git a/cypress-tests-v2/cypress/support/commands.js b/cypress-tests-v2/cypress/support/commands.jsindex 54e52495d6..e77a0f6514 100644--- a/cypress-tests-v2/cypress/support/commands.js+++ b/cypress-tests-v2/cypress/support/commands.js@@ -45,7 +45,7 @@ Cypress.Commands.add(// Define the necessary variables and constantsconst api_key = globalState.get("adminApiKey");const base_url = globalState.get("baseUrl");- const url = `${base_url}/v2/organization`;+ const url = `${base_url}/v2/organizations`;// Update request bodyorganizationCreateBody.organization_name += " " + nanoid();@@ -84,7 +84,7 @@ Cypress.Commands.add("organizationRetrieveCall", (globalState) => {const api_key = globalState.get("adminApiKey");const base_url = globalState.get("baseUrl");const organization_id = globalState.get("organizationId");- const url = `${base_url}/v2/organization/${organization_id}`;+ const url = `${base_url}/v2/organizations/${organization_id}`;cy.request({method: "GET",@@ -125,7 +125,7 @@ Cypress.Commands.add(const api_key = globalState.get("adminApiKey");const base_url = globalState.get("baseUrl");const organization_id = globalState.get("organizationId");- const url = `${base_url}/v2/organization/${organization_id}`;+ const url = `${base_url}/v2/organizations/${organization_id}`;// Update request bodyorganizationUpdateBody.organization_name += " " + nanoid();@@ -805,7 +805,7 @@ Cypress.Commands.add(const api_key = globalState.get("userInfoToken");const base_url = globalState.get("baseUrl");const profile_id = globalState.get("profileId");- const url = `${base_url}/v2/routing-algorithm`;+ const url = `${base_url}/v2/routing-algorithms`;// Update request bodyroutingSetupBody.algorithm.data = payload.data;@@ -961,7 +961,7 @@ Cypress.Commands.add("routingRetrieveCall", (globalState) => {const base_url = globalState.get("baseUrl");const profile_id = globalState.get("profileId");const routing_algorithm_id = globalState.get("routingAlgorithmId");- const url = `${base_url}/v2/routing-algorithm/${routing_algorithm_id}`;+ const url = `${base_url}/v2/routing-algorithms/${routing_algorithm_id}`;cy.request({method: "GET",@@ -1170,7 +1170,7 @@ Cypress.Commands.add("merchantAccountsListCall", (globalState) => {const key_id_type = "publishable_key";const key_id = validateEnv(base_url, key_id_type);const organization_id = globalState.get("organizationId");- const url = `${base_url}/v2/organization/${organization_id}/merchant-accounts`;+ const url = `${base_url}/v2/organizations/${organization_id}/merchant-accounts`;cy.request({method: "GET",