# Parcel Billable Weight Evidence Report (`h_murdock/parcel-billable-weight-evidence`) Actor

Compare declared and audited parcel dimensions, exact dimensional and actual billable weights, and supplied invoice weights under caller rounding/divisor policies. Trace changes and missing evidence in CSV, JSON and HTML; no carrier credentials or refund claims.

- **URL**: https://apify.com/h_murdock/parcel-billable-weight-evidence.md
- **Developed by:** [Gilad Ronen](https://apify.com/h_murdock) (community)
- **Categories:** E-commerce, 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

## Parcel Billable Weight Evidence Report

Compare a batch of supplied parcel measurements and invoice billed weights under your own explicit calculation policy. The report separates dimensional arithmetic, actual weight, changes between declared and audited measurements, and invoice comparison differences. It provides source references for review without carrier account credentials.

Use it after a packing measurement review or when a batch of weight adjustments arrives. Upload normalized arrays or mapped CSV exports, declare the applicable units and rounding rules, then inspect the complete report and download evidence for your shipping team. A later batch is a new report.

### What the report calculates

For each resolved measurement basis, the Actor rounds each dimension according to your policy, multiplies the rounded length, width and height, and divides that volume by your dimensional divisor. It rounds both actual and dimensional weight up to your billable weight increment, then takes the greater result. Arithmetic uses exact decimal and rational values; a nonterminating dimensional result appears as a fraction such as `768/139`, rather than a rounded approximation. Final billable weights are exact decimal strings.

Invoice weight is compared separately against declared and audited calculations. The signed difference is invoice weight minus computed weight. A difference equal to the declared tolerance is within tolerance. The report also shows whether supplied dimensions or actual weights changed, even when both measurements yield the same billable weight.

The included synthetic example has four packages: an actual-weight-dominant package with changed measurements and invoice differences, a matching actual-weight-dominant package, a matching dimensional-weight-dominant package, and a package with missing required evidence. The example policy is illustrative and is not an authoritative carrier billing rule.

### Input

Provide `snapshotId`, `requiredBases`, `evidenceCoverage`, `csvDelimiter`, and a `policies` array. Each policy needs a unique `scopeId`, `policyRef`, `dimensionUnit` (`in` or `cm`), `weightUnit` (`lb` or `kg`), `dimensionalDivisor`, `dimensionRounding` (`none`, `ceil`, or `nearest-half-up`), `dimensionIncrement`, `billableWeightIncrement`, and `tolerance`. The divisor must have the units of your chosen dimension unit cubed per chosen weight unit. There is no implicit divisor or carrier selection. Dimension rounding `none` preserves the original measurements and ignores the supplied positive dimension increment. Nearest-half-up rounds exact halfway values upward; it may quantize a very small positive dimension to zero. These are arithmetic policies, not validations of physical package size.

Measurement rows require `recordId`, `packageId`, `scopeId`, `basis` (`declared` or `audited`), `length`, `width`, `height`, `dimensionUnit`, `actualWeight`, `weightUnit`, `recordedAt`, and `sourceReference`. Invoice rows require `recordId`, `packageId`, `scopeId`, `billedWeight`, `weightUnit`, and `sourceReference`. Timestamps must be real UTC timestamps in `YYYY-MM-DDTHH:mm:ss[.sss]Z` form. Identifiers are literal strings, preserving leading zeroes; omit customer names and addresses.

All arithmetic input values are decimal **strings** with a dot, at most six fractional places, and a maximum of `999999.999999`. Dimensions, divisors and increments must be positive. Weights and tolerance may be zero. No grouped numbers, signs, exponents or unit conversion are accepted. Each measurement and invoice unit must match its declared scope policy.

Supply `measurements` and `invoices` arrays, including explicit empty arrays when appropriate, or their corresponding `measurementsCsv` and `invoicesCsv` alternatives. Remove an array when supplying its CSV. Optional `measurementsColumns` and `invoicesColumns` map every canonical field to a distinct CSV header. UTF-8 BOM, quoted fields, and comma, semicolon or tab delimiters are supported. Duplicate or unknown headers, irregular rows and ambiguous numbers are rejected. Inputs are bounded to 4 MB and 5,000 combined policy, measurement and invoice records. At least one evidence row is required. Larger or unusually wide outputs may exceed the report limits; split those batches.

### Evidence, uncertainty and downloads

Repeated package/basis measurements remain unresolved, including identical repeated rows. Duplicate invoice rows are not summed or selected. Repeated record IDs or policy scopes are rejected. A package appearing in different scopes cannot be joined across those scopes. Missing policies, invoice weights or caller-required measurement bases remain unknown; missing optional bases are marked not provided. Incomplete or unknown batch coverage prevents an overall consistent conclusion.

One dataset item contains the complete report, package evidence rows, policy snapshot and traceable findings. Download full JSON, flat parcel CSV, findings CSV, and standalone HTML. CSV cells neutralize spreadsheet formula prefixes; HTML escapes supplied text and uses no external resources. Source references identify the original array position or CSV record and retain your own evidence reference. Cloud input and results are stored by Apify; use only exports you are authorized to process.

### Price and limits

The charge is **$0.25 per completed report**, with platform usage included. A report is generated and all export size limits are checked before its event is charged. Invalid inputs, insufficient event budget, or oversized reports produce no completed-report event. The full JSON must be under 8 MB and each export under 9 MB. A resumed run reuses its saved report and repairs partial exports without another dataset item or report charge, after checking input and saved-result integrity. A new run is a new billable report.

This Actor checks supplied arithmetic evidence. It does not validate physical measurements, confirm a carrier contract, calculate surcharges, zones, freight classes, shipping prices or refund entitlement, or identify fraud. A higher invoice weight may be explained by excluded rules or missing evidence. No PDF/OCR, carrier login, dispute submission, shipping purchase or account changes are performed. Human review is required before acting on findings.

# Actor input Schema

## `snapshotId` (type: `string`):

Opaque batch identifier; leading zeroes preserved. No customer names or addresses needed.

## `requiredBases` (type: `array`):

Declare which bases are required: declared, audited, or both. Missing required evidence is unresolved; missing optional evidence is not-provided. No runtime fallback.

## `evidenceCoverage` (type: `string`):

Caller declaration for this batch scope. Incomplete/unknown coverage prevents an overall consistent conclusion even if supplied rows agree.

## `csvDelimiter` (type: `string`):

Explicit delimiter for both optional CSV tables. Decimal values always use a dot and remain strings.

## `policies` (type: `array`):

One policy per scopeId: policyRef, dimensionUnit in/cm, weightUnit lb/kg, dimensionalDivisor, dimensionRounding none/ceil/nearest-half-up, dimensionIncrement, billableWeightIncrement, tolerance. All arithmetic values decimal strings <=999999.999999, <=6 fraction places. Divisor/increments positive; tolerance >=0. Divisor units must be dimensionUnit cubed per weightUnit; no automatic carrier choice or conversion. Weight rounding is always ceiling to the declared billable increment; dimensionIncrement ignored only when none. Required explicit policy, no defaults.

## `measurements` (type: `array`):

Each row: recordId, packageId, scopeId, basis declared/audited, length, width, height, dimensionUnit in/cm, actualWeight, weightUnit lb/kg, recordedAt real UTC YYYY-MM-DDTHH:mm:ss\[.sss]Z, sourceReference. Dimensions positive; actualWeight nonnegative. All numeric quantities decimal strings <=999999.999999 with <=6 decimal places. Units must exactly match scope policy. Repeated package/basis is unresolved, even identical rows. Unique record IDs within table. Supply array (including \[] when empty) OR nonempty CSV, never both. At least one evidence row combined. Max5,000 combined records including policies; JSON <=4 MB. Opaque IDs are literal strings without surrounding whitespace/control characters.

## `measurementsCsv` (type: `string`):

Optional mapped CSV alternative. REMOVE the corresponding array when entering CSV. UTF-8 BOM/quoted fields accepted; empty/duplicate/unknown headers, ragged rows and malformed decimals rejected. No URLs fetched.

## `measurementsColumns` (type: `object`):

Map EVERY canonical field (recordId, packageId, scopeId, basis, length, width, height, dimensionUnit, actualWeight, weightUnit, recordedAt, sourceReference) to a distinct CSV header. Omit for canonical headers. Custom mapping requires CSV; canonical mapping is harmless with arrays.

## `invoices` (type: `array`):

Each row: recordId, packageId, scopeId, billedWeight (nonnegative decimal string <=999999.999999, <=6 fractional places), weightUnit lb/kg, sourceReference. Units must match scope policy. Repeated package invoices are unresolved, never summed. Unique record IDs within table. No PDF/OCR or currency amounts. Supply array (including \[] when empty) OR nonempty CSV, never both. At least one evidence row combined. Max5,000 combined records including policies; JSON <=4 MB. Opaque IDs are literal strings without surrounding whitespace/control characters.

## `invoicesCsv` (type: `string`):

Optional mapped CSV alternative. REMOVE the corresponding array when entering CSV. UTF-8 BOM/quoted fields accepted; empty/duplicate/unknown headers, ragged rows and malformed decimals rejected. No URLs fetched.

## `invoicesColumns` (type: `object`):

Map EVERY canonical field (recordId, packageId, scopeId, billedWeight, weightUnit, sourceReference) to a distinct CSV header. Omit for canonical headers. Custom mapping requires CSV; canonical mapping is harmless with arrays.

## Actor input object example

```json
{
  "snapshotId": "parcel-batch-001",
  "requiredBases": [
    "declared",
    "audited"
  ],
  "evidenceCoverage": "complete",
  "csvDelimiter": ",",
  "policies": [
    {
      "scopeId": "example-policy",
      "policyRef": "Caller example only: no carrier contract claim",
      "dimensionUnit": "in",
      "weightUnit": "lb",
      "dimensionalDivisor": "139",
      "dimensionRounding": "ceil",
      "dimensionIncrement": "1",
      "billableWeightIncrement": "1",
      "tolerance": "0"
    }
  ],
  "measurements": [
    {
      "recordId": "0001-declared",
      "packageId": "0001",
      "scopeId": "example-policy",
      "basis": "declared",
      "length": "4",
      "width": "48",
      "height": "4",
      "dimensionUnit": "in",
      "actualWeight": "9",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0001/declared"
    },
    {
      "recordId": "0001-audited",
      "packageId": "0001",
      "scopeId": "example-policy",
      "basis": "audited",
      "length": "5",
      "width": "49",
      "height": "5",
      "dimensionUnit": "in",
      "actualWeight": "9",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0001/audited"
    },
    {
      "recordId": "0002-declared",
      "packageId": "0002",
      "scopeId": "example-policy",
      "basis": "declared",
      "length": "1",
      "width": "1",
      "height": "1",
      "dimensionUnit": "in",
      "actualWeight": "100",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0002/declared"
    },
    {
      "recordId": "0002-audited",
      "packageId": "0002",
      "scopeId": "example-policy",
      "basis": "audited",
      "length": "1",
      "width": "1",
      "height": "1",
      "dimensionUnit": "in",
      "actualWeight": "100",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0002/audited"
    },
    {
      "recordId": "0003-declared",
      "packageId": "0003",
      "scopeId": "example-policy",
      "basis": "declared",
      "length": "20",
      "width": "20",
      "height": "20",
      "dimensionUnit": "in",
      "actualWeight": "2",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0003/declared"
    },
    {
      "recordId": "0003-audited",
      "packageId": "0003",
      "scopeId": "example-policy",
      "basis": "audited",
      "length": "20",
      "width": "20",
      "height": "20",
      "dimensionUnit": "in",
      "actualWeight": "2",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0003/audited"
    },
    {
      "recordId": "0004-declared",
      "packageId": "0004",
      "scopeId": "example-policy",
      "basis": "declared",
      "length": "10",
      "width": "10",
      "height": "10",
      "dimensionUnit": "in",
      "actualWeight": "4",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0004/declared"
    }
  ],
  "measurementsColumns": {
    "recordId": "recordId",
    "packageId": "packageId",
    "scopeId": "scopeId",
    "basis": "basis",
    "length": "length",
    "width": "width",
    "height": "height",
    "dimensionUnit": "dimensionUnit",
    "actualWeight": "actualWeight",
    "weightUnit": "weightUnit",
    "recordedAt": "recordedAt",
    "sourceReference": "sourceReference"
  },
  "invoices": [
    {
      "recordId": "invoice-0001",
      "packageId": "0001",
      "scopeId": "example-policy",
      "billedWeight": "40",
      "weightUnit": "lb",
      "sourceReference": "invoice-batch/0001"
    },
    {
      "recordId": "invoice-0002",
      "packageId": "0002",
      "scopeId": "example-policy",
      "billedWeight": "100",
      "weightUnit": "lb",
      "sourceReference": "invoice-batch/0002"
    },
    {
      "recordId": "invoice-0003",
      "packageId": "0003",
      "scopeId": "example-policy",
      "billedWeight": "58",
      "weightUnit": "lb",
      "sourceReference": "invoice-batch/0003"
    }
  ],
  "invoicesColumns": {
    "recordId": "recordId",
    "packageId": "packageId",
    "scopeId": "scopeId",
    "billedWeight": "billedWeight",
    "weightUnit": "weightUnit",
    "sourceReference": "sourceReference"
  }
}
```

# Actor output Schema

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

One complete report with package evidence and findings.

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

No description

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

No description

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

No description

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

Escaped standalone HTML; download and open locally.

# 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 = {
    "snapshotId": "parcel-batch-001",
    "requiredBases": [
        "declared",
        "audited"
    ],
    "evidenceCoverage": "complete",
    "csvDelimiter": ",",
    "policies": [
        {
            "scopeId": "example-policy",
            "policyRef": "Caller example only: no carrier contract claim",
            "dimensionUnit": "in",
            "weightUnit": "lb",
            "dimensionalDivisor": "139",
            "dimensionRounding": "ceil",
            "dimensionIncrement": "1",
            "billableWeightIncrement": "1",
            "tolerance": "0"
        }
    ],
    "measurements": [
        {
            "recordId": "0001-declared",
            "packageId": "0001",
            "scopeId": "example-policy",
            "basis": "declared",
            "length": "4",
            "width": "48",
            "height": "4",
            "dimensionUnit": "in",
            "actualWeight": "9",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0001/declared"
        },
        {
            "recordId": "0001-audited",
            "packageId": "0001",
            "scopeId": "example-policy",
            "basis": "audited",
            "length": "5",
            "width": "49",
            "height": "5",
            "dimensionUnit": "in",
            "actualWeight": "9",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0001/audited"
        },
        {
            "recordId": "0002-declared",
            "packageId": "0002",
            "scopeId": "example-policy",
            "basis": "declared",
            "length": "1",
            "width": "1",
            "height": "1",
            "dimensionUnit": "in",
            "actualWeight": "100",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0002/declared"
        },
        {
            "recordId": "0002-audited",
            "packageId": "0002",
            "scopeId": "example-policy",
            "basis": "audited",
            "length": "1",
            "width": "1",
            "height": "1",
            "dimensionUnit": "in",
            "actualWeight": "100",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0002/audited"
        },
        {
            "recordId": "0003-declared",
            "packageId": "0003",
            "scopeId": "example-policy",
            "basis": "declared",
            "length": "20",
            "width": "20",
            "height": "20",
            "dimensionUnit": "in",
            "actualWeight": "2",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0003/declared"
        },
        {
            "recordId": "0003-audited",
            "packageId": "0003",
            "scopeId": "example-policy",
            "basis": "audited",
            "length": "20",
            "width": "20",
            "height": "20",
            "dimensionUnit": "in",
            "actualWeight": "2",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0003/audited"
        },
        {
            "recordId": "0004-declared",
            "packageId": "0004",
            "scopeId": "example-policy",
            "basis": "declared",
            "length": "10",
            "width": "10",
            "height": "10",
            "dimensionUnit": "in",
            "actualWeight": "4",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0004/declared"
        }
    ],
    "measurementsCsv": "",
    "measurementsColumns": {
        "recordId": "recordId",
        "packageId": "packageId",
        "scopeId": "scopeId",
        "basis": "basis",
        "length": "length",
        "width": "width",
        "height": "height",
        "dimensionUnit": "dimensionUnit",
        "actualWeight": "actualWeight",
        "weightUnit": "weightUnit",
        "recordedAt": "recordedAt",
        "sourceReference": "sourceReference"
    },
    "invoices": [
        {
            "recordId": "invoice-0001",
            "packageId": "0001",
            "scopeId": "example-policy",
            "billedWeight": "40",
            "weightUnit": "lb",
            "sourceReference": "invoice-batch/0001"
        },
        {
            "recordId": "invoice-0002",
            "packageId": "0002",
            "scopeId": "example-policy",
            "billedWeight": "100",
            "weightUnit": "lb",
            "sourceReference": "invoice-batch/0002"
        },
        {
            "recordId": "invoice-0003",
            "packageId": "0003",
            "scopeId": "example-policy",
            "billedWeight": "58",
            "weightUnit": "lb",
            "sourceReference": "invoice-batch/0003"
        }
    ],
    "invoicesCsv": "",
    "invoicesColumns": {
        "recordId": "recordId",
        "packageId": "packageId",
        "scopeId": "scopeId",
        "billedWeight": "billedWeight",
        "weightUnit": "weightUnit",
        "sourceReference": "sourceReference"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("h_murdock/parcel-billable-weight-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 = {
    "snapshotId": "parcel-batch-001",
    "requiredBases": [
        "declared",
        "audited",
    ],
    "evidenceCoverage": "complete",
    "csvDelimiter": ",",
    "policies": [{
            "scopeId": "example-policy",
            "policyRef": "Caller example only: no carrier contract claim",
            "dimensionUnit": "in",
            "weightUnit": "lb",
            "dimensionalDivisor": "139",
            "dimensionRounding": "ceil",
            "dimensionIncrement": "1",
            "billableWeightIncrement": "1",
            "tolerance": "0",
        }],
    "measurements": [
        {
            "recordId": "0001-declared",
            "packageId": "0001",
            "scopeId": "example-policy",
            "basis": "declared",
            "length": "4",
            "width": "48",
            "height": "4",
            "dimensionUnit": "in",
            "actualWeight": "9",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0001/declared",
        },
        {
            "recordId": "0001-audited",
            "packageId": "0001",
            "scopeId": "example-policy",
            "basis": "audited",
            "length": "5",
            "width": "49",
            "height": "5",
            "dimensionUnit": "in",
            "actualWeight": "9",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0001/audited",
        },
        {
            "recordId": "0002-declared",
            "packageId": "0002",
            "scopeId": "example-policy",
            "basis": "declared",
            "length": "1",
            "width": "1",
            "height": "1",
            "dimensionUnit": "in",
            "actualWeight": "100",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0002/declared",
        },
        {
            "recordId": "0002-audited",
            "packageId": "0002",
            "scopeId": "example-policy",
            "basis": "audited",
            "length": "1",
            "width": "1",
            "height": "1",
            "dimensionUnit": "in",
            "actualWeight": "100",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0002/audited",
        },
        {
            "recordId": "0003-declared",
            "packageId": "0003",
            "scopeId": "example-policy",
            "basis": "declared",
            "length": "20",
            "width": "20",
            "height": "20",
            "dimensionUnit": "in",
            "actualWeight": "2",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0003/declared",
        },
        {
            "recordId": "0003-audited",
            "packageId": "0003",
            "scopeId": "example-policy",
            "basis": "audited",
            "length": "20",
            "width": "20",
            "height": "20",
            "dimensionUnit": "in",
            "actualWeight": "2",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0003/audited",
        },
        {
            "recordId": "0004-declared",
            "packageId": "0004",
            "scopeId": "example-policy",
            "basis": "declared",
            "length": "10",
            "width": "10",
            "height": "10",
            "dimensionUnit": "in",
            "actualWeight": "4",
            "weightUnit": "lb",
            "recordedAt": "2026-10-01T12:00:00Z",
            "sourceReference": "packing-review/0004/declared",
        },
    ],
    "measurementsCsv": "",
    "measurementsColumns": {
        "recordId": "recordId",
        "packageId": "packageId",
        "scopeId": "scopeId",
        "basis": "basis",
        "length": "length",
        "width": "width",
        "height": "height",
        "dimensionUnit": "dimensionUnit",
        "actualWeight": "actualWeight",
        "weightUnit": "weightUnit",
        "recordedAt": "recordedAt",
        "sourceReference": "sourceReference",
    },
    "invoices": [
        {
            "recordId": "invoice-0001",
            "packageId": "0001",
            "scopeId": "example-policy",
            "billedWeight": "40",
            "weightUnit": "lb",
            "sourceReference": "invoice-batch/0001",
        },
        {
            "recordId": "invoice-0002",
            "packageId": "0002",
            "scopeId": "example-policy",
            "billedWeight": "100",
            "weightUnit": "lb",
            "sourceReference": "invoice-batch/0002",
        },
        {
            "recordId": "invoice-0003",
            "packageId": "0003",
            "scopeId": "example-policy",
            "billedWeight": "58",
            "weightUnit": "lb",
            "sourceReference": "invoice-batch/0003",
        },
    ],
    "invoicesCsv": "",
    "invoicesColumns": {
        "recordId": "recordId",
        "packageId": "packageId",
        "scopeId": "scopeId",
        "billedWeight": "billedWeight",
        "weightUnit": "weightUnit",
        "sourceReference": "sourceReference",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("h_murdock/parcel-billable-weight-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 '{
  "snapshotId": "parcel-batch-001",
  "requiredBases": [
    "declared",
    "audited"
  ],
  "evidenceCoverage": "complete",
  "csvDelimiter": ",",
  "policies": [
    {
      "scopeId": "example-policy",
      "policyRef": "Caller example only: no carrier contract claim",
      "dimensionUnit": "in",
      "weightUnit": "lb",
      "dimensionalDivisor": "139",
      "dimensionRounding": "ceil",
      "dimensionIncrement": "1",
      "billableWeightIncrement": "1",
      "tolerance": "0"
    }
  ],
  "measurements": [
    {
      "recordId": "0001-declared",
      "packageId": "0001",
      "scopeId": "example-policy",
      "basis": "declared",
      "length": "4",
      "width": "48",
      "height": "4",
      "dimensionUnit": "in",
      "actualWeight": "9",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0001/declared"
    },
    {
      "recordId": "0001-audited",
      "packageId": "0001",
      "scopeId": "example-policy",
      "basis": "audited",
      "length": "5",
      "width": "49",
      "height": "5",
      "dimensionUnit": "in",
      "actualWeight": "9",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0001/audited"
    },
    {
      "recordId": "0002-declared",
      "packageId": "0002",
      "scopeId": "example-policy",
      "basis": "declared",
      "length": "1",
      "width": "1",
      "height": "1",
      "dimensionUnit": "in",
      "actualWeight": "100",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0002/declared"
    },
    {
      "recordId": "0002-audited",
      "packageId": "0002",
      "scopeId": "example-policy",
      "basis": "audited",
      "length": "1",
      "width": "1",
      "height": "1",
      "dimensionUnit": "in",
      "actualWeight": "100",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0002/audited"
    },
    {
      "recordId": "0003-declared",
      "packageId": "0003",
      "scopeId": "example-policy",
      "basis": "declared",
      "length": "20",
      "width": "20",
      "height": "20",
      "dimensionUnit": "in",
      "actualWeight": "2",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0003/declared"
    },
    {
      "recordId": "0003-audited",
      "packageId": "0003",
      "scopeId": "example-policy",
      "basis": "audited",
      "length": "20",
      "width": "20",
      "height": "20",
      "dimensionUnit": "in",
      "actualWeight": "2",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0003/audited"
    },
    {
      "recordId": "0004-declared",
      "packageId": "0004",
      "scopeId": "example-policy",
      "basis": "declared",
      "length": "10",
      "width": "10",
      "height": "10",
      "dimensionUnit": "in",
      "actualWeight": "4",
      "weightUnit": "lb",
      "recordedAt": "2026-10-01T12:00:00Z",
      "sourceReference": "packing-review/0004/declared"
    }
  ],
  "measurementsCsv": "",
  "measurementsColumns": {
    "recordId": "recordId",
    "packageId": "packageId",
    "scopeId": "scopeId",
    "basis": "basis",
    "length": "length",
    "width": "width",
    "height": "height",
    "dimensionUnit": "dimensionUnit",
    "actualWeight": "actualWeight",
    "weightUnit": "weightUnit",
    "recordedAt": "recordedAt",
    "sourceReference": "sourceReference"
  },
  "invoices": [
    {
      "recordId": "invoice-0001",
      "packageId": "0001",
      "scopeId": "example-policy",
      "billedWeight": "40",
      "weightUnit": "lb",
      "sourceReference": "invoice-batch/0001"
    },
    {
      "recordId": "invoice-0002",
      "packageId": "0002",
      "scopeId": "example-policy",
      "billedWeight": "100",
      "weightUnit": "lb",
      "sourceReference": "invoice-batch/0002"
    },
    {
      "recordId": "invoice-0003",
      "packageId": "0003",
      "scopeId": "example-policy",
      "billedWeight": "58",
      "weightUnit": "lb",
      "sourceReference": "invoice-batch/0003"
    }
  ],
  "invoicesCsv": "",
  "invoicesColumns": {
    "recordId": "recordId",
    "packageId": "packageId",
    "scopeId": "scopeId",
    "billedWeight": "billedWeight",
    "weightUnit": "weightUnit",
    "sourceReference": "sourceReference"
  }
}' |
apify call h_murdock/parcel-billable-weight-evidence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,h_murdock/parcel-billable-weight-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/bTdOblyzPOhyHQxOL/builds/4PgQpselyQWnRxM9c/openapi.json
