{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify Vendor & Assortment Intelligence Report",
    "description": "Turns public Shopify storefront feeds into one severity-ranked supplier planning report covering vendor mix, assortment shifts, price dispersion, missing options and new categories, with dated baselines and explicit sampling caveats.",
    "version": "0.1",
    "x-build-id": "TYxckeJsM3NYjaHBu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/practical_ai_lab_jp~pal-shopify-merchant-vendor-intelligence-suite/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-practical_ai_lab_jp-pal-shopify-merchant-vendor-intelligence-suite",
        "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/practical_ai_lab_jp~pal-shopify-merchant-vendor-intelligence-suite/runs": {
      "post": {
        "operationId": "runs-sync-practical_ai_lab_jp-pal-shopify-merchant-vendor-intelligence-suite",
        "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/practical_ai_lab_jp~pal-shopify-merchant-vendor-intelligence-suite/run-sync": {
      "post": {
        "operationId": "run-sync-practical_ai_lab_jp-pal-shopify-merchant-vendor-intelligence-suite",
        "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",
        "required": [
          "storeUrls"
        ],
        "properties": {
          "storeUrls": {
            "title": "Store root URLs",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Public https storefront roots, one per line (for example https://www.deadstock.ca). Paths, query strings, ports and credentials are rejected. Maximum 10 stores.",
            "items": {
              "type": "string"
            }
          },
          "maxProductsPerStore": {
            "title": "Max products sampled per store",
            "minimum": 20,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on products read from each public feed (250 per request page). Stores with more products are reported as possibly truncated and figures describe the sampled window only.",
            "default": 250
          },
          "baselineLabel": {
            "title": "Baseline label",
            "pattern": "^[a-z0-9][a-z0-9-]{0,31}$",
            "type": "string",
            "description": "Lowercase letters, digits and hyphens. Runs that share a label are compared with each other. Use a different label for each buying program or watchlist.",
            "default": "default"
          },
          "updateBaseline": {
            "title": "Save this run as the new baseline",
            "type": "boolean",
            "description": "When enabled, a dated snapshot is stored after the report is delivered so the next run can show changes. Disable for ad-hoc what-if runs.",
            "default": true
          },
          "launchWindowDays": {
            "title": "New-launch window (days)",
            "minimum": 7,
            "maximum": 180,
            "type": "integer",
            "description": "A category counts as a possible recent launch when most of its products show a published date inside this window. This is an inference from public dates.",
            "default": 30
          },
          "maxFindings": {
            "title": "Max findings returned",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Findings are ranked by severity and the top results are returned. Store summaries and the run summary are always returned.",
            "default": 150
          },
          "vendorShiftPoints": {
            "title": "Vendor share shift threshold (points)",
            "minimum": 1,
            "maximum": 50,
            "type": "number",
            "description": "Minimum change in a vendor's share of the sampled assortment, in percentage points, versus the baseline. A noise screen is applied on top.",
            "default": 5
          },
          "concentrationTopSharePercent": {
            "title": "Vendor concentration threshold (%)",
            "minimum": 20,
            "maximum": 95,
            "type": "number",
            "description": "Flag a store when its largest vendor holds at least this share of sampled products.",
            "default": 50
          },
          "assortmentTurnoverPercent": {
            "title": "Assortment turnover threshold (%)",
            "minimum": 5,
            "maximum": 90,
            "type": "number",
            "description": "Flag a store when added plus removed products, as a share of all products seen in either run, reaches this level.",
            "default": 20
          },
          "priceChangeThresholdPercent": {
            "title": "Price change threshold (%)",
            "minimum": 1,
            "maximum": 50,
            "type": "number",
            "description": "A retained product counts as repriced when its lowest published variant price moved by at least this percentage.",
            "default": 5
          },
          "priceDispersionThreshold": {
            "title": "Category price dispersion threshold",
            "minimum": 0.1,
            "maximum": 0.9,
            "type": "number",
            "description": "Quartile coefficient of dispersion, (Q3 - Q1) / (Q3 + Q1), above which a category is flagged. 0.35 is a wide spread.",
            "default": 0.35
          },
          "crossStorePriceGapPercent": {
            "title": "Cross-store price gap threshold (%)",
            "minimum": 5,
            "maximum": 200,
            "type": "number",
            "description": "For identical vendor and title listed in two or more stores with the same currency, flag gaps between the lowest and highest published price at or above this level.",
            "default": 15
          },
          "expectedOptionSharePercent": {
            "title": "Expected option share (%)",
            "minimum": 40,
            "maximum": 95,
            "type": "number",
            "description": "An option name (for example Size) is expected in a category when at least this share of its products publish it. Products without it are reported.",
            "default": 60
          },
          "minGroupSize": {
            "title": "Minimum group size",
            "minimum": 3,
            "maximum": 50,
            "type": "integer",
            "description": "Minimum products in a store or category before percentages and dispersion are reported.",
            "default": 5
          },
          "newEntityMinProducts": {
            "title": "Minimum products for a new vendor or category",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "A vendor or category absent from the baseline must have at least this many products to be reported as new.",
            "default": 2
          },
          "snapshotRetention": {
            "title": "Dated snapshots kept per store",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of dated snapshots retained in the baseline store for each store and label. Older ones are deleted.",
            "default": 8
          },
          "requestDelaySeconds": {
            "title": "Delay between requests (seconds)",
            "minimum": 0.5,
            "maximum": 10,
            "type": "number",
            "description": "Minimum pause between requests to the same store. A larger Crawl-delay in robots.txt always wins.",
            "default": 1
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Network timeout for each request.",
            "default": 20
          },
          "stateStoreName": {
            "title": "Baseline storage name",
            "pattern": "^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$",
            "type": "string",
            "description": "Named key-value store that keeps dated baselines between runs. Lowercase letters, digits and hyphens, 3 to 63 characters.",
            "default": "pal-vendor-intel-baselines"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}