Skip to content

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

chore(api-reference): update customers retrieval endpoints (#13061)

Kashifc380061c4435
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index 8d67453d63..c283b6724a 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -3461,6 +3461,47 @@
]
}
},
+ "/v1/customers/reference/{merchant_reference_id}": {
+ "get": {
+ "tags": [
+ "Customers"
+ ],
+ "summary": "Customers - Retrieve using Merchant Reference ID",
+ "description": "Retrieves a customer's details using the merchant supplied reference ID.",
+ "operationId": "Retrieve a Customer using Merchant Reference ID",
+ "parameters": [
+ {
+ "name": "merchant_reference_id",
+ "in": "path",
+ "description": "The merchant supplied reference identifier for the Customer",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Customer Retrieved",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CustomerResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Customer was not found"
+ }
+ },
+ "security": [
+ {
+ "api_key": []
+ }
+ ]
+ }
+ },
"/customers/list": {
"get": {
"tags": [
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index 4d13b62983..7788d9aa4d 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -1835,7 +1835,7 @@
]
}
},
- "/v1/customers/reference/{merchant_reference_id}": {
+ "/v2/customers/reference/{merchant_reference_id}": {
"get": {
"tags": [
"Customers"
diff --git a/crates/openapi/src/openapi.rs b/crates/openapi/src/openapi.rs
index ae9ff0a345..749f029f06 100644
--- a/crates/openapi/src/openapi.rs
+++ b/crates/openapi/src/openapi.rs
@@ -139,6 +139,7 @@ Never share your secret api keys. Keep them guarded and secure.
//Routes for customers
routes::customers::customers_create,
routes::customers::customers_retrieve,
+ routes::customers::customers_retrieve_by_merchant_reference_id,
routes::customers::customers_list,
routes::customers::customers_update,
routes::customers::customers_delete,
diff --git a/crates/openapi/src/routes/customers.rs b/crates/openapi/src/routes/customers.rs
index 9f1e960131..6202721d80 100644
--- a/crates/openapi/src/routes/customers.rs
+++ b/crates/openapi/src/routes/customers.rs
@@ -207,7 +207,7 @@ pub async fn customers_retrieve() {}
/// Retrieves a customer's details using the merchant supplied reference ID.
#[utoipa::path(
get,
- path = "/v1/customers/reference/{merchant_reference_id}",
+ path = "/v2/customers/reference/{merchant_reference_id}",
params (
(
"merchant_reference_id" = String,
@@ -231,6 +231,30 @@ pub async fn customers_retrieve() {}
#[cfg(feature = "v2")]
pub async fn customers_retrieve_by_merchant_reference_id() {}
+/// Customers - Retrieve using Merchant Reference ID
+///
+/// Retrieves a customer's details using the merchant supplied reference ID.
+#[utoipa::path(
+ get,
+ path = "/v1/customers/reference/{merchant_reference_id}",
+ params (
+ (
+ "merchant_reference_id" = String,
+ Path,
+ description = "The merchant supplied reference identifier for the Customer"
+ )
+ ),
+ responses(
+ (status = 200, description = "Customer Retrieved", body = CustomerResponse),
+ (status = 404, description = "Customer was not found")
+ ),
+ tag = "Customers",
+ operation_id = "Retrieve a Customer using Merchant Reference ID",
+ security(("api_key" = []))
+)]
+#[cfg(feature = "v1")]
+pub async fn customers_retrieve_by_merchant_reference_id() {}
+
/// Customers - Retrieve
///
/// Retrieves a customer's details.