{
  "swagger": "2.0",
  "info": {
    "title": "Zetaleap Currency FX",
    "description": "Fetch real-time ISO 4217 foreign exchange rates across 150+ world currencies for Dynamics 365, Dataverse, SAP invoicing, and Power BI scheduled refreshes.",
    "version": "1.0.0",
    "contact": {
      "name": "Zetaleap Support Team",
      "url": "https://zetaleap.com/#contact",
      "email": "support_team@zetaleap.com"
    }
  },
  "x-ms-connector-metadata": [
    {
      "propertyName": "Website",
      "propertyValue": "https://zetaleap.com"
    },
    {
      "propertyName": "Privacy policy",
      "propertyValue": "https://zetaleap.com/privacy"
    },
    {
      "propertyName": "Categories",
      "propertyValue": "Finance;Data"
    }
  ],
  "host": "test.zetaleap.com",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "api_key": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Enter your Zetaleap Personal Access Token prefixed with Bearer (example: Bearer zl_your_api_token). Generate tokens free at https://zetaleap.com/profile."
    }
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/api/rates": {
      "get": {
        "tags": [
          "Currency FX"
        ],
        "operationId": "GetExchangeRates",
        "summary": "Get real-time currency exchange rates",
        "description": "Returns live foreign exchange rates for 150+ ISO 4217 world currencies relative to the selected base currency.",
        "x-ms-visibility": "important",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "base",
            "in": "query",
            "type": "string",
            "required": false,
            "default": "USD",
            "x-ms-summary": "Base Currency (ISO 4217)",
            "description": "Three-letter base currency code such as USD, EUR, GBP, or TRY."
          },
          {
            "name": "targets",
            "in": "query",
            "type": "string",
            "required": false,
            "x-ms-summary": "Target Currencies (Comma-Separated)",
            "description": "Optional comma-separated ISO codes (e.g. EUR,GBP,TRY,CHF,JPY,CAD). Leave empty for all 150+ currencies."
          }
        ],
        "responses": {
          "200": {
            "description": "Exchange rates payload",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "x-ms-summary": "Success"
                },
                "base": {
                  "type": "string",
                  "x-ms-summary": "Base Currency"
                },
                "last_updated": {
                  "type": "string",
                  "x-ms-summary": "Last Updated Timestamp"
                },
                "rates": {
                  "type": "object",
                  "x-ms-summary": "Currency Rates Map",
                  "properties": {
                    "USD": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "USD Rate"
                    },
                    "EUR": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "EUR Rate"
                    },
                    "GBP": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "GBP Rate"
                    },
                    "TRY": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "TRY Rate"
                    },
                    "CHF": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "CHF Rate"
                    },
                    "JPY": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "JPY Rate"
                    },
                    "CAD": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "CAD Rate"
                    },
                    "AUD": {
                      "type": "number",
                      "format": "double",
                      "x-ms-summary": "AUD Rate"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}