{
  "openapi": "3.1.0",
  "info": {
    "title": "Lokalna witryna — kontrakt backendu",
    "version": "1.3.0",
    "description": "Kontrakt lokalnego mocka 1.3.0: 14 operacji. Kursy: mortgage (CHF/EUR), retail (13 walut), corporate (17 walut). Dane archiwalne z 24.10.2026; zakres historii 17–24.10.2026. Formularze lokalne są symulacjami bez trwałego zapisu i wysyłki do banku. Zewnętrzne formularze i logowanie pozostają pod oryginalnymi URL. X-Mock-Scenario: unavailable wywołuje błąd 503. Swagger ma lokalne zasoby."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/api/v1/health": {
      "get": {
        "operationId": "health",
        "summary": "Stan backendu",
        "description": "Health and implementation status.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Diagnostyka"
        ]
      }
    },
    "/api/v1/support/availability": {
      "get": {
        "operationId": "supportAvailability",
        "summary": "Dostępność czatu i wideo",
        "description": "Source widget adapter. Chat/video are disabled in the mock.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Widgety"
        ]
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "search",
        "summary": "Przeszukaj lokalną kopię",
        "description": "Search only pages available in the local copy.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            },
            "example": "karta"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Wyszukiwanie"
        ]
      }
    },
    "/api/v1/currency/history": {
      "post": {
        "operationId": "currencyHistory",
        "summary": "Archiwalne kursy hipoteczne, detaliczne i korporacyjne",
        "description": "client=mortgage: CHF/EUR. client=retail: 13 walut. Historia 17–24.10.2026; poza zakresem OUTSIDE_SNAPSHOT (422). Kwoty HUF i JPY dotyczą 100 jednostek. client=corporate: odrębny zapis 17 walut przedsiębiorstw; zakres dat 17–24.10.2026.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HistoryRequest"
              },
              "examples": {
                "mortgage": {
                  "summary": "Kursy hipoteczne",
                  "value": {
                    "currency": "CHF",
                    "from": "2026-10-17",
                    "to": "2026-10-24",
                    "client": "mortgage"
                  }
                },
                "retail": {
                  "summary": "Kursy detaliczne (13 walut)",
                  "value": {
                    "currency": "HUF",
                    "from": "2026-10-17",
                    "to": "2026-10-24",
                    "client": "retail"
                  }
                },
                "corporate": {
                  "summary": "Przedsiębiorstwa — 17 walut",
                  "value": {
                    "client": "corporate",
                    "currency": "CNY",
                    "from": "2026-10-17",
                    "to": "2026-10-24"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Kursy walut"
        ]
      }
    },
    "/api/v1/currency/latest": {
      "post": {
        "operationId": "currencyLatest",
        "summary": "Ostatnia zapisana tabela kursów",
        "description": "Tabela zapisana 24.10.2026, notowania 23.10.2026. mortgage: 2 waluty; retail: 13 walut. unit określa liczbę jednostek waluty. client=corporate: odrębny zapis 17 walut przedsiębiorstw; zakres dat 17–24.10.2026.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LatestEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LatestRequest"
              },
              "examples": {
                "mortgage": {
                  "summary": "Kursy hipoteczne",
                  "value": {
                    "asOf": "2026-10-24",
                    "client": "mortgage"
                  }
                },
                "retail": {
                  "summary": "Kursy detaliczne (13 walut)",
                  "value": {
                    "asOf": "2026-10-24",
                    "client": "retail"
                  }
                },
                "corporate": {
                  "summary": "Przedsiębiorstwa — 17 walut",
                  "value": {
                    "client": "corporate",
                    "asOf": "2026-10-24"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Kursy walut"
        ]
      }
    },
    "/api/v1/contact-requests": {
      "post": {
        "operationId": "contactRequest",
        "summary": "Symulowane zgłoszenie kontaktowe",
        "description": "Simulated receipt; no persistence and no message to the bank.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              },
              "example": {
                "name": "Osoba Testowa",
                "phone": "000000000",
                "topic": "cards",
                "consent": true
              }
            }
          }
        },
        "tags": [
          "Formularze"
        ]
      }
    },
    "/api/v1/newsletter-subscriptions": {
      "post": {
        "operationId": "newsletterSubscription",
        "summary": "Symulowany zapis na newsletter",
        "description": "Simulated receipt; no mailing-list enrollment.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewsletterRequest"
              },
              "example": {
                "email": "test@example.test",
                "consent": true
              }
            }
          }
        },
        "tags": [
          "Formularze"
        ]
      }
    },
    "/api/v1/application-intents": {
      "post": {
        "operationId": "applicationIntent",
        "summary": "Symulowane rozpoczęcie wniosku",
        "description": "Simulated start only; requires a path from the local index. No application, identity or credit assessment.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationRequest"
              },
              "example": {
                "productPath": "/klienci-indywidualni/karty-kredytowe/"
              }
            }
          }
        },
        "tags": [
          "Formularze"
        ]
      }
    },
    "/api/v1/cards/installment-simulations": {
      "post": {
        "operationId": "cardInstallmentSimulation",
        "summary": "Ilustracyjna symulacja rat",
        "description": "Illustrative mock plans. Fixed nominal 10% annually, terms 12/24/36, no fees. Not a bank quote. Replace with pricing engine.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulationRequest"
              },
              "example": {
                "card": "cardGold",
                "transactionType": "cashless",
                "amount": "1000.00"
              }
            }
          }
        },
        "tags": [
          "Karty"
        ]
      }
    },
    "/api/v1/mock/requests": {
      "get": {
        "operationId": "mockRequests",
        "summary": "Ostatnie wywołania mocka",
        "description": "Mock-only diagnostics, maximum 200 events. Never stores request bodies or query values.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Diagnostyka"
        ]
      }
    },
    "/api/v1/funds": {
      "get": {
        "operationId": "fundsList",
        "summary": "Lista subfunduszy",
        "description": "Subfundusze zapisane w archiwum. Grupy: 1 Amundi, 2 CA FIO, 3 IKE/IKZE.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          },
          {
            "name": "group",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3"
              ]
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "tags": [
          "Fundusze"
        ]
      }
    },
    "/api/v1/funds/quotes": {
      "post": {
        "operationId": "fundsQuotes",
        "summary": "Archiwalna tabela notowań",
        "description": "Ostatnia tabela i porównania z archiwum. Kolejność observations: ostatnia wycena, dzień, tydzień, 1M, 3M, 6M, 12M, 60M, MAX. Brak zmiany: null. change jest procentem zapisanym jako tekst.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundQuotesEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FundGroupRequest"
              },
              "example": {
                "group": "1"
              }
            }
          }
        },
        "tags": [
          "Fundusze"
        ]
      }
    },
    "/api/v1/funds/history": {
      "post": {
        "operationId": "fundsHistory",
        "summary": "Archiwalna historia wycen",
        "description": "Zapisana historia wycen. from/to obejmują dni graniczne. Dane od 2000-01-01 do dnia zapisu 2026-10-24; rzeczywista dostępność zależy od subfunduszu. Zakres poza archiwum: 422 OUTSIDE_SNAPSHOT. Bez notowań w zakresie: pusta lista.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundHistoryEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FundHistoryRequest"
              },
              "example": {
                "group": "1",
                "fundId": "3",
                "from": "2026-10-01",
                "to": "2026-10-24"
              }
            }
          }
        },
        "tags": [
          "Fundusze"
        ]
      }
    },
    "/api/v1/funds/subscriptions": {
      "post": {
        "operationId": "fundsSubscription",
        "summary": "Symulowany zapis lub wypisanie z powiadomień",
        "description": "Symulacja zapisu lub wypisania z powiadomień. fundId: identyfikator z listy lub all. Zwraca potwierdzenie bez zapisu adresu i bez wysyłki poczty.",
        "parameters": [
          {
            "name": "X-Request-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          },
          {
            "name": "X-Mock-Scenario",
            "in": "header",
            "required": false,
            "description": "Mock test hook; unavailable returns HTTP 503. Optional in a real implementation.",
            "schema": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Correlation ID also returned in meta.requestId."
              },
              "X-Backend-Mode": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "live"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReceiptEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FundSubscriptionRequest"
              },
              "example": {
                "group": "1",
                "fundId": "3",
                "frequency": "weekly",
                "action": "subscribe",
                "email": "test@example.test",
                "consent": true
              }
            }
          }
        },
        "tags": [
          "Fundusze"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Meta": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "const": "1.0"
          },
          "mode": {
            "type": "string",
            "enum": [
              "mock",
              "live"
            ]
          },
          "requestId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "snapshotDate": {
            "type": "string",
            "format": "date"
          },
          "coverage": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              },
              "currencies": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "CHF",
                    "EUR",
                    "GBP",
                    "USD",
                    "AUD",
                    "CAD",
                    "CZK",
                    "DKK",
                    "HUF",
                    "JPY",
                    "NOK",
                    "RUB",
                    "SEK",
                    "TRY",
                    "RON",
                    "CNY",
                    "NZD"
                  ]
                }
              }
            },
            "required": [
              "from",
              "to",
              "currencies"
            ],
            "additionalProperties": false
          },
          "fundCoverage": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              }
            },
            "required": [
              "from",
              "to"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "apiVersion",
          "mode",
          "requestId"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object"
              }
            },
            "required": [
              "code",
              "message",
              "details"
            ],
            "additionalProperties": false
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "error",
          "meta"
        ],
        "additionalProperties": false
      },
      "Health": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          },
          "implementation": {
            "type": "string"
          },
          "snapshotDate": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "status",
          "implementation",
          "snapshotDate"
        ],
        "additionalProperties": false
      },
      "Support": {
        "type": "object",
        "properties": {
          "chatPaths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "videoPaths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "chatPaths",
          "videoPaths",
          "reason"
        ],
        "additionalProperties": false
      },
      "HistoryRequest": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "CHF",
              "EUR",
              "GBP",
              "USD",
              "AUD",
              "CAD",
              "CZK",
              "DKK",
              "HUF",
              "JPY",
              "NOK",
              "RUB",
              "SEK",
              "TRY",
              "RON",
              "CNY",
              "NZD"
            ]
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "client": {
            "type": "string",
            "enum": [
              "mortgage",
              "retail",
              "corporate"
            ]
          }
        },
        "required": [
          "currency",
          "from",
          "to",
          "client"
        ],
        "additionalProperties": false
      },
      "LatestRequest": {
        "type": "object",
        "properties": {
          "asOf": {
            "type": "string",
            "format": "date"
          },
          "client": {
            "type": "string",
            "enum": [
              "mortgage",
              "retail",
              "corporate"
            ]
          }
        },
        "required": [
          "asOf",
          "client"
        ],
        "additionalProperties": false
      },
      "Rate": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "CHF",
              "EUR",
              "GBP",
              "USD",
              "AUD",
              "CAD",
              "CZK",
              "DKK",
              "HUF",
              "JPY",
              "NOK",
              "RUB",
              "SEK",
              "TRY",
              "RON",
              "CNY",
              "NZD"
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}:\\d{2}$"
          },
          "buy": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "sell": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "mid": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "spread": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "unit": {
            "type": "integer",
            "enum": [
              1,
              100
            ],
            "description": "Liczba jednostek waluty, której dotyczy kurs: 100 dla HUF/JPY, 1 dla pozostałych."
          }
        },
        "required": [
          "currency",
          "date",
          "time",
          "buy",
          "sell",
          "mid",
          "spread"
        ],
        "additionalProperties": false
      },
      "LatestRate": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "CHF",
              "EUR",
              "GBP",
              "USD",
              "AUD",
              "CAD",
              "CZK",
              "DKK",
              "HUF",
              "JPY",
              "NOK",
              "RUB",
              "SEK",
              "TRY",
              "RON",
              "CNY",
              "NZD"
            ]
          },
          "name": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "time": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}:\\d{2}$"
          },
          "buy": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "sell": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "mid": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "spread": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "change": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "unit": {
            "type": "integer",
            "enum": [
              1,
              100
            ],
            "description": "Liczba jednostek waluty, której dotyczy kurs: 100 dla HUF/JPY, 1 dla pozostałych."
          }
        },
        "required": [
          "currency",
          "name",
          "date",
          "time",
          "buy",
          "sell",
          "mid",
          "spread",
          "change"
        ],
        "additionalProperties": false
      },
      "History": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Rate"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "Latest": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LatestRate"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "SearchItem": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "path": {
            "type": "string",
            "pattern": "^/"
          },
          "excerpt": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "path",
          "excerpt"
        ],
        "additionalProperties": false
      },
      "Search": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchItem"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "required": [
          "items",
          "total",
          "limit"
        ],
        "additionalProperties": false
      },
      "ContactRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80
          },
          "phone": {
            "type": "string",
            "pattern": "^[+0-9 ()-]{7,30}$"
          },
          "topic": {
            "type": "string",
            "enum": [
              "cards",
              "loans",
              "mortgages",
              "accounts",
              "investments",
              "insurance",
              "prime",
              "family",
              "promotions"
            ]
          },
          "consent": {
            "const": true
          }
        },
        "required": [
          "name",
          "phone",
          "topic",
          "consent"
        ],
        "additionalProperties": false
      },
      "NewsletterRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254,
            "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
          },
          "consent": {
            "const": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "preferences": {
            "type": "object",
            "properties": {
              "card": {
                "type": "string",
                "maxLength": 100
              },
              "gender": {
                "type": "string",
                "maxLength": 100
              },
              "region": {
                "type": "string",
                "maxLength": 100
              },
              "city": {
                "type": "string",
                "maxLength": 100
              },
              "industry": {
                "type": "string",
                "maxLength": 100
              },
              "age": {
                "type": "string",
                "maxLength": 100
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "email",
          "consent"
        ],
        "additionalProperties": false
      },
      "ApplicationRequest": {
        "type": "object",
        "properties": {
          "productPath": {
            "type": "string",
            "pattern": "^/",
            "maxLength": 500
          }
        },
        "required": [
          "productPath"
        ],
        "additionalProperties": false
      },
      "Receipt": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "simulated",
              "accepted"
            ]
          },
          "persisted": {
            "type": "boolean"
          },
          "nextStep": {
            "type": "string"
          }
        },
        "required": [
          "reference",
          "status",
          "persisted"
        ],
        "additionalProperties": false
      },
      "SimulationRequest": {
        "type": "object",
        "properties": {
          "card": {
            "type": "string",
            "enum": [
              "maximaPodstawowy",
              "maximaPremium",
              "cardGold",
              "cardSilver",
              "visaStandard",
              "visaDom"
            ]
          },
          "transactionType": {
            "type": "string",
            "enum": [
              "cashless",
              "cash"
            ]
          },
          "amount": {
            "type": "string",
            "pattern": "^\\d{1,5}\\.\\d{2}$",
            "description": "Decimal string, PLN, 300.00–50000.00 in this mock."
          }
        },
        "required": [
          "card",
          "transactionType",
          "amount"
        ],
        "additionalProperties": false
      },
      "SimulationPlan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "months": {
            "type": "integer",
            "minimum": 1
          },
          "monthlyPayment": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$"
          },
          "totalPayment": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$"
          }
        },
        "required": [
          "id",
          "months",
          "monthlyPayment",
          "totalPayment"
        ],
        "additionalProperties": false
      },
      "Simulation": {
        "type": "object",
        "properties": {
          "simulated": {
            "type": "boolean"
          },
          "pricingSource": {
            "type": "string",
            "enum": [
              "illustrative_mock",
              "pricing_engine"
            ]
          },
          "currency": {
            "type": "string",
            "enum": [
              "PLN"
            ]
          },
          "nominalAnnualRate": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{4}$"
          },
          "plans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimulationPlan"
            }
          }
        },
        "required": [
          "simulated",
          "pricingSource",
          "currency",
          "nominalAnnualRate",
          "plans"
        ],
        "additionalProperties": false
      },
      "AuditEvent": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "durationMs": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "requestId",
          "method",
          "path",
          "status",
          "durationMs"
        ],
        "additionalProperties": false
      },
      "Audit": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditEvent"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "Fund": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      },
      "Funds": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "enum": [
              "1",
              "2",
              "3"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Fund"
            }
          }
        },
        "required": [
          "group",
          "items"
        ],
        "additionalProperties": false
      },
      "FundGroupRequest": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "enum": [
              "1",
              "2",
              "3"
            ]
          }
        },
        "required": [
          "group"
        ],
        "additionalProperties": false
      },
      "FundHistoryRequest": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "enum": [
              "1",
              "2",
              "3"
            ]
          },
          "fundId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          }
        },
        "required": [
          "group",
          "fundId",
          "from",
          "to"
        ],
        "additionalProperties": false
      },
      "FundPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "value": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$"
          }
        },
        "required": [
          "date",
          "value"
        ],
        "additionalProperties": false
      },
      "FundObservation": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "value": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$"
          },
          "change": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?\\d+\\.\\d{2}$"
          }
        },
        "required": [
          "date",
          "value"
        ],
        "additionalProperties": false
      },
      "FundQuote": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "observations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FundObservation"
            }
          },
          "maxSellingPrice": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$"
          },
          "minPurchasePrice": {
            "type": "string",
            "pattern": "^\\d+\\.\\d{2}$"
          }
        },
        "required": [
          "name",
          "observations"
        ],
        "additionalProperties": false
      },
      "FundQuotes": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "enum": [
              "1",
              "2",
              "3"
            ]
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FundQuote"
            }
          }
        },
        "required": [
          "group",
          "items"
        ],
        "additionalProperties": false
      },
      "FundHistory": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "enum": [
              "1",
              "2",
              "3"
            ]
          },
          "fundId": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FundPoint"
            }
          }
        },
        "required": [
          "group",
          "fundId",
          "items"
        ],
        "additionalProperties": false
      },
      "FundSubscriptionRequest": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "enum": [
              "1",
              "2"
            ]
          },
          "fundId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "frequency": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ]
          },
          "action": {
            "type": "string",
            "enum": [
              "subscribe",
              "unsubscribe"
            ]
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "consent": {
            "const": true
          }
        },
        "required": [
          "group",
          "fundId",
          "frequency",
          "action",
          "email",
          "consent"
        ],
        "additionalProperties": false
      },
      "HealthEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Health"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "SupportEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Support"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "SearchEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Search"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "HistoryEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/History"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "LatestEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Latest"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "ReceiptEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Receipt"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "SimulationEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Simulation"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "AuditEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Audit"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "FundsEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Funds"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "FundQuotesEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FundQuotes"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "FundHistoryEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FundHistory"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "Error": {
        "description": "Structured error: INVALID_JSON, VALIDATION_ERROR, OUTSIDE_SNAPSHOT, NOT_FOUND, METHOD_NOT_ALLOWED, PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE, SERVICE_UNAVAILABLE or INTERNAL_ERROR.",
        "headers": {
          "X-Request-Id": {
            "schema": {
              "type": "string"
            },
            "description": "Correlation ID also returned in meta.requestId."
          },
          "X-Backend-Mode": {
            "schema": {
              "type": "string",
              "enum": [
                "mock",
                "live"
              ]
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Diagnostyka"
    },
    {
      "name": "Widgety"
    },
    {
      "name": "Wyszukiwanie"
    },
    {
      "name": "Kursy walut"
    },
    {
      "name": "Formularze"
    },
    {
      "name": "Karty"
    },
    {
      "name": "Fundusze"
    }
  ]
}