{
  "openapi": "3.1.0",
  "info": {
    "title": "TvijoWallet Partner API",
    "version": "1.0",
    "description": "Technical pilot API for sandbox connectivity. It does not accept orders or move funds."
  },
  "paths": {
    "/api/v1/routes": {
      "get": {
        "summary": "Public rollout status",
        "responses": {
          "200": {
            "description": "Route registry and capability flags"
          }
        }
      }
    },
    "/api/v1/partner": {
      "get": {
        "summary": "Read integration case",
        "security": [
          {
            "partnerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or revoked partner key"
          },
          "409": {
            "description": "Check rejected or pilot no longer active"
          }
        }
      }
    },
    "/api/v1/partner/events": {
      "get": {
        "summary": "Read case events",
        "security": [
          {
            "partnerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or revoked partner key"
          },
          "409": {
            "description": "Check rejected or pilot no longer active"
          }
        }
      }
    },
    "/api/v1/partner/check": {
      "post": {
        "summary": "Record a connectivity check",
        "security": [
          {
            "partnerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Connectivity event recorded"
          },
          "401": {
            "description": "Missing or revoked partner key"
          },
          "409": {
            "description": "Check rejected or pilot no longer active"
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "protocol"
                ],
                "properties": {
                  "protocol": {
                    "const": "tvw-partner-v1"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "summary": "Check sandbox health",
        "responses": {
          "200": {
            "description": "Healthy"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "partnerKey": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "servers": [
    {
      "url": "/",
      "description": "Same origin partner sandbox"
    }
  ]
}
