{
  "openapi": "3.0.1",
  "info": {
    "title": "Merchant Sale Transition Audit",
    "description": "Audit feed vs static JSON-LD prices at sale boundaries. Compare up to 25 SKUs, classify new/existing/resolved differences, and export evidence, CSV and a reusable baseline.",
    "version": "0.2",
    "x-build-id": "6GIg1BBHa8ryFFPZa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wwhynot~merchant-sale-transition-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wwhynot-merchant-sale-transition-audit",
        "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/wwhynot~merchant-sale-transition-audit/runs": {
      "post": {
        "operationId": "runs-sync-wwhynot-merchant-sale-transition-audit",
        "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/wwhynot~merchant-sale-transition-audit/run-sync": {
      "post": {
        "operationId": "run-sync-wwhynot-merchant-sale-transition-audit",
        "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": {
          "feed": {
            "title": "Feed rows",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "1–25 exact-SKU feed rows. Use this or CSV, not both.",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "title": "Sku",
                  "description": "Exact SKU, not parent group ID.",
                  "editor": "textfield"
                },
                "price": {
                  "type": "string",
                  "title": "Price",
                  "description": "Regular nonnegative decimal price.",
                  "editor": "textfield"
                },
                "currency": {
                  "type": "string",
                  "title": "Currency",
                  "description": "Three-letter currency; must equal page currency.",
                  "editor": "textfield",
                  "pattern": "^[A-Z]{3}$"
                },
                "price_basis": {
                  "type": "string",
                  "title": "Price Basis",
                  "description": "Declared tax_inclusive or tax_exclusive; not automatically inferred.",
                  "editor": "select",
                  "enum": [
                    "tax_inclusive",
                    "tax_exclusive"
                  ]
                },
                "url": {
                  "type": "string",
                  "title": "Url",
                  "description": "Public page identity. Live fetch optional.",
                  "editor": "textfield"
                },
                "sale_price": {
                  "type": "string",
                  "title": "Sale Price",
                  "description": "Discounted decimal price.",
                  "editor": "textfield"
                },
                "sale_start": {
                  "type": "string",
                  "title": "Sale Start",
                  "description": "ISO8601 timestamp with timezone offset.",
                  "editor": "textfield"
                },
                "sale_end": {
                  "type": "string",
                  "title": "Sale End",
                  "description": "ISO8601 exclusive ending timestamp with timezone offset.",
                  "editor": "textfield"
                },
                "market": {
                  "type": "string",
                  "title": "Market",
                  "description": "Optional declared market, retained in scope identity.",
                  "editor": "textfield"
                },
                "variant": {
                  "type": "string",
                  "title": "Variant",
                  "description": "Optional variant identity, retained in scope identity.",
                  "editor": "textfield"
                },
                "evidence_label": {
                  "type": "string",
                  "title": "Evidence Label",
                  "description": "Describes provenance; sample data must be synthetic.",
                  "editor": "textfield"
                },
                "captured_at": {
                  "type": "string",
                  "title": "Captured At",
                  "description": "Timestamp when supplied HTML was captured; different from evaluation time.",
                  "editor": "textfield"
                },
                "html": {
                  "type": "string",
                  "title": "HTML snapshot",
                  "description": "Supplied authorized public page snapshot, maximum2MB.",
                  "editor": "textarea",
                  "maxLength": 2000000
                }
              },
              "required": [
                "sku",
                "price",
                "currency",
                "price_basis"
              ],
              "additionalProperties": false
            }
          },
          "feedCsv": {
            "title": "Feed CSV",
            "maxLength": 500000,
            "type": "string",
            "description": "CSV headers: sku,price,currency,price_basis,url; optional sale_price,sale_start,sale_end,market,variant. Decimal prices; timezone required."
          },
          "snapshots": {
            "title": "HTML snapshots",
            "maxItems": 25,
            "type": "array",
            "description": "Optional records keyed by unique SKU, overriding html/url/provenance on matching feed row.",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "title": "Sku",
                  "description": "Exact SKU, not parent group ID.",
                  "editor": "textfield"
                },
                "html": {
                  "type": "string",
                  "title": "HTML snapshot",
                  "description": "Supplied authorized public page snapshot, maximum2MB.",
                  "editor": "textarea",
                  "maxLength": 2000000
                },
                "url": {
                  "type": "string",
                  "title": "Url",
                  "description": "Public page identity. Live fetch optional.",
                  "editor": "textfield"
                },
                "captured_at": {
                  "type": "string",
                  "title": "Captured At",
                  "description": "Timestamp when supplied HTML was captured; different from evaluation time.",
                  "editor": "textfield"
                },
                "evidence_label": {
                  "type": "string",
                  "title": "Evidence Label",
                  "description": "Describes provenance; sample data must be synthetic.",
                  "editor": "textfield"
                }
              },
              "required": [
                "sku",
                "html"
              ],
              "additionalProperties": false
            }
          },
          "baseline": {
            "title": "Previous baseline",
            "maxItems": 25,
            "type": "array",
            "description": "Exact BASELINE array from earlier run, unchanged scope and strictly earlier evaluation time. Empty baseline never claims new issue.",
            "items": {
              "type": "object",
              "required": [
                "sku",
                "url",
                "checked_at",
                "reason",
                "pointer",
                "scope_hash",
                "evidence_label",
                "html_sha256",
                "basis_evidence",
                "action",
                "classification",
                "status",
                "expected",
                "observed",
                "currency",
                "price_basis",
                "captured_at",
                "evaluation_mode"
              ]
            }
          },
          "checkedAt": {
            "title": "Evaluation time",
            "type": "string",
            "description": "In simulation, explicit hypothetical evaluation time. In observed mode, if supplied must equal snapshot captured_at; omit to use each capture time."
          },
          "fetchPublicUrls": {
            "title": "Fetch public URLs",
            "type": "boolean",
            "description": "Default off. Up to3 pages/6 HTTPrequests total incl robots, no auth/redirects/browser/proxy, max2MB each. Live fetch cannot use checkedAt.",
            "default": false
          },
          "mode": {
            "title": "Evidence mode",
            "enum": [
              "observed",
              "simulation"
            ],
            "type": "string",
            "description": "observed requires exact captured_at; default. simulation explicitly re-evaluates supplied markup at checkedAt and never represents a real before/after observation.",
            "default": "observed"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}