.cart

July 24, 2026 · View on GitHub

.cart — an open, interoperable standard for ecommerce carts

.cart — An Open, Interoperable Standard for Ecommerce Carts

Status: v0.1 draft proposal. Feedback and pull requests welcome.

.cart is a proposed open file format (JSON, UTF-8) for describing the contents of an ecommerce shopping cart — the merchant, the line items, prices before and after VAT, shipping options, and the total awaiting payment — in a single portable, vendor-neutral file.

The problem

Shopping carts are ephemeral. They live in cookies and server-side sessions, tied to one vendor, one browser, one device. If you work in procurement or purchasing — assembling a BOM, collecting quotes, comparing suppliers — your "documents" are carts you hope will still be there tomorrow. There is no standard way to:

  • Save a cart and reopen it later, on another device, or hand it to a colleague
  • Compare the same basket of goods across vendors
  • Transform a cart into a purchase order or RFQ without retyping everything

Today, the state of the art is sending someone (or an AI agent) a screenshot of a cart and asking them to recreate it. That's inefficient, error-prone, and unnecessary.

The idea

With agentic AI, carts no longer need to be trapped in browser sessions. A browser-based agent or an MCP server can already read any cart page — what's missing is a standard format to write it to. That's what .cart is:

  • Export to cart — an agent serializes a live cart into a .cart file
  • Import a cart — re-populate a vendor's cart from a file
  • Compare carts — diff price, availability, and shipping across vendors or over time
  • Generate documents — turn a .cart into a purchase order or RFQ

The format is designed for agentic AI interoperability from the ground up: plain JSON, self-describing, tax-aware, with a JSON Schema for validation and an extensions mechanism so vendor-specific data is never lost.

Quick look

{
  "cart_version": "0.1",
  "merchant": { "name": "Example Industrial Supply Ltd.", "website": "https://…" },
  "currency": "ILS",
  "tax": { "scheme": "vat", "default_rate": 0.18, "prices_include_tax": false },
  "items": [
    {
      "sku": "BLT-M8X40-GALV-100",
      "name": "Hex bolt M8x40, galvanized (box of 100)",
      "quantity": 5,
      "unit_price_excl_tax": 42.00,
      "unit_price_incl_tax": 49.56,
      "line_total_excl_tax": 210.00,
      "line_total_incl_tax": 247.80
    }
  ],
  "totals": {
    "items_subtotal_excl_tax": 520.00,
    "shipping_incl_tax": 53.10,
    "tax_total": 101.70,
    "grand_total": 666.70,
    "amount_pending_payment": 666.70
  }
}

See the full worked example: examples/industrial-supplier.cart — a real-world-shaped B2B cart from an industrial supplier, captured by a browser agent and ready to be turned into a purchase order.

Downloads

The v0.1 spec is available as a typeset PDF and in machine-readable form. All are attached to the v0.1.0 release and served from the docs site's Downloads page.

DownloadFormatWhat it is
Specification PDFPDFThe complete spec, typeset, with the full data dictionary as an appendix
JSON SchemaJSON SchemaThe full spec in programmatic form — validate any .cart file against it
Data dictionaryJSONEvery field as structured data: path, type, required, profile, PII sensitivity
Data dictionaryCSVThe same data dictionary, spreadsheet-friendly
Example cart.cartA worked B2B cart from an industrial supplier

In this repository

PathWhat it is
SPEC.mdThe v0.1 specification — all fields, conventions, and semantics
schema/cart.schema.jsonJSON Schema (draft 2020-12) for validating .cart files
spec/data-dictionary.jsonMachine-readable data dictionary (canonical); data-dictionary.csv is generated from it
spec/cart-spec.typ · build-pdf.shTypst source and build script for the specification PDF
examples/Sample .cart files
docs/Docs site (MkDocs Material) — spec, data dictionary, schema, Incoterms® 2020, and the PO/RFQ standards mapping

📖 Browse the docs site: https://danielrosehill.github.io/Dot-Cart/

Use cases

  • B2C — save a cart, move it between devices, share it, price-watch it
  • B2B purchasing & procurement — capture carts as quote snapshots, compare suppliers on identical BOMs, generate purchase orders and RFQs from carts
  • Agentic tooling — MCP servers and browser agents that export, import, compare, and transform carts as first-class operations

Roadmap

  • v0.1 draft spec + JSON Schema + example
  • GitHub Pages site documenting the spec
  • Machine-readable data dictionary (JSON + CSV) and a typeset spec PDF
  • v0.1.0 release
  • Reference MCP server: export / import / compare .cart files
  • .cartpurchase order transformer (mapped to OASIS UBL Order / UN/CEFACT ORDERS)
  • .cartRFQ transformer (mapped to OASIS UBL RequestForQuotation / UN/CEFACT REQOTE)
  • v1.0 after community feedback

The PO and RFQ transformations are standardized in SPEC.md §9, which maps .cart fields onto existing open business-document standards rather than inventing new ones (ICC Incoterms® for delivery terms; UBL/UN-CEFACT for the documents themselves).

Contributing

This is a proposal — the spec is deliberately small and open questions are listed in SPEC.md §7. Open an issue to discuss, or a pull request to improve the spec, schema, or examples.

License

MIT — see LICENSE.