API surface. Rate sheets, surcharges and pricing rules are managed over GraphQL Interface. Integrators see their effect on REST rates, through rate.pricing_details.
Carriers, 3PLs and fleets price their own networks. Universal implementers price custom or offline carriers, and mark up carrier rates. All of them need the same things: a tariff by service, zone and weight, surcharges, customer-specific deals, and a way to explain any price after the fact. The structure follows Karrio’s rate sheets, which have run in production for custom carriers: shared zones, shared surcharges, and service × zone rates in weight bands with both a sell rate and a cost. This class diagram shows how the pricing objects reference the catalog objects from chapter 14.

1. Rate sheet

Calculation (normative)

For each candidate service:
  1. Resolve zones with matchZone (GraphQL Interface mutation) (purpose pricing), for both ship_from and ship_to.
  2. Billable weight = max(actual, dimensional) per parcel, rounded per weight_rounding. Multi-parcel shipments are priced per parcel and summed, unless the sheet sets aggregate: "shipment".
  3. Find the band, compute the base charge, and apply min_charge.
  4. Apply every active surcharge whose conditions match, in order (fixed amounts first, then percentages), using each surcharge’s basis.
  5. Apply pricing_rules (§3), in priority order: the highest priority first, with ties broken by created.
  6. Emit a rate with pricing: "rate_sheet", the charges[] breakdown, and pricing_details.
pricing_details is part of the rate object in every mode where pricing is computed. It makes every price reproducible. This flowchart shows the normative calculation for one candidate service, and which step fills each part of pricing_details.

2. Surcharge

Option prices come from surcharges with conditions.options. The option object links back to them (chapter 14 §3). This flowchart shows how one surcharge turns into a charge line, including the schedule[] lookup by ship date.

3. Pricing rule

Pricing rules adjust a computed rate (in Carrier, 3PL and Fleet modes) or a carrier’s rate (in Universal and 3PL modes).
  • type is markup, discount, or override (which replaces the base with a fixed amount, for contract prices).
  • floor stops a discount or override from pushing price below cost plus a margin. It requires cost on the rate sheet, or the carrier cost in Universal mode.
  • visible: false folds the adjustment into the line it adjusts. visible: true emits a separate Charge (kind: "discount" or "adjustment").
  • In Universal mode, markups apply to carrier rates, and the rate’s pricing becomes implementer. The original carrier amount is kept in system_metadata.carrier_total, visible to owner accounts only.
This flowchart shows how each pricing rule is applied to a rate, in priority order.

4. Endpoints

  • simulate prices a shipment against a draft or pending version without publishing it. This is how tariff changes get tested before they go live.
  • The import templates (bands_v1, matrix_v1) are published with the spec, so carriers can hand the same spreadsheet to every implementer.
  • Events: rate_sheet.published, rate_sheet.retired, surcharge.updated, surcharge.schedule_updated, pricing_rule.created, pricing_rule.updated, pricing_rule.deleted.
This sequence shows a tariff change tested with simulate before it is published.