# Shared Cost Allocation Balance Evidence (`h_murdock/shared-cost-allocation-balance-evidence`) Actor

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.

- **URL**: https://apify.com/h_murdock/shared-cost-allocation-balance-evidence.md
- **Developed by:** [Gilad Ronen](https://apify.com/h_murdock) (community)
- **Categories:** Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.25 / completed report

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Shared Cost Allocation Balance Evidence

Check a monthly shared-cost export against the original cost pools and the fixed shares your organization has already approved. This Actor reports missing submitted outputs, source-to-output residuals, unexpected target identities, duplicate identities and wrong-scope rows. It is useful when an allocation spreadsheet or a separate allocation engine produces a report that needs an independent arithmetic check before operations staff review it.

Supply three normalized tables: original source pools, approved fixed-share rules and independently observed allocation output. Use JSON arrays or strict mapped CSV for each table. No provider account, resource credentials or paid external API is needed. The Actor does not fetch your cloud bill or choose an allocation method. It does not determine fair shares, amortization, accounting treatment, tax obligations or transfer pricing.

### Input

Every pool row has `rowId`, `poolId`, `periodId`, `currency`, `costBasis` and `amountMinor`. Declare the basis as `billed`, `effective` or `custom`. Each `poolId` identifies one unique source amount and scope. Keep separate currencies, periods and bases in separate pools. Never combine billed and effective amounts for the same cost. The currency identifier is exact supplied text; the Actor neither validates a currency standard nor converts currencies. You normalize decimal amounts into your chosen currency's minor units before submission.

Each rule has `rowId`, `poolId`, `targetId` and integer `shareBasisPoints`. A usable rule set requires unique target and rule row identities and exactly 10000 total basis points. Missing or conflicting rules remain unresolved. They are not repaired or normalized.

Each observed output has `rowId`, `outputLineId`, `poolId`, `targetId`, `periodId`, `currency`, `costBasis` and `amountMinor`. Distinct output lines can sum for the same pool and target. Duplicate row or line identities make affected comparisons ambiguous, including collisions across pools. Wrong period, currency or basis rows stay visible but are excluded from the matching pool's sum. No duplicate occurrence is selected or counted twice.

All identifiers are case- and whitespace-sensitive strings, including `0` and leading zeros. Amounts are canonical signed integer strings with at most 30 digits: `0`, `100`, `-100`. Negative credits and zero pools are supported. Plus signs, decimals, exponents, separators, leading zeros in amounts and negative zero are rejected. The complete input must be at most 4 MB and contain at most 2000 combined rows.

Declare `allocationCoverage` as `complete`, `partial` or `not-provided`, and explicitly set `toleranceMinor` from 0 to 100. Only complete coverage permits absence-in-submitted-export evidence. A missing target under partial coverage is unknown, never an observed zero. Complete coverage is your declaration about submitted data, not proof of live-provider completeness. A complete missing target's `0` is the empty submitted sum, not a zero payment.

### Results

One dataset item contains the complete report, original normalized rows, pool and target evidence, source references and findings. Download full JSON, evidence CSV, findings CSV or standalone HTML. JSON preserves exact amounts as decimal strings. Each target shows `expectedNumerator / 10000` and `discrepancyNumerator / 10000`; fractional minor units remain exact. No rounding policy is chosen. The tolerance annotates exact differences without hiding them. A nonzero pool residual means source minus qualified submitted output is nonzero; incomplete coverage or wrong-scope rows can keep its interpretation unresolved.

CSV exports quote cells and prefix potential spreadsheet formulas with an apostrophe, including signed negative strings. Import identifier and amount columns as text if your spreadsheet automatically changes numeric strings. HTML escapes supplied content and has no external scripts. Large retained-reference reports that exceed the 8 MB JSON or 9 MB per-export limit are rejected before charging; split such batches.

The proposed price is **$0.25 per completed report**, with platform usage included. An insufficient event budget delivers no report and charges no report event. A fresh run is billable again. Resuming the same run checks the saved dataset's input fingerprint and integrity, restores missing exports and avoids another dataset item or report charge. An interruption before completion may leave partial exports; resume the same run to finish recovery.

Raw inputs and reports are stored in Apify storage. Use opaque pool and target identifiers, omit contact details and resource names, and submit only data you are authorized to process. This report provides supplied-data evidence for review. It does not certify FOCUS conformance, provider acceptance, invoice settlement, financial correctness or the quality of your allocation policy.

The prefilled example contains balanced splits, dropped targets, excess output, duplicate identities, wrong scope, a negative credit, a zero pool and fractional expected shares. Replace it with your own normalized data and explicit choices before using the report for a real monthly workflow.

# Actor input Schema

## `allocationCoverage` (type: `string`):

Explicit coverage of supplied output for the declared pools. Only complete permits submitted-absence evidence. This declaration does not establish live-provider completeness.

## `toleranceMinor` (type: `integer`):

Explicit integer0..100 minor units, default sample0. Exact differences remain in the report even within this tolerance. No rounding policy is inferred.

## `poolRows` (type: `array`):

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` (type: `array`):

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` (type: `array`):

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` (type: `string`):

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` (type: `string`):

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` (type: `string`):

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` (type: `object`):

Complete mapping from canonical pool fields to distinct exact headers. Canonical mapping is harmless with arrays; custom mapping requires CSV.

## `ruleColumns` (type: `object`):

Complete mapping rowId,poolId,targetId,shareBasisPoints to distinct exact headers. Custom mapping requires CSV.

## `outputColumns` (type: `object`):

Complete mapping of all eight output fields to distinct exact headers. No automatic alias inference. Custom mapping requires CSV.

## Actor input object example

```json
{
  "allocationCoverage": "complete",
  "poolRows": [
    {
      "rowId": "p-balanced",
      "poolId": "balanced",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "10000"
    },
    {
      "rowId": "p-dropped",
      "poolId": "dropped",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "p-excess",
      "poolId": "excess",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "p-duplicate",
      "poolId": "duplicate",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "p-scope",
      "poolId": "scope",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "p-credit",
      "poolId": "credit",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "-101"
    },
    {
      "rowId": "p-zero",
      "poolId": "zero",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "0"
    },
    {
      "rowId": "p-fractional",
      "poolId": "fractional",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "1"
    }
  ],
  "ruleRows": [
    {
      "rowId": "r-balanced-001",
      "poolId": "balanced",
      "targetId": "001",
      "shareBasisPoints": 6000
    },
    {
      "rowId": "r-balanced-002",
      "poolId": "balanced",
      "targetId": "002",
      "shareBasisPoints": 4000
    },
    {
      "rowId": "r-dropped-001",
      "poolId": "dropped",
      "targetId": "001",
      "shareBasisPoints": 5000
    },
    {
      "rowId": "r-dropped-002",
      "poolId": "dropped",
      "targetId": "002",
      "shareBasisPoints": 5000
    },
    {
      "rowId": "r-excess-001",
      "poolId": "excess",
      "targetId": "001",
      "shareBasisPoints": 10000
    },
    {
      "rowId": "r-duplicate-001",
      "poolId": "duplicate",
      "targetId": "001",
      "shareBasisPoints": 10000
    },
    {
      "rowId": "r-scope-001",
      "poolId": "scope",
      "targetId": "001",
      "shareBasisPoints": 10000
    },
    {
      "rowId": "r-credit-001",
      "poolId": "credit",
      "targetId": "001",
      "shareBasisPoints": 5000
    },
    {
      "rowId": "r-credit-002",
      "poolId": "credit",
      "targetId": "002",
      "shareBasisPoints": 5000
    },
    {
      "rowId": "r-zero-001",
      "poolId": "zero",
      "targetId": "001",
      "shareBasisPoints": 10000
    },
    {
      "rowId": "r-fractional-001",
      "poolId": "fractional",
      "targetId": "001",
      "shareBasisPoints": 3333
    },
    {
      "rowId": "r-fractional-002",
      "poolId": "fractional",
      "targetId": "002",
      "shareBasisPoints": 6667
    }
  ],
  "outputRows": [
    {
      "rowId": "o-1",
      "outputLineId": "l-1",
      "poolId": "balanced",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "6000"
    },
    {
      "rowId": "o-2",
      "outputLineId": "l-2",
      "poolId": "balanced",
      "targetId": "002",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "4000"
    },
    {
      "rowId": "o-3",
      "outputLineId": "l-3",
      "poolId": "dropped",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "50"
    },
    {
      "rowId": "o-4",
      "outputLineId": "l-4",
      "poolId": "excess",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "120"
    },
    {
      "rowId": "o-5",
      "outputLineId": "same-line",
      "poolId": "duplicate",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-6",
      "outputLineId": "same-line",
      "poolId": "duplicate",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-7",
      "outputLineId": "l-7",
      "poolId": "scope",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-8",
      "outputLineId": "l-8",
      "poolId": "scope",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "EUR",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-9",
      "outputLineId": "l-9",
      "poolId": "scope",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "effective",
      "amountMinor": "100"
    },
    {
      "rowId": "o-10",
      "outputLineId": "l-10",
      "poolId": "scope",
      "targetId": "001",
      "periodId": "2026-08",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-11",
      "outputLineId": "l-11",
      "poolId": "credit",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "-51"
    },
    {
      "rowId": "o-12",
      "outputLineId": "l-12",
      "poolId": "credit",
      "targetId": "002",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "-50"
    },
    {
      "rowId": "o-13",
      "outputLineId": "l-13",
      "poolId": "zero",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "0"
    },
    {
      "rowId": "o-14",
      "outputLineId": "l-14",
      "poolId": "fractional",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "0"
    },
    {
      "rowId": "o-15",
      "outputLineId": "l-15",
      "poolId": "fractional",
      "targetId": "002",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "1"
    }
  ],
  "poolColumns": {
    "rowId": "rowId",
    "poolId": "poolId",
    "periodId": "periodId",
    "currency": "currency",
    "costBasis": "costBasis",
    "amountMinor": "amountMinor"
  },
  "ruleColumns": {
    "rowId": "rowId",
    "poolId": "poolId",
    "targetId": "targetId",
    "shareBasisPoints": "shareBasisPoints"
  },
  "outputColumns": {
    "rowId": "rowId",
    "outputLineId": "outputLineId",
    "poolId": "poolId",
    "targetId": "targetId",
    "periodId": "periodId",
    "currency": "currency",
    "costBasis": "costBasis",
    "amountMinor": "amountMinor"
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `json` (type: `string`):

No description

## `evidence` (type: `string`):

No description

## `findings` (type: `string`):

No description

## `html` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "allocationCoverage": "complete",
    "toleranceMinor": 0,
    "poolRows": [
        {
            "rowId": "p-balanced",
            "poolId": "balanced",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "10000"
        },
        {
            "rowId": "p-dropped",
            "poolId": "dropped",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "p-excess",
            "poolId": "excess",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "p-duplicate",
            "poolId": "duplicate",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "p-scope",
            "poolId": "scope",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "p-credit",
            "poolId": "credit",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "-101"
        },
        {
            "rowId": "p-zero",
            "poolId": "zero",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "0"
        },
        {
            "rowId": "p-fractional",
            "poolId": "fractional",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "1"
        }
    ],
    "ruleRows": [
        {
            "rowId": "r-balanced-001",
            "poolId": "balanced",
            "targetId": "001",
            "shareBasisPoints": 6000
        },
        {
            "rowId": "r-balanced-002",
            "poolId": "balanced",
            "targetId": "002",
            "shareBasisPoints": 4000
        },
        {
            "rowId": "r-dropped-001",
            "poolId": "dropped",
            "targetId": "001",
            "shareBasisPoints": 5000
        },
        {
            "rowId": "r-dropped-002",
            "poolId": "dropped",
            "targetId": "002",
            "shareBasisPoints": 5000
        },
        {
            "rowId": "r-excess-001",
            "poolId": "excess",
            "targetId": "001",
            "shareBasisPoints": 10000
        },
        {
            "rowId": "r-duplicate-001",
            "poolId": "duplicate",
            "targetId": "001",
            "shareBasisPoints": 10000
        },
        {
            "rowId": "r-scope-001",
            "poolId": "scope",
            "targetId": "001",
            "shareBasisPoints": 10000
        },
        {
            "rowId": "r-credit-001",
            "poolId": "credit",
            "targetId": "001",
            "shareBasisPoints": 5000
        },
        {
            "rowId": "r-credit-002",
            "poolId": "credit",
            "targetId": "002",
            "shareBasisPoints": 5000
        },
        {
            "rowId": "r-zero-001",
            "poolId": "zero",
            "targetId": "001",
            "shareBasisPoints": 10000
        },
        {
            "rowId": "r-fractional-001",
            "poolId": "fractional",
            "targetId": "001",
            "shareBasisPoints": 3333
        },
        {
            "rowId": "r-fractional-002",
            "poolId": "fractional",
            "targetId": "002",
            "shareBasisPoints": 6667
        }
    ],
    "outputRows": [
        {
            "rowId": "o-1",
            "outputLineId": "l-1",
            "poolId": "balanced",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "6000"
        },
        {
            "rowId": "o-2",
            "outputLineId": "l-2",
            "poolId": "balanced",
            "targetId": "002",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "4000"
        },
        {
            "rowId": "o-3",
            "outputLineId": "l-3",
            "poolId": "dropped",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "50"
        },
        {
            "rowId": "o-4",
            "outputLineId": "l-4",
            "poolId": "excess",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "120"
        },
        {
            "rowId": "o-5",
            "outputLineId": "same-line",
            "poolId": "duplicate",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "o-6",
            "outputLineId": "same-line",
            "poolId": "duplicate",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "o-7",
            "outputLineId": "l-7",
            "poolId": "scope",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "o-8",
            "outputLineId": "l-8",
            "poolId": "scope",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "EUR",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "o-9",
            "outputLineId": "l-9",
            "poolId": "scope",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "effective",
            "amountMinor": "100"
        },
        {
            "rowId": "o-10",
            "outputLineId": "l-10",
            "poolId": "scope",
            "targetId": "001",
            "periodId": "2026-08",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100"
        },
        {
            "rowId": "o-11",
            "outputLineId": "l-11",
            "poolId": "credit",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "-51"
        },
        {
            "rowId": "o-12",
            "outputLineId": "l-12",
            "poolId": "credit",
            "targetId": "002",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "-50"
        },
        {
            "rowId": "o-13",
            "outputLineId": "l-13",
            "poolId": "zero",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "0"
        },
        {
            "rowId": "o-14",
            "outputLineId": "l-14",
            "poolId": "fractional",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "0"
        },
        {
            "rowId": "o-15",
            "outputLineId": "l-15",
            "poolId": "fractional",
            "targetId": "002",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "1"
        }
    ],
    "poolCsv": "",
    "ruleCsv": "",
    "outputCsv": "",
    "poolColumns": {
        "rowId": "rowId",
        "poolId": "poolId",
        "periodId": "periodId",
        "currency": "currency",
        "costBasis": "costBasis",
        "amountMinor": "amountMinor"
    },
    "ruleColumns": {
        "rowId": "rowId",
        "poolId": "poolId",
        "targetId": "targetId",
        "shareBasisPoints": "shareBasisPoints"
    },
    "outputColumns": {
        "rowId": "rowId",
        "outputLineId": "outputLineId",
        "poolId": "poolId",
        "targetId": "targetId",
        "periodId": "periodId",
        "currency": "currency",
        "costBasis": "costBasis",
        "amountMinor": "amountMinor"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("h_murdock/shared-cost-allocation-balance-evidence").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "allocationCoverage": "complete",
    "toleranceMinor": 0,
    "poolRows": [
        {
            "rowId": "p-balanced",
            "poolId": "balanced",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "10000",
        },
        {
            "rowId": "p-dropped",
            "poolId": "dropped",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "p-excess",
            "poolId": "excess",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "p-duplicate",
            "poolId": "duplicate",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "p-scope",
            "poolId": "scope",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "p-credit",
            "poolId": "credit",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "-101",
        },
        {
            "rowId": "p-zero",
            "poolId": "zero",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "0",
        },
        {
            "rowId": "p-fractional",
            "poolId": "fractional",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "1",
        },
    ],
    "ruleRows": [
        {
            "rowId": "r-balanced-001",
            "poolId": "balanced",
            "targetId": "001",
            "shareBasisPoints": 6000,
        },
        {
            "rowId": "r-balanced-002",
            "poolId": "balanced",
            "targetId": "002",
            "shareBasisPoints": 4000,
        },
        {
            "rowId": "r-dropped-001",
            "poolId": "dropped",
            "targetId": "001",
            "shareBasisPoints": 5000,
        },
        {
            "rowId": "r-dropped-002",
            "poolId": "dropped",
            "targetId": "002",
            "shareBasisPoints": 5000,
        },
        {
            "rowId": "r-excess-001",
            "poolId": "excess",
            "targetId": "001",
            "shareBasisPoints": 10000,
        },
        {
            "rowId": "r-duplicate-001",
            "poolId": "duplicate",
            "targetId": "001",
            "shareBasisPoints": 10000,
        },
        {
            "rowId": "r-scope-001",
            "poolId": "scope",
            "targetId": "001",
            "shareBasisPoints": 10000,
        },
        {
            "rowId": "r-credit-001",
            "poolId": "credit",
            "targetId": "001",
            "shareBasisPoints": 5000,
        },
        {
            "rowId": "r-credit-002",
            "poolId": "credit",
            "targetId": "002",
            "shareBasisPoints": 5000,
        },
        {
            "rowId": "r-zero-001",
            "poolId": "zero",
            "targetId": "001",
            "shareBasisPoints": 10000,
        },
        {
            "rowId": "r-fractional-001",
            "poolId": "fractional",
            "targetId": "001",
            "shareBasisPoints": 3333,
        },
        {
            "rowId": "r-fractional-002",
            "poolId": "fractional",
            "targetId": "002",
            "shareBasisPoints": 6667,
        },
    ],
    "outputRows": [
        {
            "rowId": "o-1",
            "outputLineId": "l-1",
            "poolId": "balanced",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "6000",
        },
        {
            "rowId": "o-2",
            "outputLineId": "l-2",
            "poolId": "balanced",
            "targetId": "002",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "4000",
        },
        {
            "rowId": "o-3",
            "outputLineId": "l-3",
            "poolId": "dropped",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "50",
        },
        {
            "rowId": "o-4",
            "outputLineId": "l-4",
            "poolId": "excess",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "120",
        },
        {
            "rowId": "o-5",
            "outputLineId": "same-line",
            "poolId": "duplicate",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "o-6",
            "outputLineId": "same-line",
            "poolId": "duplicate",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "o-7",
            "outputLineId": "l-7",
            "poolId": "scope",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "o-8",
            "outputLineId": "l-8",
            "poolId": "scope",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "EUR",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "o-9",
            "outputLineId": "l-9",
            "poolId": "scope",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "effective",
            "amountMinor": "100",
        },
        {
            "rowId": "o-10",
            "outputLineId": "l-10",
            "poolId": "scope",
            "targetId": "001",
            "periodId": "2026-08",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "100",
        },
        {
            "rowId": "o-11",
            "outputLineId": "l-11",
            "poolId": "credit",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "-51",
        },
        {
            "rowId": "o-12",
            "outputLineId": "l-12",
            "poolId": "credit",
            "targetId": "002",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "-50",
        },
        {
            "rowId": "o-13",
            "outputLineId": "l-13",
            "poolId": "zero",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "0",
        },
        {
            "rowId": "o-14",
            "outputLineId": "l-14",
            "poolId": "fractional",
            "targetId": "001",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "0",
        },
        {
            "rowId": "o-15",
            "outputLineId": "l-15",
            "poolId": "fractional",
            "targetId": "002",
            "periodId": "2026-09",
            "currency": "USD",
            "costBasis": "billed",
            "amountMinor": "1",
        },
    ],
    "poolCsv": "",
    "ruleCsv": "",
    "outputCsv": "",
    "poolColumns": {
        "rowId": "rowId",
        "poolId": "poolId",
        "periodId": "periodId",
        "currency": "currency",
        "costBasis": "costBasis",
        "amountMinor": "amountMinor",
    },
    "ruleColumns": {
        "rowId": "rowId",
        "poolId": "poolId",
        "targetId": "targetId",
        "shareBasisPoints": "shareBasisPoints",
    },
    "outputColumns": {
        "rowId": "rowId",
        "outputLineId": "outputLineId",
        "poolId": "poolId",
        "targetId": "targetId",
        "periodId": "periodId",
        "currency": "currency",
        "costBasis": "costBasis",
        "amountMinor": "amountMinor",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("h_murdock/shared-cost-allocation-balance-evidence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "allocationCoverage": "complete",
  "toleranceMinor": 0,
  "poolRows": [
    {
      "rowId": "p-balanced",
      "poolId": "balanced",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "10000"
    },
    {
      "rowId": "p-dropped",
      "poolId": "dropped",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "p-excess",
      "poolId": "excess",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "p-duplicate",
      "poolId": "duplicate",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "p-scope",
      "poolId": "scope",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "p-credit",
      "poolId": "credit",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "-101"
    },
    {
      "rowId": "p-zero",
      "poolId": "zero",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "0"
    },
    {
      "rowId": "p-fractional",
      "poolId": "fractional",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "1"
    }
  ],
  "ruleRows": [
    {
      "rowId": "r-balanced-001",
      "poolId": "balanced",
      "targetId": "001",
      "shareBasisPoints": 6000
    },
    {
      "rowId": "r-balanced-002",
      "poolId": "balanced",
      "targetId": "002",
      "shareBasisPoints": 4000
    },
    {
      "rowId": "r-dropped-001",
      "poolId": "dropped",
      "targetId": "001",
      "shareBasisPoints": 5000
    },
    {
      "rowId": "r-dropped-002",
      "poolId": "dropped",
      "targetId": "002",
      "shareBasisPoints": 5000
    },
    {
      "rowId": "r-excess-001",
      "poolId": "excess",
      "targetId": "001",
      "shareBasisPoints": 10000
    },
    {
      "rowId": "r-duplicate-001",
      "poolId": "duplicate",
      "targetId": "001",
      "shareBasisPoints": 10000
    },
    {
      "rowId": "r-scope-001",
      "poolId": "scope",
      "targetId": "001",
      "shareBasisPoints": 10000
    },
    {
      "rowId": "r-credit-001",
      "poolId": "credit",
      "targetId": "001",
      "shareBasisPoints": 5000
    },
    {
      "rowId": "r-credit-002",
      "poolId": "credit",
      "targetId": "002",
      "shareBasisPoints": 5000
    },
    {
      "rowId": "r-zero-001",
      "poolId": "zero",
      "targetId": "001",
      "shareBasisPoints": 10000
    },
    {
      "rowId": "r-fractional-001",
      "poolId": "fractional",
      "targetId": "001",
      "shareBasisPoints": 3333
    },
    {
      "rowId": "r-fractional-002",
      "poolId": "fractional",
      "targetId": "002",
      "shareBasisPoints": 6667
    }
  ],
  "outputRows": [
    {
      "rowId": "o-1",
      "outputLineId": "l-1",
      "poolId": "balanced",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "6000"
    },
    {
      "rowId": "o-2",
      "outputLineId": "l-2",
      "poolId": "balanced",
      "targetId": "002",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "4000"
    },
    {
      "rowId": "o-3",
      "outputLineId": "l-3",
      "poolId": "dropped",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "50"
    },
    {
      "rowId": "o-4",
      "outputLineId": "l-4",
      "poolId": "excess",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "120"
    },
    {
      "rowId": "o-5",
      "outputLineId": "same-line",
      "poolId": "duplicate",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-6",
      "outputLineId": "same-line",
      "poolId": "duplicate",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-7",
      "outputLineId": "l-7",
      "poolId": "scope",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-8",
      "outputLineId": "l-8",
      "poolId": "scope",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "EUR",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-9",
      "outputLineId": "l-9",
      "poolId": "scope",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "effective",
      "amountMinor": "100"
    },
    {
      "rowId": "o-10",
      "outputLineId": "l-10",
      "poolId": "scope",
      "targetId": "001",
      "periodId": "2026-08",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "100"
    },
    {
      "rowId": "o-11",
      "outputLineId": "l-11",
      "poolId": "credit",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "-51"
    },
    {
      "rowId": "o-12",
      "outputLineId": "l-12",
      "poolId": "credit",
      "targetId": "002",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "-50"
    },
    {
      "rowId": "o-13",
      "outputLineId": "l-13",
      "poolId": "zero",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "0"
    },
    {
      "rowId": "o-14",
      "outputLineId": "l-14",
      "poolId": "fractional",
      "targetId": "001",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "0"
    },
    {
      "rowId": "o-15",
      "outputLineId": "l-15",
      "poolId": "fractional",
      "targetId": "002",
      "periodId": "2026-09",
      "currency": "USD",
      "costBasis": "billed",
      "amountMinor": "1"
    }
  ],
  "poolCsv": "",
  "ruleCsv": "",
  "outputCsv": "",
  "poolColumns": {
    "rowId": "rowId",
    "poolId": "poolId",
    "periodId": "periodId",
    "currency": "currency",
    "costBasis": "costBasis",
    "amountMinor": "amountMinor"
  },
  "ruleColumns": {
    "rowId": "rowId",
    "poolId": "poolId",
    "targetId": "targetId",
    "shareBasisPoints": "shareBasisPoints"
  },
  "outputColumns": {
    "rowId": "rowId",
    "outputLineId": "outputLineId",
    "poolId": "poolId",
    "targetId": "targetId",
    "periodId": "periodId",
    "currency": "currency",
    "costBasis": "costBasis",
    "amountMinor": "amountMinor"
  }
}' |
apify call h_murdock/shared-cost-allocation-balance-evidence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,h_murdock/shared-cost-allocation-balance-evidence"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YLyv5BoPLwWT71M4q/builds/Ez3jpsbsKPCJOKOQk/openapi.json
