{
  "openapi": "3.0.1",
  "info": {
    "title": "BOM Part Availability & Lead-Time Monitor",
    "description": "Reconcile a bill of materials with your own Mouser and DigiKey API keys. Resolves exact MPN and packaging, prices the order quantity, and reports stock, lead time, and lifecycle. Keeps a baseline and emits shortage, recovery, lead-time, and lifecycle changes. Demo mode needs no keys.",
    "version": "1.0",
    "x-build-id": "VJAFFT5hejkVUVxgr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plusonets~bom-part-availability-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plusonets-bom-part-availability-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/plusonets~bom-part-availability-monitor/runs": {
      "post": {
        "operationId": "runs-sync-plusonets-bom-part-availability-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/plusonets~bom-part-availability-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-plusonets-bom-part-availability-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": {
          "runMode": {
            "title": "Run mode",
            "enum": [
              "auto",
              "demo",
              "live"
            ],
            "type": "string",
            "description": "Auto runs the labelled demo when no selected supplier has credentials, and calls the official APIs when at least one selected supplier is configured. Demo never sends credentials and never charges part-supplier observations. Live requires your keys and never invents prices.",
            "default": "auto"
          },
          "suppliers": {
            "title": "Suppliers",
            "type": "array",
            "description": "Official APIs to ask. Mouser uses the Search API. DigiKey uses Product Details, not keyword search. Any other name is returned as unsupported. This Actor does not scrape websites.",
            "items": {
              "type": "string",
              "enum": [
                "mouser",
                "digikey"
              ],
              "enumTitles": [
                "Mouser Search API",
                "DigiKey Product Information API"
              ]
            },
            "default": [
              "mouser",
              "digikey"
            ]
          },
          "bomJson": {
            "title": "BOM JSON",
            "type": "string",
            "description": "Inline JSON array. Each line needs manufacturer, mpn, quantity; optional packaging, currency, lineId. Example: [{\"lineId\":\"U1\",\"manufacturer\":\"Texas Instruments\",\"mpn\":\"LM358DR\",\"quantity\":2000,\"packaging\":\"Tape & Reel\"}]. Used before CSV and URL. Leave empty in demo mode."
          },
          "bomCsv": {
            "title": "BOM CSV",
            "type": "string",
            "description": "Inline CSV with a header row. Recognized columns: manufacturer, mpn, quantity, packaging, currency, lineId. Used when BOM JSON is empty."
          },
          "bomUrl": {
            "title": "BOM URL",
            "type": "string",
            "description": "Public https URL of a JSON or CSV BOM. Private addresses, localhost, and link-local hosts are rejected. Used when JSON and CSV are empty."
          },
          "currency": {
            "title": "Default currency",
            "pattern": "^[A-Za-z]{3}$",
            "type": "string",
            "description": "Used when a line does not name a currency. Prices in another currency are reported as a mismatch and are not converted.",
            "default": "USD"
          },
          "alertOnlyOnChange": {
            "title": "Dataset only on change",
            "type": "boolean",
            "description": "When true, the dataset contains only material changes and failed checks. Every successful observation is still charged in live mode and is stored in the LEDGER key of the run's key-value store. Quiet checks are the product, not a free extra.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-zA-Z0-9!\\-_.'()]{1,63}$",
            "type": "string",
            "description": "Named key-value store for the baseline. Use one name per BOM or customer so schedules do not overwrite each other. A blocked or failed check does not replace a saved baseline.",
            "default": "bom-part-availability-state"
          },
          "maxBomLines": {
            "title": "Maximum BOM lines",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Lines after this cap are counted as truncated and are not checked.",
            "default": 200
          },
          "minRequestIntervalMs": {
            "title": "Minimum delay between API calls (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between official API calls. Retries use additional backoff.",
            "default": 250
          },
          "mouserApiKey": {
            "title": "Mouser Search API key",
            "type": "string",
            "description": "Your Mouser Search API key. Optional. Stored as a secret and sent only to api.mouser.com. Unofficial integration, not affiliated with Mouser."
          },
          "digikeyClientId": {
            "title": "DigiKey client ID",
            "type": "string",
            "description": "Client ID from your DigiKey API app subscribed to Product Information. Optional secret. Unofficial integration, not affiliated with DigiKey."
          },
          "digikeyClientSecret": {
            "title": "DigiKey client secret",
            "type": "string",
            "description": "Client secret for the same DigiKey app. Optional secret. Used only to request a client-credentials token from DigiKey."
          },
          "digikeyAccountId": {
            "title": "DigiKey account ID",
            "type": "string",
            "description": "Optional. Sent as X-DIGIKEY-Account-Id when your DigiKey app requires an account id for 2-legged pricing."
          },
          "digikeySandbox": {
            "title": "Use DigiKey sandbox host",
            "type": "boolean",
            "description": "Call sandbox-api.digikey.com instead of api.digikey.com. Leave off for production keys.",
            "default": false
          },
          "digikeyLocaleSite": {
            "title": "DigiKey site override",
            "type": "string",
            "description": "Optional 2-letter DigiKey site, such as US, DE, or UK. When empty, the site is chosen from the line currency. The currency header is still the line currency, and prices are never converted."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}