{
  "openapi": "3.0.1",
  "info": {
    "title": "Shared Cost Allocation Balance Evidence",
    "description": "Check original shared-cost pools, approved fixed shares and observed allocated outputs with exact signed arithmetic. Retain scope mismatches, missing outputs and duplicate identity ambiguity. JSON or mapped CSV; no allocation method or accounting decisions.",
    "version": "0.1",
    "x-build-id": "Ez3jpsbsKPCJOKOQk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/h_murdock~shared-cost-allocation-balance-evidence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-h_murdock-shared-cost-allocation-balance-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~shared-cost-allocation-balance-evidence/runs": {
      "post": {
        "operationId": "runs-sync-h_murdock-shared-cost-allocation-balance-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~shared-cost-allocation-balance-evidence/run-sync": {
      "post": {
        "operationId": "run-sync-h_murdock-shared-cost-allocation-balance-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": [
          "allocationCoverage",
          "toleranceMinor"
        ],
        "properties": {
          "allocationCoverage": {
            "title": "Submitted allocated-output coverage",
            "enum": [
              "complete",
              "partial",
              "not-provided"
            ],
            "type": "string",
            "description": "Explicit coverage of supplied output for the declared pools. Only complete permits submitted-absence evidence. This declaration does not establish live-provider completeness."
          },
          "toleranceMinor": {
            "title": "Difference annotation tolerance",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Explicit integer0..100 minor units, default sample0. Exact differences remain in the report even within this tolerance. No rounding policy is inferred."
          },
          "poolRows": {
            "title": "Original source cost pools",
            "type": "array",
            "description": "Each row has rowId,poolId,periodId,currency,costBasis billed/effective/custom,amountMinor. IDs are exact strings max160characters; amounts signed canonical integer strings max30digits. Each poolId must identify one source scope; duplicate pool/row IDs remain ambiguous. Supply array OR poolCsv. Max2000combinedrows and4MBJSON."
          },
          "ruleRows": {
            "title": "Approved fixed-share rules",
            "type": "array",
            "description": "rowId,poolId,targetId,shareBasisPoints integer0..10000. No method is selected. A usable rule set requires unique targets and row IDs plus exactly10000total basis points. Missing/duplicate/conflicting rules remain unresolved; no normalization. Supply array OR ruleCsv."
          },
          "outputRows": {
            "title": "Independently observed allocation output",
            "type": "array",
            "description": "rowId,outputLineId,poolId,targetId,periodId,currency,costBasis,amountMinor. Distinct outputLineIds may sum for one pool/target. Duplicate line/row identities remain ambiguous; wrong period,currency or basis is excluded with references. Supply array OR outputCsv. No invoice payment or provider-state assertion."
          },
          "poolCsv": {
            "title": "Alternative source-pool CSV",
            "type": "string",
            "description": "Remove poolRows when using nonemptyCSV. Exactly mapped unique headers required; BOM/quotes accepted. No native CUR/FOCUS format guessing. Header-only means explicitly empty pools."
          },
          "ruleCsv": {
            "title": "Alternative approved-share CSV",
            "type": "string",
            "description": "Remove ruleRows when using nonemptyCSV. Exact mapped headers required. shareBasisPoints must be a canonical integer0..10000, no blank/decimal/exponent. Header-only means no approved rules."
          },
          "outputCsv": {
            "title": "Alternative observed-output CSV",
            "type": "string",
            "description": "Remove outputRows when using nonemptyCSV. Exactly mapped unique headers required. Signed amountMinor remains a string. Header-only means no observed output; allocationCoverage governs absence interpretation."
          },
          "poolColumns": {
            "title": "Source-pool CSV mapping",
            "type": "object",
            "description": "Complete mapping from canonical pool fields to distinct exact headers. Canonical mapping is harmless with arrays; custom mapping requires CSV."
          },
          "ruleColumns": {
            "title": "Fixed-share CSV mapping",
            "type": "object",
            "description": "Complete mapping rowId,poolId,targetId,shareBasisPoints to distinct exact headers. Custom mapping requires CSV."
          },
          "outputColumns": {
            "title": "Observed-output CSV mapping",
            "type": "object",
            "description": "Complete mapping of all eight output fields to distinct exact headers. No automatic alias inference. Custom mapping 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}