{
  "openapi": "3.0.3",
  "info": {
    "title": "ProcureData - Government Procurement API for Canadian Businesses",
    "description": "Every Canadian government tender, contract, and award in one normalized API. Federal contracts, tenders, and awards (CanadaBuys, TBS proactive disclosure, PSPC/SOSA standing offers), Quebec public sector (SEAO), and provincial and municipal sources: Nova Scotia, British Columbia, Alberta, Saskatchewan, Yukon, Manitoba, Northwest Territories, Montreal, Toronto, and Gatineau. Filter by department, vendor, category, value, status, and government level. See /coverage and /get_stats for live source totals.",
    "version": "0.1.0"
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "/health",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/sources": {
      "get": {
        "summary": "List all data sources",
        "operationId": "/sources",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "count": 6,
                  "sources": [
                    {
                      "source_id": "canada_contracts",
                      "entity_type": "contract",
                      "records": 2100000,
                      "last_updated": "2026-04-01T04:08:14+00:00",
                      "earliest_date": "2009-01-05",
                      "latest_date": "2026-03-28"
                    },
                    {
                      "source_id": "canada_tenders",
                      "entity_type": "tender",
                      "records": 650000,
                      "last_updated": "2026-03-30T02:01:27+00:00",
                      "earliest_date": "2009-01-05",
                      "latest_date": "2026-03-27"
                    },
                    {
                      "source_id": "seao",
                      "entity_type": "tender",
                      "records": 140000,
                      "last_updated": "2026-04-01T10:00:00+00:00",
                      "earliest_date": "2021-03-01",
                      "latest_date": "2026-03-29"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender/estimate": {
      "post": {
        "summary": "Pro: estimated contract value for 1..N tenders (by GSIN or record id)",
        "operationId": "tender_estimate_tender_estimate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenderEstimateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender/comps": {
      "post": {
        "summary": "Pro: comparable awarded contracts + bid-around guide for 1..N tenders",
        "operationId": "tender_comparables_tender_comps_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenderCompsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender/alerts/subscribe": {
      "post": {
        "summary": "Subscribe to email alerts for new tenders",
        "operationId": "/tender/alerts/subscribe",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenderAlertRequest",
                "nullable": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "status": "subscribed"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender/alerts/unsubscribe": {
      "get": {
        "summary": "Unsubscribe from tender alerts",
        "operationId": "/tender/alerts/unsubscribe",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "status": "unsubscribed"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "One-click unsubscribe from tender alerts",
        "operationId": "unsubscribe_tender_alert_post_tender_alerts_unsubscribe_post",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "status": "unsubscribed"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vendors": {
      "get": {
        "summary": "Search vendors by name",
        "description": "Search vendors by a name keyword (the `q` parameter is required). Returns matching vendors ranked by contract count. Use it to find vendors in a trade or industry (e.g. `q=construction`, `q=plumbing`, `q=software`). This endpoint does not list all vendors; for one vendor's full profile use `GET /vendor/{name}`.",
        "operationId": "/vendors",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Vendor name keyword (required), partial match (e.g. \"SNC-Lavalin\", \"construction\", \"IBM Canada\")"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "total": 45000,
                  "count": 3,
                  "offset": 0,
                  "results": [
                    {
                      "vendor": "CGI Group Inc.",
                      "contracts": 1842,
                      "total_value": 892450000.0
                    },
                    {
                      "vendor": "IBM Canada Ltd.",
                      "contracts": 1204,
                      "total_value": 634200000.0
                    },
                    {
                      "vendor": "Deloitte Inc.",
                      "contracts": 987,
                      "total_value": 412800000.0
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/departments": {
      "get": {
        "summary": "Search and list departments",
        "operationId": "/departments",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Department name search (partial match)",
            "example": "defence"
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by entity type: contract, tender, award, disclosure"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "total": 180,
                  "count": 3,
                  "offset": 0,
                  "results": [
                    {
                      "department": "Department of National Defence",
                      "records": 145000,
                      "total_value": 12400000000.0
                    },
                    {
                      "department": "Public Services and Procurement Canada",
                      "records": 98000,
                      "total_value": 8200000000.0
                    },
                    {
                      "department": "Shared Services Canada",
                      "records": 42000,
                      "total_value": 3100000000.0
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Browse departments with record counts and total contract values. At least one of `q` or `entity_type` is required."
      }
    },
    "/tender/feed": {
      "get": {
        "summary": "Pro: matched open-tender lead feed (keyword-matched, new-since window)",
        "description": "Requires a paid plan. On the free (BASIC) tier this returns 403 with an upgrade link; it is listed here so you can see the shape of what a paid plan unlocks. Returns open tenders matching your keywords, deduplicated, limited to those new within the `days_back` window, so each pull is only the leads you have not seen.",
        "operationId": "tender_feed_tender_feed_get",
        "parameters": [
          {
            "name": "keywords",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Comma-separated keywords to match title/description (optional)",
            "example": "software,cloud,consulting"
          },
          {
            "name": "min_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum contract value (optional)"
          },
          {
            "name": "days_back",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 90,
              "minimum": 1,
              "description": "New-since window in days (the lead delta)",
              "default": 7,
              "title": "Days Back"
            },
            "description": "New-since window in days (the lead delta)",
            "example": 7
          },
          {
            "name": "languages",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Comma-separated notice languages: en, fr",
              "default": "en,fr",
              "title": "Languages"
            },
            "description": "Comma-separated notice languages: en, fr"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 200,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender/{record_id}/documents/{doc_index}": {
      "get": {
        "summary": "Redirect to a CanadaBuys tender document by index",
        "operationId": "/tender/{record_id}/documents/{doc_index}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            }
          },
          {
            "name": "doc_index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Doc Index"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": null
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/department/{name}": {
      "get": {
        "summary": "Department procurement profile",
        "operationId": "/department/{name}",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            },
            "example": "National Defence"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "department": "Department of National Defence",
                  "total_contracts": 12500,
                  "total_value": 8500000000.0,
                  "top_vendors": [
                    {
                      "vendor_name": "General Dynamics",
                      "count": 120
                    },
                    {
                      "vendor_name": "CAE Inc",
                      "count": 95
                    }
                  ],
                  "by_category": [
                    {
                      "category": "SRV",
                      "count": 6800
                    },
                    {
                      "category": "GD",
                      "count": 3200
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/vendor/{name}": {
      "get": {
        "summary": "Vendor procurement profile",
        "description": "Full procurement profile for a specific vendor: total contracts, total value, top departments, and category breakdown. The `name` parameter is a specific vendor name (e.g. `SNC-Lavalin`, `IBM Canada`). If no vendor matches exactly, returns the closest vendors by name (`exact_match: false` with a `matches` list). To search vendors by keyword or trade, use `GET /vendors?q=keyword`.",
        "operationId": "/vendor/{name}",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            },
            "example": "Bell Canada"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Procurement category filter"
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Department filter (partial match)"
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (award_date for contracts/awards, publication_date for tenders). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort by: value, date"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "vendor_name": "SNC-Lavalin",
                  "total_contracts": 342,
                  "total_value": 15200000.0,
                  "top_departments": [
                    {
                      "department_en": "Department of National Defence",
                      "count": 85
                    },
                    {
                      "department_en": "Department of Public Works",
                      "count": 64
                    }
                  ],
                  "contracts": []
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract": {
      "get": {
        "summary": "Search contracts",
        "operationId": "/contract",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\").",
            "example": "construction OR engineering"
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by department name (partial/substring match; min 3 characters). Matches the normalized department name."
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor name (partial/substring match; min 3 characters)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Procurement category: CNST, GD, SRV, SRVTGD. For recalls: product category (e.g. 'Baby products', 'Toys and games'). For healthcare: facility category (acute, long_term, home, behavioral, outpatient, specialty). For storage tanks: record type (tank or release)."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "procurement_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by procurement method (prefix match on procurement_method_en/fr, e.g. 'Competitive')"
          },
          {
            "name": "vendor_province",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor province (e.g. 'Ontario', 'Quebec')"
          },
          {
            "name": "reference_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Exact tender/notice reference number (e.g. the CanadaBuys 'cb-...' id). Returns the notice and all its amendments."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value, applied to the entity's value field (construction_value for permits, contract_value for contracts, agreement_value for grants, monetary_amount for contributions, total_co2e for emissions, assessed_value for assessments). Ignored for entity types with no monetary field."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value; same per-entity field mapping as value_min. Ignored for entity types with no monetary field."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (award_date for contracts/awards, publication_date for tenders). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractRecordPage"
                },
                "example": {
                  "entity_type": "contract",
                  "count": 100,
                  "offset": 0,
                  "next_cursor": "eyJkIjogIjIwMjUtMDItMDciLCAiaSI6ICJXU1Q4MTM3NDcyNjEifQ==",
                  "results": [
                    {
                      "record_id": "WS4813747261-CW2376464-ACM_197731727:002",
                      "vendor_name": "ACME Corp",
                      "department_en": "Public Services and Procurement Canada",
                      "title_en": "5P322-240135 Remote Construction Site Cameras",
                      "contract_value": 49240.88,
                      "award_date": "2025-02-07",
                      "procurement_category": "GD",
                      "solicitation_number": "WS4813747261"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender": {
      "get": {
        "summary": "Search tenders",
        "operationId": "/tender",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\").",
            "example": "software OR cloud OR consulting"
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by department name (partial/substring match; min 3 characters). Matches the normalized department name."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Procurement category: CNST, GD, SRV, SRVTGD. For recalls: product category (e.g. 'Baby products', 'Toys and games'). For healthcare: facility category (acute, long_term, home, behavioral, outpatient, specialty). For storage tanks: record type (tank or release)."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown).",
            "example": "open"
          },
          {
            "name": "procurement_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by procurement method (prefix match on procurement_method_en/fr, e.g. 'Competitive')"
          },
          {
            "name": "notice_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Tender notice type \u2014 exact, case-insensitive match on the full value (e.g. 'Request for Proposal'). Abbreviations like 'ACAN' will not match; see /tender/stats for values."
          },
          {
            "name": "reference_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Exact tender/notice reference number (e.g. the CanadaBuys 'cb-...' id). Returns the notice and all its amendments."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value, applied to the entity's value field (construction_value for permits, contract_value for contracts, agreement_value for grants, monetary_amount for contributions, total_co2e for emissions, assessed_value for assessments). Ignored for entity types with no monetary field."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value; same per-entity field mapping as value_min. Ignored for entity types with no monetary field."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (award_date for contracts/awards, publication_date for tenders). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenderRecordPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/award": {
      "get": {
        "summary": "Search awards",
        "operationId": "/award",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\").",
            "example": "software OR consulting"
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by department name (partial/substring match; min 3 characters). Matches the normalized department name."
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor name (partial/substring match; min 3 characters)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Procurement category: CNST, GD, SRV, SRVTGD. For recalls: product category (e.g. 'Baby products', 'Toys and games'). For healthcare: facility category (acute, long_term, home, behavioral, outpatient, specialty). For storage tanks: record type (tank or release)."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "procurement_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by procurement method (prefix match on procurement_method_en/fr, e.g. 'Competitive')"
          },
          {
            "name": "vendor_province",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor province (e.g. 'Ontario', 'Quebec')"
          },
          {
            "name": "reference_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Exact tender/notice reference number (e.g. the CanadaBuys 'cb-...' id). Returns the notice and all its amendments."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value, applied to the entity's value field (construction_value for permits, contract_value for contracts, agreement_value for grants, monetary_amount for contributions, total_co2e for emissions, assessed_value for assessments). Ignored for entity types with no monetary field."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value; same per-entity field mapping as value_min. Ignored for entity types with no monetary field."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (award_date for contracts/awards, publication_date for tenders). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwardRecordPage"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/disclosure": {
      "get": {
        "summary": "Search proactive disclosure contracts",
        "operationId": "/disclosure",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by department name (partial/substring match; min 3 characters). Matches the normalized department name."
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor name (partial/substring match; min 3 characters)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Procurement category: CNST, GD, SRV, SRVTGD. For recalls: product category (e.g. 'Baby products', 'Toys and games'). For healthcare: facility category (acute, long_term, home, behavioral, outpatient, specialty). For storage tanks: record type (tank or release)."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "procurement_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by procurement method (prefix match on procurement_method_en/fr, e.g. 'Competitive')"
          },
          {
            "name": "vendor_province",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor province (e.g. 'Ontario', 'Quebec')"
          },
          {
            "name": "reference_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Exact tender/notice reference number (e.g. the CanadaBuys 'cb-...' id). Returns the notice and all its amendments."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value, applied to the entity's value field (construction_value for permits, contract_value for contracts, agreement_value for grants, monetary_amount for contributions, total_co2e for emissions, assessed_value for assessments). Ignored for entity types with no monetary field."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value; same per-entity field mapping as value_min. Ignored for entity types with no monetary field."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (award_date for contracts/awards, publication_date for tenders). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "disclosure",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "C-2019-2020-Q4-00883",
                      "vendor_name": "BLENDED PERSPECTIVES INC.",
                      "department_en": "Shared Services Canada",
                      "description_en": "License/Maintenance fees for application software",
                      "contract_value": 40699.53,
                      "award_date": "2020-03-25",
                      "procurement_category": "SRV",
                      "commodity_code": "JX70",
                      "reporting_period": "2019-2020-Q4",
                      "solicitation_procedure": "TC"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/standing_offer": {
      "get": {
        "summary": "Search standing offers and supply arrangements",
        "operationId": "/standing_offer",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by department name (partial/substring match; min 3 characters). Matches the normalized department name."
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor name (partial/substring match; min 3 characters)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Procurement category: CNST, GD, SRV, SRVTGD. For recalls: product category (e.g. 'Baby products', 'Toys and games'). For healthcare: facility category (acute, long_term, home, behavioral, outpatient, specialty). For storage tanks: record type (tank or release)."
          },
          {
            "name": "reference_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Exact tender/notice reference number (e.g. the CanadaBuys 'cb-...' id). Returns the notice and all its amendments."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (award_date for contracts/awards, publication_date for tenders). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandingOfferRecordPage"
                },
                "example": {
                  "entity_type": "standing_offer",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "CW2306314-ACM_176664527|9736140 CANADA INC|Canada",
                      "vendor_name": "9736140 CANADA INC",
                      "department_en": "Public Services and Procurement Canada",
                      "sosa_description_en": "EN578-231556 Aircraft Charter Services",
                      "commodity_description_en": "78142001 - Rental of freight aircraft",
                      "agreement_type_en": "NMSO",
                      "agreement_number": "CW2306314-ACM_176664527",
                      "award_date": "2023-06-01",
                      "expiry_date": "2026-05-31",
                      "delivery_point_en": "Canada",
                      "government_level": "federal"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/pre_solicitation": {
      "get": {
        "summary": "Search pre-solicitation notices (ACAN, RFI, ITQ)",
        "operationId": "/pre_solicitation",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "department",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by department name (partial/substring match; min 3 characters). Matches the normalized department name."
          },
          {
            "name": "vendor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor name (partial/substring match; min 3 characters)"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Procurement category: CNST, GD, SRV, SRVTGD. For recalls: product category (e.g. 'Baby products', 'Toys and games'). For healthcare: facility category (acute, long_term, home, behavioral, outpatient, specialty). For storage tanks: record type (tank or release)."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "procurement_method",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by procurement method (prefix match on procurement_method_en/fr, e.g. 'Competitive')"
          },
          {
            "name": "notice_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Tender notice type \u2014 exact, case-insensitive match on the full value (e.g. 'Request for Proposal'). Abbreviations like 'ACAN' will not match; see /tender/stats for values."
          },
          {
            "name": "vendor_province",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by vendor province (e.g. 'Ontario', 'Quebec')"
          },
          {
            "name": "reference_number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Exact tender/notice reference number (e.g. the CanadaBuys 'cb-...' id). Returns the notice and all its amendments."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value, applied to the entity's value field (construction_value for permits, contract_value for contracts, agreement_value for grants, monetary_amount for contributions, total_co2e for emissions, assessed_value for assessments). Ignored for entity types with no monetary field."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value; same per-entity field mapping as value_min. Ignored for entity types with no monetary field."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (award_date for contracts/awards, publication_date for tenders). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "closing_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date >= YYYY-MM-DD."
          },
          {
            "name": "closing_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter tenders by closing_date <= YYYY-MM-DD."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract/stats": {
      "get": {
        "summary": "Contract statistics",
        "operationId": "/contract/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender/stats": {
      "get": {
        "summary": "Tender statistics",
        "operationId": "/tender/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/award/stats": {
      "get": {
        "summary": "Award statistics",
        "operationId": "/award/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/disclosure/stats": {
      "get": {
        "summary": "Disclosure statistics",
        "operationId": "/disclosure/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/standing_offer/stats": {
      "get": {
        "summary": "Standing offer statistics",
        "operationId": "/standing_offer/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/pre_solicitation/stats": {
      "get": {
        "summary": "Pre-solicitation statistics",
        "operationId": "/pre_solicitation/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract/coverage": {
      "get": {
        "summary": "Contract count per municipality",
        "operationId": "/contract/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender/coverage": {
      "get": {
        "summary": "Tender count per municipality",
        "operationId": "/tender/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/award/coverage": {
      "get": {
        "summary": "Award count per municipality",
        "operationId": "/award/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/disclosure/coverage": {
      "get": {
        "summary": "Disclosure count per municipality",
        "operationId": "/disclosure/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/standing_offer/coverage": {
      "get": {
        "summary": "Standing offer count per municipality",
        "operationId": "/standing_offer/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/pre_solicitation/coverage": {
      "get": {
        "summary": "Pre-solicitation count per municipality",
        "operationId": "/pre_solicitation/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/procurement/{solicitation_number}": {
      "get": {
        "summary": "Procurement lifecycle for a solicitation",
        "operationId": "/procurement/{solicitation_number}",
        "parameters": [
          {
            "name": "solicitation_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Solicitation Number"
            },
            "example": "WS4161889984"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "solicitation_number": "WS4813747261",
                  "tenders": [
                    {
                      "record_id": "T-001",
                      "title_en": "Request for Proposal",
                      "closing_date": "2024-12-01"
                    }
                  ],
                  "awards": [
                    {
                      "record_id": "A-001",
                      "vendor_name": "ACME Corp",
                      "contract_value": 49240.88
                    }
                  ],
                  "contracts": [
                    {
                      "record_id": "C-001",
                      "vendor_name": "ACME Corp",
                      "contract_value": 49240.88
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contract/{record_id}": {
      "get": {
        "summary": "Get contract by ID",
        "operationId": "/contract/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "WS4161889984-CW2331973-ACM_180361216:002"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "WS4813747261-CW2376464-ACM_197731727:002",
                  "vendor_name": "ACME Corp",
                  "department_en": "Public Services and Procurement Canada",
                  "title_en": "5P322-240135 Remote Construction Site Cameras",
                  "contract_value": 49240.88,
                  "award_date": "2025-02-07",
                  "procurement_category": "GD"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/tender/{record_id}": {
      "get": {
        "summary": "Get tender by ID",
        "operationId": "/tender/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "row:839"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/award/{record_id}": {
      "get": {
        "summary": "Get award by ID",
        "operationId": "/award/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "cb-511-76649731:000"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/disclosure/{record_id}": {
      "get": {
        "summary": "Get disclosure by ID",
        "operationId": "/disclosure/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "C-2025-2026-Q3-06521"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "C-2019-2020-Q4-00883",
                  "vendor_name": "BLENDED PERSPECTIVES INC.",
                  "department_en": "Shared Services Canada",
                  "description_en": "License/Maintenance fees for application software",
                  "contract_value": 40699.53,
                  "commodity_code": "JX70",
                  "reporting_period": "2019-2020-Q4"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/standing_offer/{record_id}": {
      "get": {
        "summary": "Get standing offer by ID",
        "operationId": "/standing_offer/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "CW2448632|PROMAXIS SYSTEMS INC|National Capital Region"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "CW2306314-ACM_176664527|9736140 CANADA INC|Canada",
                  "vendor_name": "9736140 CANADA INC",
                  "department_en": "Public Services and Procurement Canada",
                  "sosa_description_en": "EN578-231556 Aircraft Charter Services",
                  "commodity_description_en": "78142001 - Rental of freight aircraft",
                  "agreement_type_en": "NMSO",
                  "award_date": "2023-06-01",
                  "expiry_date": "2026-05-31",
                  "delivery_point_en": "Canada"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/pre_solicitation/{record_id}": {
      "get": {
        "summary": "Get pre-solicitation notice by ID",
        "operationId": "/pre_solicitation/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "cb-31-71432022:000"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "TenderAlertRequest": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "keywords": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "keyword": {
            "type": "string",
            "nullable": true
          },
          "department": {
            "type": "string",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "TenderAlertRequest"
      },
      "TenderCompsRequest": {
        "properties": {
          "record_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Record Ids"
          }
        },
        "type": "object",
        "required": [
          "record_ids"
        ],
        "title": "TenderCompsRequest"
      },
      "TenderEstimateRequest": {
        "properties": {
          "gsins": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "record_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          }
        },
        "type": "object",
        "title": "TenderEstimateRequest"
      },
      "ContractRecord": {
        "type": "object",
        "description": "One contract record. Measured over 3,400 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "award_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-08-06"
          },
          "buyer_id": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "OP-81656",
            "nullable": true
          },
          "contract_id": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "20161058",
            "nullable": true
          },
          "contract_value": {
            "type": "number",
            "description": "Populated in 94% of sampled records.",
            "example": 57747.32,
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "CAD",
            "nullable": true
          },
          "department_fr": {
            "type": "string",
            "description": "Populated in 94% of sampled records.",
            "example": "Ressources humaines",
            "nullable": true
          },
          "eligibility": {
            "type": "object",
            "description": "Populated in 49% of sampled records.",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "description": "Populated in 38% of sampled records.",
            "example": "2027-05-11",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-10T06:46:20.306597+00:00"
          },
          "government_level": {
            "type": "string",
            "description": "Populated in 82% of sampled records.",
            "example": "municipal",
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "Montreal"
          },
          "ocid": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "ocds-ec9k95-20165528",
            "nullable": true
          },
          "procurement_category": {
            "type": "string",
            "description": "Populated in 85% of sampled records.",
            "example": "GD",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Populated in 12% of sampled records.",
            "example": "QC",
            "nullable": true
          },
          "publication_date": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "2026-08-19",
            "nullable": true
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "fonctionnaires:1762049"
          },
          "status_fr": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "active",
            "nullable": true
          },
          "title_fr": {
            "type": "string",
            "description": "Populated in 94% of sampled records.",
            "example": "Bon de commande pour factures Indeed annonces commandit\u00e9es 2\u2026",
            "nullable": true
          },
          "vendor_id": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "FO-3375840728",
            "nullable": true
          },
          "vendor_name": {
            "type": "string",
            "description": "Always present.",
            "example": "INDEED CANADA CORP."
          }
        },
        "x-sparse-fields": {
          "activity": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "approver": {
            "type": "string",
            "fill_rate": 0.0
          },
          "buyer_name": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "category": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "dataset": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "decision_number": {
            "type": "string",
            "fill_rate": 0.0
          },
          "department_en": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "direction_fr": {
            "type": "string",
            "fill_rate": 0.0
          },
          "file_number": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "notice_type_en": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "notice_url": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "repartition": {
            "type": "string",
            "fill_rate": 0.0
          },
          "solicitation_number": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "source_url": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "start_date": {
            "type": "string",
            "fill_rate": 0.0
          },
          "supplier_address": {
            "type": "string",
            "fill_rate": 0.0
          },
          "title_en": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "wards": {
            "type": "string",
            "fill_rate": 0.0588
          }
        }
      },
      "ContractRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "contract"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-09-03."
      },
      "TenderRecord": {
        "type": "object",
        "description": "One tender record. Measured over 3,400 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "buyer_id": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "OP-70528",
            "nullable": true
          },
          "closing_date": {
            "type": "string",
            "description": "Populated in 38% of sampled records.",
            "example": "2026-09-08",
            "nullable": true
          },
          "department_fr": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "Ville de Montr\u00e9al-Ouest",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "description": "Populated in 47% of sampled records.",
            "nullable": true
          },
          "eligibility": {
            "type": "object",
            "description": "Populated in 41% of sampled records.",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-31T04:00:24.111604+00:00"
          },
          "government_level": {
            "type": "string",
            "description": "Populated in 84% of sampled records.",
            "example": "provincial",
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "montreal"
          },
          "notice_type_en": {
            "type": "string",
            "description": "Populated in 94% of sampled records.",
            "example": "Avis d\u2019appel d\u2019offres",
            "nullable": true
          },
          "notice_url": {
            "type": "string",
            "description": "Populated in 47% of sampled records.",
            "example": "https://seao.gouv.qc.ca/avis-resultat-recherche/consulter?It\u2026",
            "nullable": true
          },
          "ocid": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "ocds-ec9k95-20165233",
            "nullable": true
          },
          "procurement_category": {
            "type": "string",
            "description": "Populated in 89% of sampled records.",
            "example": "CNST",
            "nullable": true
          },
          "procurement_method": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "open",
            "nullable": true
          },
          "publication_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-08-21"
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "ocds-ec9k95-20165233"
          },
          "status": {
            "type": "string",
            "description": "Always present.",
            "example": "open"
          },
          "status_fr": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "active",
            "nullable": true
          },
          "tender_id": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "MO-08-26-02",
            "nullable": true
          },
          "title_fr": {
            "type": "string",
            "description": "Populated in 94% of sampled records.",
            "example": " R\u00e9fection de la chauss\u00e9e sur la rue Ainslie",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "contact_email": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "contact_name": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "contact_phone": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "contract_value": {
            "type": "string",
            "fill_rate": 0.0
          },
          "department_en": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "document_url": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "noip_type_en": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "notice_url_en": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "province": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "solicitation_number": {
            "type": "string",
            "fill_rate": 0.0506
          },
          "source_url": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "tender_close_date": {
            "type": "string",
            "fill_rate": 0.0585
          },
          "tender_number": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "title_en": {
            "type": "string",
            "fill_rate": 0.0588
          },
          "wards": {
            "type": "string",
            "fill_rate": 0.0588
          }
        }
      },
      "TenderRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "tender"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenderRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-09-03."
      },
      "AwardRecord": {
        "type": "object",
        "description": "One award record. Measured over 500 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "amendment_number": {
            "type": "string",
            "description": "Always present.",
            "example": "000"
          },
          "award_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2027-04-22"
          },
          "contract_number": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "W6369-26-X010/A",
            "nullable": true
          },
          "contract_value": {
            "type": "number",
            "description": "Populated in 98% of sampled records.",
            "example": 0.0,
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Populated in 91% of sampled records.",
            "example": "CAD",
            "nullable": true
          },
          "department_en": {
            "type": "string",
            "description": "Always present.",
            "example": "Department of National Defence (DND)"
          },
          "department_fr": {
            "type": "string",
            "description": "Always present.",
            "example": "Minist\u00e8re de la D\u00e9fense nationale (MDN)"
          },
          "description_en": {
            "type": "string",
            "description": "Populated in 90% of sampled records.",
            "example": "This is a re-issue of requirement W6369-26-X010, which was p\u2026",
            "nullable": true
          },
          "description_fr": {
            "type": "string",
            "description": "Populated in 90% of sampled records.",
            "example": "Il s\u2019agit d\u2019une r\u00e9\u00e9mission de la demande W6369-26-X010, qui\u2026",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "2027-04-22",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-31T02:00:45.698674+00:00"
          },
          "government_level": {
            "type": "string",
            "description": "Always present.",
            "example": "federal"
          },
          "procurement_category": {
            "type": "string",
            "description": "Always present.",
            "example": "GD"
          },
          "procurement_method_en": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "Competitive - Open bidding",
            "nullable": true
          },
          "procurement_method_fr": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "Concurrentielle - Invitation ouverte \u00e0 soumissionner",
            "nullable": true
          },
          "publication_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-04-22"
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "cb-511-76649731:000"
          },
          "reference_number": {
            "type": "string",
            "description": "Always present.",
            "example": "cb-511-76649731"
          },
          "regions_of_delivery_en": {
            "type": "string",
            "description": "Populated in 97% of sampled records.",
            "example": "*Canada\n*National Capital Region (NCR)",
            "nullable": true
          },
          "regions_of_delivery_fr": {
            "type": "string",
            "description": "Populated in 97% of sampled records.",
            "example": "*Canada\n*R\u00e9gion de la capitale nationale (RCN)",
            "nullable": true
          },
          "solicitation_number": {
            "type": "string",
            "description": "Always present.",
            "example": "W6369-26-X010/A"
          },
          "start_date": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "2026-04-22",
            "nullable": true
          },
          "status_en": {
            "type": "string",
            "description": "Always present.",
            "example": "Active"
          },
          "status_fr": {
            "type": "string",
            "description": "Always present.",
            "example": "Actif"
          },
          "title_en": {
            "type": "string",
            "description": "Always present.",
            "example": "Diesel Generator 800 KW"
          },
          "title_fr": {
            "type": "string",
            "description": "Always present.",
            "example": "G\u00e9n\u00e9ratrices diesel de 800 kW"
          },
          "total_contract_value": {
            "type": "number",
            "description": "Populated in 99% of sampled records.",
            "example": 2118605.02,
            "nullable": true
          },
          "trade_agreements_en": {
            "type": "string",
            "description": "Always present.",
            "example": "*Canada-Panama Free Trade Agreement\n*Canadian Free Trade Agr\u2026"
          },
          "vendor_city": {
            "type": "string",
            "description": "Always present.",
            "example": "Laval"
          },
          "vendor_country": {
            "type": "string",
            "description": "Always present.",
            "example": "Canada"
          },
          "vendor_postal_code": {
            "type": "string",
            "description": "Always present.",
            "example": "H7P 0L4"
          },
          "vendor_province": {
            "type": "string",
            "description": "Always present.",
            "example": "Quebec"
          }
        },
        "x-sparse-fields": {
          "amendment_date": {
            "type": "string",
            "fill_rate": 0.04
          },
          "eligibility": {
            "type": "object",
            "fill_rate": 0.002
          },
          "gsin": {
            "type": "string",
            "fill_rate": 0.008
          },
          "municipality": {
            "type": "string",
            "fill_rate": 0.0
          },
          "vendor_name": {
            "type": "string",
            "fill_rate": 0.0
          },
          "vendor_name_standardized": {
            "type": "string",
            "fill_rate": 0.0
          }
        }
      },
      "AwardRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "award"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AwardRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-09-03."
      },
      "StandingOfferRecord": {
        "type": "object",
        "description": "One standing_offer record. Measured over 2,920 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "agreement_number": {
            "type": "string",
            "description": "Always present.",
            "example": "CW2464828"
          },
          "agreement_type_en": {
            "type": "string",
            "description": "Always present.",
            "example": "NISO",
            "nullable": true
          },
          "agreement_type_fr": {
            "type": "string",
            "description": "Always present.",
            "example": "OCIN",
            "nullable": true
          },
          "award_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-08-20"
          },
          "commodity": {
            "type": "string",
            "description": "Always present.",
            "example": "55121607"
          },
          "commodity_description_en": {
            "type": "string",
            "description": "Always present.",
            "example": "55121607 - Decals"
          },
          "commodity_description_fr": {
            "type": "string",
            "description": "Always present.",
            "example": "55121607 - D\u00e9calcomanies"
          },
          "date_file_published": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-08-28 13:25:54"
          },
          "delivery_point_code": {
            "type": "string",
            "description": "Always present.",
            "example": "CA"
          },
          "delivery_point_en": {
            "type": "string",
            "description": "Always present.",
            "example": "Canada"
          },
          "delivery_point_fr": {
            "type": "string",
            "description": "Always present.",
            "example": "Canada"
          },
          "department_en": {
            "type": "string",
            "description": "Always present.",
            "example": "Department of National Defence"
          },
          "department_fr": {
            "type": "string",
            "description": "Always present.",
            "example": "Minist\u00e8re de la d\u00e9fense nationale"
          },
          "expiry_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2027-03-31"
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-31T05:30:56.959733+00:00"
          },
          "government_level": {
            "type": "string",
            "description": "Always present.",
            "example": "federal"
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "Canada"
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "CW2464828|TURBO IMAGES|Canada"
          },
          "sosa_description_en": {
            "type": "string",
            "description": "Always present.",
            "example": "W3827-27J406 - SO - Printing, Supply, Removal, and Installat\u2026"
          },
          "sosa_description_fr": {
            "type": "string",
            "description": "Always present.",
            "example": "W3827-27J406 - OC -Impression, fourniture, enl\u00e8vement et ins\u2026"
          },
          "supplier_legal_name": {
            "type": "string",
            "description": "Always present.",
            "example": "Turbo Images",
            "nullable": true
          },
          "supplier_operating_name": {
            "type": "string",
            "description": "Populated in 59% of sampled records.",
            "example": "Turbo Images",
            "nullable": true
          },
          "vendor_name": {
            "type": "string",
            "description": "Always present.",
            "example": "TURBO IMAGES",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "eligibility": {
            "type": "object",
            "fill_rate": 0.0308
          }
        }
      },
      "StandingOfferRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "standing_offer"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StandingOfferRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-09-03."
      },
      "Error": {
        "type": "object",
        "description": "Every 4xx and 5xx response has this shape.",
        "properties": {
          "detail": {
            "type": "string",
            "description": "A sentence naming what was wrong and, where possible, the fix.",
            "example": "limit must be at most 500 (got 1000). Use offset, or cursor for deep pagination, to retrieve more."
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://hv1nforwhi.execute-api.ca-central-1.amazonaws.com"
    }
  ]
}