{
  "openapi": "3.1.0",
  "info": {
    "title": "Alberta Purchasing Connection Tenders API",
    "version": "1.0",
    "description": "Alberta Purchasing Connection: Alberta public-sector tenders, awards and bidders, with UNSPSC codes\n\nCalled through the ApiClay gateway with an ApiClay token or API key (https://apiclay.com/dashboard/keys). Pricing, trial, fees and full parameter notes: https://apiclay.com/api/albertapurchasingconnectionten/llms.txt",
    "x-apiclay-vendor": "albertapurchasingconnectionten",
    "x-apiclay-pricing": "0.0012 credits/request, 1 trial requests"
  },
  "externalDocs": {
    "description": "Full documentation for AI agents (Markdown)",
    "url": "https://apiclay.com/api/albertapurchasingconnectionten/llms.txt"
  },
  "servers": [
    {
      "url": "https://api.apiclay.com/v1/api/albertapurchasingconnectionten"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "tokenHeader": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "ApiClay API key (apiclay_…) or session token"
      },
      "tokenHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "token",
        "description": "ApiClay API key (apiclay_…) or session token"
      }
    }
  },
  "paths": {
    "/search": {
      "post": {
        "operationId": "post_search",
        "summary": "Search opportunities",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "query": "",
                "limit": 5,
                "offset": 0,
                "filter": {
                  "solicitationNumber": "",
                  "categories": [],
                  "statuses": [
                    {
                      "value": "OPEN",
                      "selected": true
                    }
                  ],
                  "agreementTypes": [],
                  "solicitationTypes": [],
                  "opportunityTypes": [],
                  "deliveryRegions": [],
                  "deliveryRegion": "",
                  "organizations": [],
                  "unspsc": [],
                  "postDateRange": "$$custom",
                  "closeDateRange": "$$custom",
                  "onlyBookmarked": false,
                  "onlyInterestExpressed": false
                },
                "sortOptions": [
                  {
                    "field": "PostDateTime",
                    "direction": "Desc"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/opportunity": {
      "get": {
        "operationId": "get_opportunity",
        "summary": "Opportunity",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/lookups": {
      "get": {
        "operationId": "get_lookups",
        "summary": "Lookups",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/organizations": {
      "get": {
        "operationId": "get_organizations",
        "summary": "Organizations",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/unspsc": {
      "get": {
        "operationId": "get_unspsc",
        "summary": "UNSPSC codes",
        "responses": {
          "200": {
            "description": "The upstream response (JSON unless the route or `X-ApiClay-Html` chooses another output)"
          },
          "default": {
            "description": "Gateway error, JSON: SOURCE_UNAVAILABLE = upstream or datasource failed, unknown path, or malformed request; POLICY_LIMIT_EXCEEDED = rate limit, daily cap, or the vendor's request policy was hit; SERVER_BUSY = gateway at capacity; retry with backoff; INSUFFICIENT_BALANCE = no credits left once trial and plan requests are used up; AUTH_FAILED = missing or invalid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "prefix",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
