Functional Weave
Code in Rust

logistics.incoterm-responsibility@1.0.0

README.md

3,316 bytes · view raw

# logistics.incoterm-responsibility

Looks up an Incoterms rule: where the seller delivers (which is where risk
passes to the buyer), and which party pays for each stage of the journey. The
eleven rules of Incoterms 2020 are data; the function reads the row.

| rule | modes | risk passes | export clearance | main carriage | insurance | unloading at destination | import clearance and duties |
|---|---|---|---|---|---|---|---|
| EXW | any | seller's premises | buyer | buyer | none | buyer | buyer |
| FCA | any | handed to buyer's carrier | seller | buyer | none | buyer | buyer |
| CPT | any | handed to first carrier | seller | seller | none | buyer | buyer |
| CIP | any | handed to first carrier | seller | seller | seller, ICC (A) | buyer | buyer |
| DAP | any | destination | seller | seller | none | buyer | buyer |
| DPU | any | destination, unloaded | seller | seller | none | seller | buyer |
| DDP | any | destination | seller | seller | none | buyer | seller |
| FAS | sea | alongside ship | seller | buyer | none | buyer | buyer |
| FOB | sea | on board | seller | buyer | none | buyer | buyer |
| CFR | sea | on board | seller | seller | none | buyer | buyer |
| CIF | sea | on board | seller | seller | seller, ICC (C) | buyer | buyer |

Loading at the seller's premises is the buyer's under EXW and the seller's
under every other rule.

## What people get wrong

- **C rules move cost, not risk.** Under CPT, CIP, CFR and CIF the seller pays
  for the main carriage, but the goods travel at the buyer's risk from the
  moment they are handed to the first carrier or loaded on board. That is why
  the result has `riskPassesAtDestination` separately from `mainCarriage`.
- **Insurance "none" means no obligation**, not "uninsured". Under the other
  nine rules neither party must insure; whoever bears the risk usually does.
- **CIP and CIF differ in 2020.** CIP requires all-risks cover (Institute
  Cargo Clauses (A)); CIF still requires only the minimum, Clauses (C).
- **DPU replaced DAT** in 2020 and is the only rule where the seller unloads.
  `DAT` with edition 2020 is an error, as is an edition with no data.
- **Sea rules are for sea.** FAS, FOB, CFR and CIF are meant for goods loaded
  on a vessel, not for containers handed over at a terminal, where FCA, CPT
  and CIP fit better (ICC's own guidance).

Terminal handling and other charges at either end depend on the contract of
carriage as well as the rule; under the C rules, unloading charges the seller
paid under its contract of carriage are not recoverable from the buyer. This
capability reports the rule's default split, not a contract's.

## Editions are data

A contract names its edition ("FOB Incoterms 2020"), and older editions stay
in use for years, so the edition is an argument and not a date. Incoterms 2010
or a future edition would be new rows, not new code. The rule code must be the
capitals as ICC writes it.

## Sources

- International Chamber of Commerce, Incoterms 2020 (ICC publication 723E);
  overview and 2020 changes,
  https://iccwbo.org/business-solutions/incoterms-rules/incoterms-2020/
- UK Department for Business and Trade, "Choosing the right incoterms for your
  goods",
  https://www.great.gov.uk/advice/prepare-for-export-procedures-and-logistics/international-trade-contracts-and-incoterms/