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

docs(v2): Added 'X-Merchant-Id' to headers in Profile API docs (#6291)

Anurag Thakurca086d0b25ee
diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json
index 0d06e2230b..7e9cc57bf6 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -711,6 +711,20 @@
"summary": "Profile - Create",
"description": "Creates a new *profile* for a merchant",
"operationId": "Create A Profile",
+ "parameters": [
+ {
+ "name": "X-Merchant-Id",
+ "in": "header",
+ "description": "Merchant ID of the profile.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "example": {
+ "X-Merchant-Id": "abc_iG5VNjsN9xuCg7Xx0uWh"
+ }
+ }
+ ],
"requestBody": {
"content": {
"application/json": {
@@ -767,6 +781,18 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "X-Merchant-Id",
+ "in": "header",
+ "description": "Merchant ID of the profile.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "example": {
+ "X-Merchant-Id": "abc_iG5VNjsN9xuCg7Xx0uWh"
+ }
}
],
"responses": {
@@ -806,6 +832,18 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "X-Merchant-Id",
+ "in": "header",
+ "description": "Merchant ID of the profile.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "example": {
+ "X-Merchant-Id": "abc_iG5VNjsN9xuCg7Xx0uWh"
+ }
}
],
"requestBody": {
@@ -864,6 +902,18 @@
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "X-Merchant-Id",
+ "in": "header",
+ "description": "Merchant ID of the profile.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "example": {
+ "X-Merchant-Id": "abc_iG5VNjsN9xuCg7Xx0uWh"
+ }
}
],
"responses": {
diff --git a/crates/openapi/src/routes/profile.rs b/crates/openapi/src/routes/profile.rs
index f726c76db8..fc56e64271 100644
--- a/crates/openapi/src/routes/profile.rs
+++ b/crates/openapi/src/routes/profile.rs
@@ -139,6 +139,13 @@ pub async fn profile_list() {}
#[utoipa::path(
post,
path = "/v2/profiles",
+ params(
+ (
+ "X-Merchant-Id" = String, Header,
+ description = "Merchant ID of the profile.",
+ example = json!({"X-Merchant-Id": "abc_iG5VNjsN9xuCg7Xx0uWh"})
+ ),
+ ),
request_body(
content = ProfileCreate,
examples(
@@ -169,7 +176,12 @@ pub async fn profile_create() {}
put,
path = "/v2/profiles/{profile_id}",
params(
- ("profile_id" = String, Path, description = "The unique identifier for the profile")
+ ("profile_id" = String, Path, description = "The unique identifier for the profile"),
+ (
+ "X-Merchant-Id" = String, Header,
+ description = "Merchant ID of the profile.",
+ example = json!({"X-Merchant-Id": "abc_iG5VNjsN9xuCg7Xx0uWh"})
+ ),
),
request_body(
content = ProfileCreate,
@@ -276,7 +288,12 @@ pub async fn routing_update_default_config() {}
get,
path = "/v2/profiles/{profile_id}",
params(
- ("profile_id" = String, Path, description = "The unique identifier for the profile")
+ ("profile_id" = String, Path, description = "The unique identifier for the profile"),
+ (
+ "X-Merchant-Id" = String, Header,
+ description = "Merchant ID of the profile.",
+ example = json!({"X-Merchant-Id": "abc_iG5VNjsN9xuCg7Xx0uWh"})
+ ),
),
responses(
(status = 200, description = "Profile Updated", body = ProfileResponse),
@@ -339,6 +356,11 @@ pub async fn routing_retrieve_default_config() {}
path = "/v2/profiles/{profile_id}/connector_accounts",
params(
("profile_id" = String, Path, description = "The unique identifier for the business profile"),
+ (
+ "X-Merchant-Id" = String, Header,
+ description = "Merchant ID of the profile.",
+ example = json!({"X-Merchant-Id": "abc_iG5VNjsN9xuCg7Xx0uWh"})
+ ),
),
responses(
(status = 200, description = "Merchant Connector list retrieved successfully", body = Vec<MerchantConnectorResponse>),