---
agentTools:
  projectIndex: https://docs.quidax.io/llms.txt
---

# Retrieve an Auto Swap

Return one Auto Swap using its merchant reference, including the customer's details and static bank account. Use this endpoint to retrieve the account details for an existing Auto Swap.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Ramp Merchant API",
    "version": "3.0"
  },
  "servers": [
    {
      "url": "https://ramp-be.quidax.io/api/v1/merchants/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "x-private-key",
        "in": "header",
        "x-default": "secret_key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/custodial/auto_swap/{merchant_reference}": {
      "get": {
        "summary": "Retrieve an Auto Swap",
        "description": "Return one Auto Swap using its merchant reference, including the customer's details and static bank account. Use this endpoint to retrieve the account details for an existing Auto Swap.",
        "operationId": "retrieve-an-auto-swap",
        "parameters": [
          {
            "name": "merchant_reference",
            "in": "path",
            "description": "unique reference",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"ok\",\n  \"message\": \"Auto swap found\",\n  \"data\": {\n    \"public_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"merchant_reference\": \"customer-1042-auto-swap\",\n    \"customer\": {\n      \"email\": \"customer@example.com\",\n      \"first_name\": \"Ada\",\n      \"last_name\": \"Okafor\"\n    },\n    \"side\": \"onramp\",\n    \"deposit_bank_account\": {\n      \"account_number\": \"0123456789\",\n      \"account_name\": \"Ada Okafor\",\n      \"currency\": \"ngn\",\n      \"bank_name\": \"Example Bank\",\n      \"bank_code\": \"000\"\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "message": {
                      "type": "string",
                      "example": "Auto swap found"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "public_id": {
                          "type": "string",
                          "example": "550e8400-e29b-41d4-a716-446655440000"
                        },
                        "merchant_reference": {
                          "type": "string",
                          "example": "customer-1042-auto-swap"
                        },
                        "customer": {
                          "type": "object",
                          "properties": {
                            "email": {
                              "type": "string",
                              "example": "customer@example.com"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Ada"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Okafor"
                            }
                          }
                        },
                        "side": {
                          "type": "string",
                          "example": "onramp"
                        },
                        "deposit_bank_account": {
                          "type": "object",
                          "properties": {
                            "account_number": {
                              "type": "string",
                              "example": "0123456789"
                            },
                            "account_name": {
                              "type": "string",
                              "example": "Ada Okafor"
                            },
                            "currency": {
                              "type": "string",
                              "example": "ngn"
                            },
                            "bank_name": {
                              "type": "string",
                              "example": "Example Bank"
                            },
                            "bank_code": {
                              "type": "string",
                              "example": "000"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"not_found\",\n  \"message\": \"Auto swap not found\",\n  \"data\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "not_found"
                    },
                    "message": {
                      "type": "string",
                      "example": "Auto swap not found"
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6981ba5faf9470ee082aeecd:6ad52be44e6baa190ae75773"
}
```