{
  "openapi": "3.0.1",
  "info": {
    "title": "Physical Count & Recount Consistency Evidence",
    "description": "Compare actual first and recount quantities against an exact session/SKU/location/lot/unit baseline. Retain duplicate ambiguity, missing counts and cutoff limits with source evidence. JSON or mapped CSV; no valuation or stock adjustments.",
    "version": "0.1",
    "x-build-id": "FfQVGkbOdT7FShX9V"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/h_murdock~count-pass-consistency-evidence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-h_murdock-count-pass-consistency-evidence",
        "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/h_murdock~count-pass-consistency-evidence/runs": {
      "post": {
        "operationId": "runs-sync-h_murdock-count-pass-consistency-evidence",
        "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/h_murdock~count-pass-consistency-evidence/run-sync": {
      "post": {
        "operationId": "run-sync-h_murdock-count-pass-consistency-evidence",
        "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": [
          "sessionId",
          "firstPassId",
          "recountPassId",
          "cutOffEvidence",
          "baselineCoverage"
        ],
        "properties": {
          "sessionId": {
            "title": "Selected session",
            "type": "string",
            "description": "Exact opaque session identifier. Other-session source rows are retained as unused. IDs remain case- and whitespace-sensitive strings, max160characters, including leading zeros."
          },
          "firstPassId": {
            "title": "First count pass ID",
            "type": "string",
            "description": "Explicit first pass identifier. Must differ from recountPassId; no timestamp/latest-pass inference."
          },
          "recountPassId": {
            "title": "Actual recount pass ID",
            "type": "string",
            "description": "Explicit second pass identifier, distinct from firstPassId. Actual countedQuantity is needed; a done checkbox is not a recount."
          },
          "cutOffEvidence": {
            "title": "Cutoff comparability declaration",
            "enum": [
              "comparable",
              "unverified"
            ],
            "type": "string",
            "description": "Comparable means caller declares baseline and both passes can be compared at the same inventory cutoff. Unverified suppresses authoritative baseline deltas and leaves variance unresolved; raw first/recount difference remains arithmetic only. Actor does not verify movements or cutoff."
          },
          "baselineCoverage": {
            "title": "Submitted baseline coverage",
            "enum": [
              "complete",
              "partial"
            ],
            "type": "string",
            "description": "Coverage declaration refers only to the submitted session scope. Complete does not imply a missing key has zero stock; partial prevents a whole-session consistency conclusion."
          },
          "baselineRows": {
            "title": "Baseline inventory rows",
            "type": "array",
            "description": "Each row: distinct rowId,sessionId,sku,locationId,lotId,unit,quantity. All strings. lotId must be explicit, may be empty for an untracked lot scope. quantity nonnegative exact decimal string, max24integer/12fractionaldigits, no exponent/separators. Duplicate exactsession/sku/location/lot/unit baseline keys remain ambiguous evenequal. Supply array OR baselineCsv. <=2000combinedrows and4MBJSON."
          },
          "countRows": {
            "title": "Actual first/recount rows",
            "type": "array",
            "description": "Each row: distinct rowId,sessionId,passId,sku,locationId,lotId,unit,countedQuantity. One row is one FULL key count in a pass. Duplicate keys withinpass are ambiguous, never added/averaged/overwritten. Explicit zero is valid; missing is notzero. Exact lot/unit matching, no conversion. Supply array OR countsCsv. Unknown passes retained unused."
          },
          "baselineCsv": {
            "title": "Alternative baseline CSV",
            "type": "string",
            "description": "Remove baselineRows when using a nonemptyCSV. BOM/quotedcells accepted. Exactly mapped unique headers includingexplicitlotId required; irregularrows or unknownheaders rejected. Header-only means an explicit empty baseline."
          },
          "countsCsv": {
            "title": "Alternative counts CSV",
            "type": "string",
            "description": "Remove countRows when using a nonemptyCSV. Exactly mapped unique headers, includingexplicitlotId andpassId, required. BlanklotId means untrackedlot scope; blankquantity invalid. Header-only means no counts."
          },
          "baselineColumns": {
            "title": "Baseline CSV column mapping",
            "type": "object",
            "description": "Optional complete mapping rowId,sessionId,sku,locationId,lotId,unit,quantity to distinct CSVheaders. Canonical mapping is harmless with arrays; custom mapping requires CSV. No automatic header guesses."
          },
          "countColumns": {
            "title": "Counts CSV column mapping",
            "type": "object",
            "description": "Optional complete mapping rowId,sessionId,passId,sku,locationId,lotId,unit,countedQuantity to distinct CSVheaders. Canonicalmapping harmless with arrays; custommapping requires CSV."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}