# USPS Shipping Adjustment Audit — eBay & Pirate Ship Disputes (`goldenrod_serrano/usps-shipping-adjustment-audit`) Actor

Upload your eBay Transaction report or Pirate Ship CSV: lists every USPS carrier adjustment (APV), the amount, entered vs measured weight and size, DIM-weight math check, 60-day dispute deadline and per-order dispute points. One-page summary + CSV. Pay per adjustment.

- **URL**: https://apify.com/goldenrod_serrano/usps-shipping-adjustment-audit.md
- **Developed by:** [Paopao Studio](https://apify.com/goldenrod_serrano) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $35.00 / 1,000 adjustment auditeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## USPS Shipping Adjustment Audit — eBay & Pirate Ship Label Disputes

USPS weighs and measures parcels after you ship (**Automated Package Verification, APV**) and charges your label account when it thinks you underpaid. Sellers see lines like *"Shipping Label Underpaid Adjustment"* on eBay or *Carrier Adjustments* on Pirate Ship — sometimes for a parcel USPS says weighed four or five times what it did.

From **17 January 2027** USPS plans to add a **Repricing Fee of 20% of the underpayment** on top of every such correction (and keep 20% of refunds for overpayments) — filed with the Postal Regulatory Commission on 12 Nov 2026, **Docket CP2027-1**, still subject to PRC review. Wrong-looking adjustments are about to get more expensive.

This Actor reads the CSV you already download from eBay or Pirate Ship and gives you, in one run:

- **every carrier adjustment** in the file, with amount, date and order / tracking number;
- **entered vs USPS-measured weight and size**, side by side, with the weight ratio;
- a **DIM-weight and rounding math check** using the current USPS rules (L × W × H ÷ 139 over 1 cubic foot, dimensions rounded up to the inch, weight rounded up to the pound, cubic tiers rounded down to ¼ inch);
- the **60-day dispute deadline** for each adjustment (USPS counts from the notification date) — *open*, *closing soon* or *expired*;
- **per-order dispute points** you can paste into the USPS / Pirate Ship dispute form, and a strength label (*strong / medium / weak / needs details*);
- a **one-page summary**: total charged, still disputable, worth disputing, what the same adjustments would cost with the proposed 2027 fee.

No login, no scraping, no browser — the Actor only reads the file you give it.

### Who it is for

- **eBay sellers** using eBay labels who keep seeing *Underpaid Adjustment* lines and want a list to dispute before the 60 days run out.
- **Pirate Ship shippers** who want their Carrier Adjustments checked against the USPS DIM-weight rules in bulk.
- **Small shops and bookkeepers** who need a monthly number: how much did APV cost us, and how much of it is disputable?

Parcel-audit companies typically work for large UPS/FedEx accounts on a share of what they recover; this tool is a self-serve check for USPS label sellers who ship tens or hundreds of parcels, not tens of thousands.

### Quick start

1. Click **Start** with no file → free **synthetic sample** (not charged): three invented files in eBay, Pirate Ship and adjustment-detail layouts, 15 adjustments. Every row is clearly marked `synthetic_sample: true`.
2. Download your file:
   - **eBay**: Seller Hub → Payments → Reports → **Transaction report** (CSV). For weights and sizes, also copy the *Shipping Cost Adjustments* section of **Manage shipping labels** into a sheet (see *Adjustment detail* below).
   - **Pirate Ship**: Reports → **Carrier Adjustments** → Export (best: it has entered vs actual weight and size), or Reports → **Transaction History** → Export.
3. Upload it in **Upload CSV** (or give a direct CSV link / paste the text) and run. Each adjustment row found is one `adjustment-audited` event.

```json
{
  "csvUrls": ["https://example.com/my-pirate-ship-carrier-adjustments.csv"],
  "asOfDate": "2026-11-16"
}
```

### Supported layouts

| Layout | What it gives | Detected by |
|---|---|---|
| **eBay Transaction report** | Adjustment amount, date, order number, item, and the original label cost on the same order (adjustment as % of label) | `Type`, `Net amount`, `Order number` / `Transaction creation date` |
| **Pirate Ship Transaction History** (`Date, Type, Description, Total, Balance`) | Adjustment amount, date, tracking number when it is in the description | the five columns |
| **Adjustment detail** — Pirate Ship *Carrier Adjustments* export, or any sheet | Full audit: entered vs measured weight, size, package, zone, ZIP, old/new cost, dispute status | columns like *Old/Entered/Original Weight* + *Actual/New/Measured Weight* |

Column names are matched by alias (e.g. `Entered Weight (oz)`, `Old Weight`, `Declared weight`; `Actual Dimensions`, `Measured Length` …), preamble lines above the header are skipped, comma / semicolon / tab are all fine. See `SOURCES.md` for where each layout comes from and what is not confirmed.

### Example output (one adjustment, from the synthetic sample)

| Field | Value |
|---|---|
| tracking_number | 9400100000000000000202 *(synthetic)* |
| adjustment_usd | 2.55 (24.5% of the $10.40 label) |
| declared → assessed weight | 2 lb 3 oz → 2 lb 9 oz |
| declared → assessed size | 12 × 10 × 6 in → 12 × 10 × 6 in |
| billable lb (entered / measured) | 3 / 3 |
| dispute_deadline | 2027-01-03 (`open`, counted from the transaction date) |
| dispute_strength | **strong** |
| dispute_points | "Both weights round up to the same 3 lb (DMM 223.1.1) and DIM weight did not change, so weight alone should not change the price." · "Both sizes are under 1 cubic foot … no DIM weight applies" · "Not in this file: USPS Revenue Assurance ID." |
| proposed_2027_repricing_fee_usd | 0.51 |

Summary of the whole synthetic sample: 15 adjustments, $89.45 charged, $73.00 still inside the dispute window, 6 worth disputing ($28.31), $17.89 extra under the proposed 2027 fee.

Outputs: dataset (one row per adjustment + one `summary` row; view **Adjustments**), and in the key-value store **REPORT.html** (one page, printable), **REPORT.md**, **ADJUSTMENTS.csv**, **SUMMARY.json**.

### How the dispute points are worked out

| Check | Rule (source) |
|---|---|
| DIM weight | Over 1,728 cu in: each side rounded **up** to the inch, L×W×H ÷ **139**, rounded up (USPS DMM 223.1.4, rev. 12 Jul 2026) |
| Rated weight | Any fraction of a pound rounds up (DMM 223.1.1) — 2 lb 3 oz and 2 lb 9 oz are both 3 lb |
| Cubic tier | Each side rounded **down** to ¼ inch, ÷ 1728 (DMM 223.1.3.3) |
| Billable weight | max(rated weight, DIM weight) for entered and measured values |
| Big weight gap | Measured ≥ 1.5× or ≥ 3× entered — USPS reviews scan data and images when you dispute (USPS APV FAQ) |
| Lighter but dearer | Possible on Ground Advantage weight/zone steps (Pirate Ship support) — check before disputing |
| Package / zone / ZIP changed | Listed as the likely reason; dispute only if the label was right |
| Deadline | 60 days from the notification (USPS Verify Postage page; Pirate Ship: USPS 60, UPS 120) |
| Duplicates | Two adjustments on one order / tracking number are flagged |
| Where to dispute | eBay labels: USPS at apvdisputes.usps.com with Revenue Assurance ID + tracking (eBay Seller Center FAQ, USPS APV FAQ). Pirate Ship: *Dispute this adjustment* on the shipment page |

`dispute_strength` is an indicator from your own numbers and the published rules — **not a prediction** of how USPS will decide.

### Input

| Field | What it does |
|---|---|
| `csvFile` | Upload a CSV (or the key of a record in the run's key-value store) |
| `csvUrls` | One or more direct CSV links |
| `csvText` | Paste CSV text |
| `format` | `auto` (default), `ebay_transactions`, `pirateship_transactions`, `adjustment_detail` |
| `asOfDate` | Date for the 60-day deadline (default today, UTC) |
| `defaultWeightUnit` | `lb` / `oz` for bare numbers when the column name has no unit |
| `includeCredits` | List overpaid-postage credits too (default true) |
| `maxAdjustments` | Safety cap (default 5,000) |
| `sampleMode` | Free synthetic sample when no file is given (default true; ignored once you give a file) |

### Pricing (pay per event)

One event: **`adjustment-audited`** — one carrier adjustment row found in your file and audited.

| Your Apify plan tier | Price per adjustment |
|---|---|
| Free (list price) | **$0.05** |
| Bronze | $0.045 |
| Silver | $0.04 |
| Gold / Platinum / Diamond | $0.035 |

Sales, ordinary label rows, refunds of unused labels, payouts, the summary, the reports and the synthetic sample are **never charged**. No start fee. A month with 40 adjustments costs about **$2**; a single $5 dispute won back pays for 100 audited rows.

### FAQ

**Is my file stored or shared?** It is read inside your own Apify run; outputs go to your run's dataset and key-value store, which only you can see unless you share them.

**Why does my eBay file show "needs_details"?** eBay's Transaction report has the amount and order but not USPS's measured weight/size or the Revenue Assurance ID. Copy those from Manage shipping labels into a small sheet (columns like *Order number, Tracking number, Entered weight, Actual weight, Entered dimensions, Actual dimensions, Adjustment*) and run it as `adjustment_detail`.

**Does it file disputes for me?** No. It tells you which ones look worth filing, until when, and what to say. You file them on apvdisputes.usps.com or Pirate Ship.

**Does the 20% Repricing Fee apply now?** No. It is proposed in PRC Docket CP2027-1 with a planned start of 17 Jan 2027 and may change in review. The Actor shows what it *would* add to the same underpayments.

**UPS / FedEx?** UPS adjustments in a Pirate Ship file are listed with the 120-day window; the DIM rules applied are USPS's, so treat UPS rows as a list, not an audit.

### Limitations

- The exact column names of Pirate Ship's Carrier Adjustments export and the exact `Type` text of adjustment rows are not published; the Actor matches aliases and adjustment keywords. If your file is not recognised, set `format` and check the `columns_used` / `columns_ignored` lists in the summary.
- Deadlines are counted from the transaction date unless your file has a notification date column; the real notification can be a few days later.
- Rate tables are not included: the Actor checks whether the *rated characteristics* changed, not the exact postage for each zone.
- The bundled sample files are **synthetic** (invented); they imitate the layouts, they are not real exports.

### Sources

Every rule is cited with a link and check date in `SOURCES.md` (USPS DMM 123/223, USPS APV FAQ and Verify Postage page, PRC Docket CP2027-1 notice, eBay Seller Center Shipping FAQ, Pirate Ship Support).

### Related Actors by PaoPao Studio

- [EU CBAM Cost Calculator](https://apify.com/goldenrod_serrano/cbam-cost-calculator) — CBAM certificate cost per CN code, default values vs actual data.
- [Shopify → QuickBooks Online Reconciliation](https://apify.com/goldenrod_serrano/shopify-qbo-reconciliation) — file-only reconciliation report for finance teams.
- [SEC Form D Scraper](https://apify.com/goldenrod_serrano/sec-form-d-funding-signals) — new US private placements from SEC EDGAR Form D filings.

### Disclaimer

Indicators computed from your own file and published USPS, eBay and Pirate Ship rules. **Not legal advice**, not tax or accounting advice, and not a prediction of any dispute outcome. PaoPao Studio is not affiliated with USPS, eBay or Pirate Ship. Check the figures in your label account before you dispute.

### Changelog

- **0.1.0** — First release: eBay Transaction report, Pirate Ship Transaction History, adjustment-detail sheets; DIM ÷139 / rounding / cubic checks; 60-day window; dispute points; 2027 Repricing Fee estimate; PPE `adjustment-audited`; free synthetic sample.

# Actor input Schema

## `csvFile` (type: `string`):

Upload one CSV export (eBay Seller Hub > Payments > Reports > Transaction report, or Pirate Ship > Reports > Transaction History / Carrier Adjustments > Export). You can also enter the key of a record in this run's default key-value store.

## `csvUrls` (type: `array`):

Direct download links to CSV files (e.g. a Google Sheets 'publish to web as CSV' link or a Dropbox direct link). Several files can be audited in one run.

## `csvText` (type: `string`):

Paste the CSV content including the header row.

## `format` (type: `string`):

Leave on auto unless detection picks the wrong layout.

## `asOfDate` (type: `string`):

Date used for the 60-day USPS dispute window (YYYY-MM-DD). Default: today (UTC).

## `defaultWeightUnit` (type: `string`):

Used only when a weight cell has no unit and the column name does not say lb or oz.

## `includeCredits` (type: `boolean`):

List refunds of overpaid postage too (each listed credit is one adjustment-audited event).

## `maxAdjustments` (type: `integer`):

Safety cap. The run stops before charging if the file holds more adjustments.

## `sampleMode` (type: `boolean`):

When no file is given, run the built-in SYNTHETIC eBay + Pirate Ship + adjustment-detail sample files (invented data, clearly labelled). Ignored as soon as you upload or link a file.

## Actor input object example

```json
{
  "csvUrls": [],
  "format": "auto",
  "defaultWeightUnit": "lb",
  "includeCredits": true,
  "maxAdjustments": 5000,
  "sampleMode": true
}
```

# Actor output Schema

## `adjustments` (type: `string`):

Per-adjustment audit with dispute points.

## `reportHtml` (type: `string`):

REPORT.html in the default key-value store.

## `adjustmentsCsv` (type: `string`):

ADJUSTMENTS.csv in the default key-value store.

## `summaryJson` (type: `string`):

SUMMARY.json in the default key-value store.

# 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 = {
    "csvUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("goldenrod_serrano/usps-shipping-adjustment-audit").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 = { "csvUrls": [] }

# Run the Actor and wait for it to finish
run = client.actor("goldenrod_serrano/usps-shipping-adjustment-audit").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 '{
  "csvUrls": []
}' |
apify call goldenrod_serrano/usps-shipping-adjustment-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,goldenrod_serrano/usps-shipping-adjustment-audit"
        }
    }
}
```

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/rVaHpg6Xl1MmuODqz/builds/i1sCid961pqK8S3wy/openapi.json
