{
  "openapi": "3.1.0",
  "info": {
    "title": "TenderPing",
    "version": "0.1.0",
    "description": "UK public procurement search and education supplier opportunity assessment for AI agents. Latest page of up to 100 notices per selected source within 7 days, not comprehensive. Assessments are rules-based triage, not bid recommendations."
  },
  "paths": {
    "/api/search": {
      "get": {
        "operationId": "search",
        "description": "Recent bounded feed search",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "fts",
                "cf"
              ],
              "default": "fts"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "open",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "true"
            }
          },
          {
            "name": "max_value",
            "in": "query",
            "description": "GBP only; unknown values excluded",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          }
        ],
        "x-x402": {
          "version": 2,
          "priceUSD": "0.01",
          "currency": "USDC",
          "network": "eip155:8453",
          "payTo": "0x5Ef397A4B8cA8158f9CD6dE8BF35Ba49519C8Ec5"
        },
        "responses": {
          "200": {
            "description": "JSON procurement data",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64-encoded settlement receipt",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters"
          },
          "402": {
            "description": "x402 payment required; PAYMENT-REQUIRED header",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 payment requirements. Validate price, network, asset and recipient before signing.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "502": {
            "description": "Source unavailable; no settlement"
          },
          "503": {
            "description": "Payment disabled or facilitator unavailable"
          }
        },
        "summary": "Search recent UK public procurement notices"
      }
    },
    "/api/tender": {
      "get": {
        "operationId": "tender",
        "description": "Compiled procurement record; Contracts Finder falls back to a labelled published notice when its record is unavailable. No settlement on release retrieval failure.",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "fts",
                "cf"
              ],
              "default": "fts"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "Notice id from search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-x402": {
          "version": 2,
          "priceUSD": "0.01",
          "currency": "USDC",
          "network": "eip155:8453",
          "payTo": "0x5Ef397A4B8cA8158f9CD6dE8BF35Ba49519C8Ec5"
        },
        "responses": {
          "200": {
            "description": "JSON procurement data",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64-encoded settlement receipt",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters"
          },
          "402": {
            "description": "x402 payment required; PAYMENT-REQUIRED header",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 payment requirements. Validate price, network, asset and recipient before signing.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "502": {
            "description": "Source unavailable; no settlement"
          },
          "503": {
            "description": "Payment disabled or facilitator unavailable"
          }
        },
        "summary": "Retrieve a procurement record or labelled source notice"
      }
    },
    "/api/analyse": {
      "get": {
        "operationId": "analyse",
        "description": "Compiled procurement record; Contracts Finder falls back to a labelled published notice when its record is unavailable. No settlement on release retrieval failure.",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "fts",
                "cf"
              ],
              "default": "fts"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "Notice id from search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "x-x402": {
          "version": 2,
          "priceUSD": "0.01",
          "currency": "USDC",
          "network": "eip155:8453",
          "payTo": "0x5Ef397A4B8cA8158f9CD6dE8BF35Ba49519C8Ec5"
        },
        "responses": {
          "200": {
            "description": "JSON procurement data",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64-encoded settlement receipt",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters"
          },
          "402": {
            "description": "x402 payment required; PAYMENT-REQUIRED header",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 payment requirements. Validate price, network, asset and recipient before signing.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "502": {
            "description": "Source unavailable; no settlement"
          },
          "503": {
            "description": "Payment disabled or facilitator unavailable"
          }
        },
        "summary": "Assess four explained education SME opportunity criteria"
      }
    },
    "/health": {
      "get": {
        "responses": {
          "200": {
            "description": "Service metadata"
          }
        }
      }
    },
    "/discover": {
      "get": {
        "responses": {
          "200": {
            "description": "Service metadata"
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://tenderping.bristolowen.chatgpt.site"
    }
  ]
}
