customs_docs /v1/customs-docs $0.50 / verified compile ($0 on 422 mismatch)

Commercial Invoice & Packing List Weight, Qty & Subtotal Reconciliation Guide

Eliminate customs holds and broker rework by deterministically reconciling line-item subtotals, gross vs net weights, and carton-to-invoice quantities before export dispatch.

Published Deterministic Rule

Every export Commercial Invoice and Packing List must satisfy 5 mathematical invariants: (1) sum(qty * unit_price) == declared_subtotal (±$0.01), (2) gross_weight_kg >= net_weight_kg > 0 on every SKU and carton, (3) sum(carton.qty) == sum(invoice.qty), (4) sum(carton.net_weight) == sum(invoice.net_weight) (±0.05 kg), and (5) zero vague descriptions.

Reference Data & Threshold Table

Reconciliation CheckToleranceCommon Customs Hold TriggerShip-Anything HTTP Response
Line Item Arithmetic±$0.01Declared total differs from sum(qty * price)HTTP 422 + $0 charged + exact error list
Gross vs Net WeightGross >= NetNet weight accidentally typed larger than GrossHTTP 422 + $0 charged + SKU line flagged
Carton vs Invoice QtyExact integer matchPacking List shows 195 pcs vs Invoice 200 pcsHTTP 422 + $0 charged + delta reported
Carton vs Invoice Net Weight±0.05 kgCarton net weight sum drifts from invoiceHTTP 422 + $0 charged + weight delta

Worked Numerical Before / After Example

Scenario: Exporting 200 CNC aluminum brackets ($12.50 each, 40.0 kg net / 44.0 kg gross) across 4 cartons under FOB Shenzhen.

Before: Manual spreadsheet typo enters 190 pcs on the Packing List while the Commercial Invoice lists 200 pcs, triggering a 4-day CBP exam hold ($650 exam fee + storage).

After: POST /v1/customs-docs blocks the mismatch immediately at HTTP 422 ($0 charged), lists the exact 10-unit discrepancy, and once corrected emits balanced printable HTML, JSON, CSV, and a SHA-256 verification digest.

Run Your Own Numbers Free in 5 Seconds

Zero registration needed · Flat prepaid packs ($29 / $99 / $249) · Zero percentage split · 0% commission on treg hub · $0 on HTTP 422.

Open Try-Now Calculator Read Markdown

Deterministic API & MCP Example

curl -fsSL -X POST "https://ship.fastmesh.dev/v1/customs-docs" \
  -H "Content-Type: application/json" \
  -d '{
  "invoice_number": "INV-2026-8801",
  "incoterm": "FOB",
  "currency": "USD",
  "shipper": {
    "name": "Shenzhen Precision Parts Co.",
    "address": "88 Nanshan Tech Park, Shenzhen",
    "country_iso2": "CN"
  },
  "consignee": {
    "name": "Pacific Hardware Distribution",
    "address": "400 Harbor Blvd, Long Beach, CA 90802",
    "country_iso2": "US"
  },
  "line_items": [
    {
      "sku": "ALU-BRKT-01",
      "description": "CNC Machined Aluminum Mounting Bracket",
      "hs_code": "7616995190",
      "origin_country_iso2": "CN",
      "quantity": 200,
      "unit_price": 12.5,
      "net_weight_kg": 40.0,
      "gross_weight_kg": 44.0
    }
  ],
  "cartons": [
    {
      "carton_no": "CTN-1-4",
      "sku": "ALU-BRKT-01",
      "quantity": 200,
      "net_weight_kg": 40.0,
      "gross_weight_kg": 44.0,
      "length_cm": 50,
      "width_cm": 40,
      "height_cm": 30
    }
  ],
  "declared_subtotal": 2500.0
}'

Frequently Asked Questions

Do I pay when /v1/customs-docs catches an error in my draft?

No. Any arithmetic, weight, HS code, or Incoterm error returns HTTP 422 with charged_micros: 0 and charged_usd: 0.0.

Is Ship-Anything a licensed customs broker?

No. Ship-Anything is independent document-reconciliation engineering tooling; it is not a law firm or licensed customs broker and does not provide legal advice.

Related Guides