{
  "openapi": "3.0.1",
  "info": {
    "title": "CanadaBuys Pre-Qualified Supplier Monitor",
    "description": "Find Canadian federal suppliers already pre-qualified through official CanadaBuys standing offers and supply arrangements.",
    "version": "0.1",
    "x-build-id": "tWv92QRZcAbrH9rLJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tenderpilot-data~canada-standing-offers-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tenderpilot-data-canada-standing-offers-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/tenderpilot-data~canada-standing-offers-monitor/runs": {
      "post": {
        "operationId": "runs-sync-tenderpilot-data-canada-standing-offers-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/tenderpilot-data~canada-standing-offers-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-tenderpilot-data-canada-standing-offers-monitor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "useCasePreset": {
            "title": "Use-case preset",
            "enum": [
              "none",
              "cloudSuppliers",
              "cybersecuritySuppliers",
              "softwareSuppliers",
              "professionalServices",
              "partnerDiscovery",
              "expiringSoon",
              "nationalCoverage",
              "ncrSuppliers"
            ],
            "type": "string",
            "description": "Quick presets for common customer workflows. Presets can add keywords, region filters, output mode, and expiry windows. You can still add your own filters below.",
            "default": "none"
          },
          "supplierName": {
            "title": "Supplier name",
            "type": "string",
            "description": "Optional supplier search. Matches standardized, legal, and operating supplier names.",
            "default": ""
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional words or phrases to match across supplier names, SOSA descriptions, commodity descriptions, regions, end-user entities, and agreement numbers.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "regionPreset": {
            "title": "Region preset",
            "enum": [
              "none",
              "canada",
              "nationalCapitalRegion",
              "ontario",
              "quebec",
              "britishColumbia",
              "alberta",
              "westernCanada",
              "atlanticCanada",
              "territories"
            ],
            "type": "string",
            "description": "Use a human-friendly region preset instead of entering delivery-point codes manually. Explicit region codes below are added to this preset.",
            "default": "none"
          },
          "keywordMode": {
            "title": "Keyword mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Use any to match at least one keyword or all to require every keyword.",
            "default": "any"
          },
          "regionCodes": {
            "title": "Region codes",
            "type": "array",
            "description": "Optional delivery-point codes such as CA = Canada, RCN-NCR = National Capital Region, CA-ON = Ontario, CA-QC = Quebec, CA-BC = British Columbia, US, or MX.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agreementTypes": {
            "title": "Agreement types",
            "type": "array",
            "description": "Optional agreement type codes: SA = Supply Arrangement, NMSO = National Master Standing Offer, RMSO = Regional Master Standing Offer, NISO = National Individual Standing Offer, RISO = Regional Individual Standing Offer, DISO = Departmental Individual Standing Offer.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agreementFamily": {
            "title": "Agreement family",
            "enum": [
              "all",
              "supply_arrangement",
              "standing_offer"
            ],
            "type": "string",
            "description": "Filter broadly by supply arrangements or standing offers without knowing the exact agreement type code.",
            "default": "all"
          },
          "activeOnly": {
            "title": "Active only",
            "type": "boolean",
            "description": "Skip records whose expiry date is before today. The source file is named Active SOSA, but it can still contain recently expired rows.",
            "default": true
          },
          "expiringWithinDays": {
            "title": "Expiring within days",
            "minimum": 0,
            "type": "integer",
            "description": "Optional expiry window for active records. Use 0 to disable this filter.",
            "default": 0
          },
          "resultMode": {
            "title": "Result mode",
            "enum": [
              "current",
              "changes",
              "allWithChangeType"
            ],
            "type": "string",
            "description": "Current snapshot returns matching current source records. Changes returns only new, changed, or removed records compared with the previous run for the same state key. All with change type returns current records plus removals.",
            "default": "current"
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "auto",
              "records",
              "suppliersSummary",
              "expiringSoon"
            ],
            "type": "string",
            "description": "Auto lets the use-case preset choose the best output. Records returns one row per agreement. Suppliers summary groups matching records by supplier. Expiring soon returns active records nearing expiry; if no expiry window is set, it defaults to 180 days.",
            "default": "auto"
          },
          "minimumAgreementCount": {
            "title": "Minimum agreement count",
            "minimum": 0,
            "type": "integer",
            "description": "Only used for supplier summary output. Set this to 2 or more to focus on suppliers with broader market presence.",
            "default": 0
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Snapshot key used for change monitoring. Use a different value for different saved filters to avoid mixing states.",
            "default": "default"
          },
          "saveSnapshot": {
            "title": "Save snapshot",
            "type": "boolean",
            "description": "Save the current source snapshot for the next change-monitoring run.",
            "default": true
          },
          "includeFrench": {
            "title": "Include French fields",
            "type": "boolean",
            "description": "Include French descriptions and labels from the bilingual source data.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "supplierName",
              "expiryDate",
              "agreementType",
              "commodityCode",
              "agreementCount",
              "marketPresenceScore"
            ],
            "type": "string",
            "description": "Sort matching records before applying the max items limit.",
            "default": "supplierName"
          },
          "maxItems": {
            "title": "Maximum output records",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum records to push to the dataset. Use 0 for unlimited output.",
            "default": 500
          },
          "maxRowsScanned": {
            "title": "Maximum source rows scanned",
            "minimum": 0,
            "type": "integer",
            "description": "Safety limit for source rows. Use 0 to scan the full official source.",
            "default": 0
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}