{
  "openapi": "3.0.1",
  "info": {
    "title": "Stock Transfer Batch Feasibility Evidence",
    "description": "Check proposed stock transfers against supplied snapshots, exact SKU/location/unit balances and reserve floors. Detect shared-source oversubscription, ordered prefix deficits, missing or duplicate stock evidence and unresolved transfer propagation. JSON or mapped CSV.",
    "version": "0.1",
    "x-build-id": "jecYMAuflTiVqRsxM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/h_murdock~stock-transfer-plan-evidence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-h_murdock-stock-transfer-plan-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~stock-transfer-plan-evidence/runs": {
      "post": {
        "operationId": "runs-sync-h_murdock-stock-transfer-plan-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~stock-transfer-plan-evidence/run-sync": {
      "post": {
        "operationId": "run-sync-h_murdock-stock-transfer-plan-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": [
          "snapshotId",
          "snapshotCoverage",
          "executionModel"
        ],
        "properties": {
          "snapshotId": {
            "title": "Required snapshot reference",
            "type": "string",
            "description": "Exact opaque snapshot ID used for all balances. Other-snapshot records are retained as evidence and never substituted. IDs are case-sensitive strings,1–160 characters, no controls or leading/trailing whitespace; leading zeros remain."
          },
          "snapshotCoverage": {
            "title": "Declared snapshot coverage",
            "enum": [
              "complete",
              "partial"
            ],
            "type": "string",
            "description": "Your declaration of snapshot coverage. Neither choice proves physical/live stock; missing exact keys remain unresolved even when complete is declared."
          },
          "executionModel": {
            "title": "Declared execution model",
            "enum": [
              "simultaneous-outbound",
              "ordered-immediate"
            ],
            "type": "string",
            "description": "simultaneous-outbound aggregates outgoing against starting stock minus reserve; inbound cannot fund outgoing. ordered-immediate uses unique explicit ascending sequences and immediate debit/credit. Failed/unknown legs taint both touched keys and later dependents. Neither model proves actual movement."
          },
          "inventory": {
            "title": "Inventory snapshot rows",
            "type": "array",
            "description": "Rows: rowId,sku,locationId,unit,availableQuantity,reserveFloor,snapshotId. All IDs/units exact strings. Quantity strings: nonnegative canonical decimal with up to18 integer digits and6 decimal places (e.g.0,1.25), no separators/exponent/leading zero. Invalid bounded strings yield unresolved row evidence. Duplicate exact snapshot SKU/location/unit keys are unresolved even if values agree. Unique rowIds. Use array OR nonemptyinventoryCsv. TotalJSON<=4MB and2000 combined rows."
          },
          "inventoryCsv": {
            "title": "Inventory CSV alternative",
            "type": "string",
            "description": "Remove inventory array when using nonemptyCSV. Canonical headers: rowId,sku,locationId,unit,availableQuantity,reserveFloor,snapshotId. BOM and quoted fields accepted; mapped headers must be unique and exact, extra columns/irregular rows rejected. Header-onlyCSV is explicit empty inventory; missing stock never becomes zero."
          },
          "inventoryColumns": {
            "title": "Inventory CSV mapping",
            "type": "object",
            "description": "Optional exact mapping from each canonical inventory field to one distinct CSV header. All seven headers required. A canonical mapping is harmless with arrays; custom mapping requiresCSV."
          },
          "transfers": {
            "title": "Proposed transfer batch",
            "type": "array",
            "description": "Rows: unique rowId,sku,fromLocationId,toLocationId,unit,quantity decimal-string,sequence integer1–1000000000. quantity must be positive and use the inventory decimal format; invalid bounded strings are flagged and taint touched balances. Same-location transfer invalid. No unit conversions. Both models require unique sequences. Supply array OR nonemptytransfersCsv. Empty array produces no_transfers, no clean-stock conclusion. Output caps may require smaller batches."
          },
          "transfersCsv": {
            "title": "Transfer CSV alternative",
            "type": "string",
            "description": "Remove transfers array when using nonemptyCSV. Canonical headers: rowId,sku,fromLocationId,toLocationId,unit,quantity,sequence. All seven headers required; sequence must be a canonical integer. BOM/quoted cells accepted, duplicate or extra headers and irregular rows rejected."
          },
          "transferColumns": {
            "title": "Transfer CSV mapping",
            "type": "object",
            "description": "Optional mapping from every canonical transfer field to a distinct required CSV header. Custom mappings requireCSV. Exact identifiers retain case and leading zeros."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}