{
  "openapi": "3.0.0",
  "info": {
    "title": "x-gateway-external-api",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.xgateway.tech/api/v2"
    }
  ],
  "paths": {
    "/customer/{id}/bank-transfer": {
      "patch": {
        "operationId": "UpdateBankTransferAccountDetails",
        "responses": {
          "204": {
            "description": "Action has been accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppSuccessResponse_string_"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "data": "Action has been accepted",
                      "success": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Database violation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppErrorResponse"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "errors": [
                        {
                          "code": "db_violation",
                          "message": "The request failed because it violated a database constraint."
                        }
                      ],
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppAuthenticationErrorResponse"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "errors": [
                        {
                          "code": "unauthorized",
                          "message": "You do not have permission to access this resource."
                        }
                      ],
                      "success": false
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppValidationErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppErrorResponse"
                }
              }
            }
          }
        },
        "description": "Updates the bank transfer profile details for a specified customer. This endpoint allows for\r\npartial updates; thus, only the fields provided in the request body will be updated.\r\n\r\nAccess to this endpoint requires a valid API key. The API key is sent in the `x-api-key` header on requests.",
        "summary": "Updates customer bank transfer profile details. Only the provided fields will be\r\nupdated.",
        "tags": [
          "Customer"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "parameters": [
          {
            "description": "- The external identifier for the customer, used to uniquely identify them\r\nand associate them with a merchant.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "- The details to be updated. This includes\r\noptional fields for the customer's first name, last name, date of birth, email, target address,\r\nand physical address.\r\n__Params__:\r\n- __address.city__ - The city name.\r\n- __address.postCode__ - The postcode.\r\n- __address.addressLine1__ - The address line 1.\r\n- __address.addressLine2__ - The address line 2.\r\n- __address.country__ - The ISO 3166-1 alpha-2 country name.\r\n- __dateOfBirth__ - Date of Birth. \"YYYY-MM-DD\".\r\n- __lastName__ - The last name.\r\n- __firstName__ - The first name.\r\n- __email__ - The email address.\r\n- __acceptedPrivacyPolicyHash__ - base64-encoded SHA256 hash of the Privacy Policy. Required for API-driven KYC flows.\r\n- __acceptedTermsAndConditionsHash__ - Optional base64-encoded SHA256 hash of Terms & Conditions. Required for API-driven KYC flows.\r\n- __acceptedTermsOfServiceHash__ - Optional base64-encoded SHA256 hash of Terms of Service. Required for API-driven KYC flows.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBankTransferAccountDetailsInput",
                "description": "- The details to be updated. This includes\r\noptional fields for the customer's first name, last name, date of birth, email, target address,\r\nand physical address.\r\n__Params__:\r\n- __address.city__ - The city name.\r\n- __address.postCode__ - The postcode.\r\n- __address.addressLine1__ - The address line 1.\r\n- __address.addressLine2__ - The address line 2.\r\n- __address.country__ - The ISO 3166-1 alpha-2 country name.\r\n- __dateOfBirth__ - Date of Birth. \"YYYY-MM-DD\".\r\n- __lastName__ - The last name.\r\n- __firstName__ - The first name.\r\n- __email__ - The email address.\r\n- __acceptedPrivacyPolicyHash__ - base64-encoded SHA256 hash of the Privacy Policy. Required for API-driven KYC flows.\r\n- __acceptedTermsAndConditionsHash__ - Optional base64-encoded SHA256 hash of Terms & Conditions. Required for API-driven KYC flows.\r\n- __acceptedTermsOfServiceHash__ - Optional base64-encoded SHA256 hash of Terms of Service. Required for API-driven KYC flows."
              },
              "examples": {
                "Example 1": {
                  "value": {
                    "address": {
                      "city": "Sydney",
                      "postCode": "2000",
                      "addressLine1": "45 Pitt Street",
                      "addressLine2": "Level 2, Suite 3",
                      "country": "AU"
                    },
                    "dateOfBirth": "1990-12-25",
                    "lastName": "Doe",
                    "firstName": "John",
                    "email": "johndoe@gmail.com"
                  }
                },
                "Example 2": {
                  "value": {
                    "acceptedPrivacyPolicyHash": "+hKGaGhIRpUJAW9vMG5y51WMvbTOYb8C1Ln42IuTX4A=",
                    "acceptedTermsAndConditionsHash": "HqKJAiAyPqBFOs386w6EVO5KlKQt5z8EzGvSB+iQeTQ=",
                    "acceptedTermsOfServiceHash": "lIPG8x6y+ObLv5bDWhn8h7QP0z221Iu3Ge1rLH4uvHI="
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AppSuccessResponse_string_": {
        "description": "The AppSuccessResponse object contains general information about the success execution.",
        "properties": {
          "success": {
            "type": "boolean",
            "default": true
          },
          "data": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "data"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "AppClientErrorResponseCode": {
        "type": "string",
        "enum": [
          "bad_request",
          "db_violation",
          "unauthorized",
          "payment_required",
          "forbidden",
          "not_found",
          "method_not_allowed",
          "not_acceptable",
          "proxy_authentication_required",
          "request_timeout",
          "conflict",
          "db_unique_violation",
          "gone",
          "length_required",
          "precondition_failed",
          "payload_too_large",
          "uri_too_long",
          "unsupported_media_type",
          "range_not_satisfiable",
          "expectation_failed",
          "misdirected_request",
          "unprocessable_content",
          "db_non_null_violation",
          "locked",
          "failed_dependency",
          "upgrade_required",
          "precondition_required",
          "too_many_requests",
          "request_header_fields_too_large",
          "unavailable_for_legal_reasons"
        ],
        "nullable": false,
        "description": "The AppClientErrorResponseCode object contains all client error response codes."
      },
      "AppServerErrorResponseCode": {
        "type": "string",
        "enum": [
          "internal_server_error",
          "not_implemented",
          "bad_gateway",
          "service_unavailable",
          "gateway_timeout",
          "http_version_not_supported",
          "variant_also_negotiates",
          "insufficient_storage",
          "loop_detected",
          "not_extended",
          "network_authentication_required"
        ],
        "nullable": false,
        "description": "The AppServerErrorResponseCode object contains all server error response codes."
      },
      "IAppError": {
        "description": "The IAppError interface represents an application error message.",
        "properties": {
          "code": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AppClientErrorResponseCode"
              },
              {
                "$ref": "#/components/schemas/AppServerErrorResponseCode"
              }
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "AppErrorResponse": {
        "description": "The AppErrorResponse object contains general information about the error message.",
        "properties": {
          "success": {
            "type": "boolean",
            "default": false
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/IAppError"
            },
            "type": "array"
          }
        },
        "required": [
          "success",
          "errors"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "AppAuthenticationErrorResponse": {
        "description": "The AppAuthenticationErrorResponse object contains general information about the authentication\r\nerror.",
        "properties": {
          "success": {
            "type": "boolean",
            "default": false
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/IAppError"
            },
            "type": "array",
            "default": [
              {
                "code": "unauthorized",
                "message": "You do not have permission to access this resource."
              }
            ]
          }
        },
        "required": [
          "success",
          "errors"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "AppValidationErrorResponse": {
        "description": "The AppValidationErrorResponse object contains general information about the validation error.",
        "properties": {
          "success": {
            "type": "boolean",
            "default": false
          },
          "errors": {
            "items": {},
            "type": "array"
          }
        },
        "required": [
          "success",
          "errors"
        ],
        "type": "object",
        "additionalProperties": false
      },
      "UpdateBankTransferAccountDetailsInput": {
        "properties": {
          "acceptedTermsOfServiceHash": {
            "type": "string"
          },
          "acceptedTermsAndConditionsHash": {
            "type": "string"
          },
          "acceptedPrivacyPolicyHash": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date-time"
          },
          "address": {
            "properties": {
              "postCode": {
                "type": "string"
              },
              "addressLine2": {
                "type": "string"
              },
              "addressLine1": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "lastName": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "api_key": {
        "in": "header",
        "name": "x-api-key",
        "type": "apiKey"
      }
    }
  }
}