{"openapi":"3.1.0","info":{"title":"WorkspaceAlberta Procurement API","description":"Custom procurement MCP server and REST API for CanadaBuys, Alberta Purchasing Connection, business-profile matching, daily bid briefs, and optional Cohere Command A+ analysis.","version":"0.4.0"},"paths":{"/health":{"get":{"tags":["system"],"summary":"Health","description":"Report service health without calling upstream procurement sources.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/me":{"get":{"tags":["system"],"summary":"Me","description":"Validate the caller's Bearer key and report subscription status.","operationId":"me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Me Me Get"}}}}}}},"/stripe/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Stripe webhook: provisions subscribers and revokes cancelled ones.\n\nVerifies the ``Stripe-Signature`` header against\n``STRIPE_WEBHOOK_SECRET`` before touching anything. Handles\n``checkout.session.completed`` (issue key, upsert Supabase row, mirror\nkey into Stripe customer metadata) and ``customer.subscription.deleted``\n(revoke). All other events are acknowledged and ignored.","operationId":"stripe_webhook_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tools":{"get":{"tags":["system"],"summary":"Tools","description":"List MCP-compatible tools and JSON schemas.","operationId":"tools_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Tools Tools Get"}}}}}}},"/tools/{tool_name}":{"post":{"tags":["tools"],"summary":"Generic Tool","description":"Call any procurement tool by MCP tool name.","operationId":"generic_tool_tools__tool_name__post","parameters":[{"name":"tool_name","in":"path","required":true,"schema":{"type":"string","title":"Tool Name"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Arguments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generic Tool Tools  Tool Name  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search":{"post":{"tags":["procurement"],"summary":"Search","description":"Search CanadaBuys and Alberta Purchasing Connection together.","operationId":"search_search_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Search Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/details/{reference}":{"get":{"tags":["procurement"],"summary":"Details","description":"Get details for a CanadaBuys or Alberta APC opportunity.","operationId":"details_details__reference__get","parameters":[{"name":"reference","in":"path","required":true,"schema":{"type":"string","title":"Reference"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Details Details  Reference  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deadlines":{"post":{"tags":["procurement"],"summary":"Deadlines","description":"List federal and Alberta opportunities closing soon.","operationId":"deadlines_deadlines_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Deadlines Deadlines Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/matches":{"post":{"tags":["procurement"],"summary":"Matches","description":"Rank opportunities against the saved business profile.","operationId":"matches_matches_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Matches Matches Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brief":{"post":{"tags":["procurement"],"summary":"Brief","description":"Generate the daily bid brief.","operationId":"brief_brief_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Brief Brief Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/bid-room/process":{"post":{"tags":["bid-room"],"summary":"Bid Room Process","description":"Process a bid room in E2B and analyze it with Cohere inside the sandbox.\n\nPro-gated: requires a valid subscriber Bearer key when the gate is on.","operationId":"bid_room_process_bid_room_process_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Bid Room Process Bid Room Process Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile":{"get":{"tags":["profile"],"summary":"Get Profile","description":"Return the saved business profile.","operationId":"get_profile_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Profile Profile Get"}}}}}},"post":{"tags":["profile"],"summary":"Set Profile","description":"Set the business profile used for opportunity matching.","operationId":"set_profile_profile_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Profile Profile Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cohere/analyze":{"post":{"tags":["analysis"],"summary":"Cohere Analyze","description":"Analyze a CanadaBuys tender with Cohere Command A+ when configured.","operationId":"cohere_analyze_cohere_analyze_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Arguments"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Cohere Analyze Cohere Analyze Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}