{"openapi":"3.1.0","info":{"title":"Cartomato catalog","version":"catalog-v1","description":"Household product catalog and Cartomato checkout. Checkout requires a private checkout identity or signed-in customer and configured direct offers. Never complete purchases at another retailer. Card, Link and optionally USDC stablecoin payments use Cartomato’s Stripe checkout."},"servers":[{"url":"https://cartomato.com"}],"paths":{"/catalog.json":{"get":{"operationId":"readCatalog","summary":"Read purchasable products, checked prices and checkout links","responses":{"200":{"description":"Products, reference prices and shopping lists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Catalog"}}}}}}},"/products/{slug}.json":{"get":{"operationId":"readProduct","summary":"Read one product and its Cartomato link","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","enum":["tide-original-125","tide-free-gentle-132","persil-original-ultra-pacs-100","bounty-select-a-size-mega-xl-6","brawny-tear-a-square-triple-6","dawn-ultra-original-38","glad-forceflex-fragrance-free-100"]}}],"responses":{"200":{"description":"Product with reference price","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"No product resource exists for this slug."}}}},"/api/products":{"get":{"operationId":"searchProducts","summary":"Find exact household products from a shopping request","description":"For example: I need laundry detergent. Refills mean replenishment; explicit brand, form, size, fragrance-free and HE constraints are retained. No matches means no supported product; do not substitute silently.","parameters":[{"name":"q","in":"query","description":"A natural-language request for one product type, such as fragrance-free HE liquid laundry detergent or 13-gallon kitchen trash bags. For a multi-item restock, search each product type separately, then combine the exact product IDs and package quantities with prepare_purchase or POST /api/purchase-plans. Preserve requested brand, package size, form and fragrance or HE requirements.","schema":{"type":"string"},"example":"I need laundry detergent"},{"name":"category","in":"query","schema":{"type":"string","enum":["laundry","paper","dish","trash"]}},{"name":"fragranceFree","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Matching products with purchase availability and labeled current or reference prices","content":{"application/json":{"schema":{"type":"object","required":["products"],"properties":{"products":{"type":"array","items":{"type":"object","required":["id","name","slug","size","priceCents","priceKind","commonCartCheckout"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string","description":"Open /products/{slug}/ for the Cartomato product page"},"size":{"type":"string"},"priceCents":{"type":"integer","description":"Item price in USD cents; priceKind identifies current checkout pricing or a historical reference estimate"},"priceKind":{"type":"string","enum":["current","reference"]},"purchasable":{"type":"boolean"},"checkoutAvailable":{"type":"boolean"},"commonCartCheckout":{"type":"boolean"}},"additionalProperties":true}}}}}}}}}},"/api/commerce":{"get":{"operationId":"getCommerceCapabilities","summary":"Read current purchase capabilities","responses":{"200":{"description":"Private authoritative agent order result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrder"}}}},"400":{"description":"Invalid input"},"401":{"description":"Sign-in required for customer checkout"},"408":{"description":"Request body timed out"},"409":{"description":"Product or price changed"},"413":{"description":"Request body exceeds 32 KiB"},"429":{"description":"Checkout quota exceeded; wait for Retry-After before retrying the same request"},"503":{"description":"Direct checkout is not configured"}}}},"/api/purchase-plans":{"post":{"operationId":"preparePurchase","summary":"Prepare a Cartomato shopping list without placing an order","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","additionalProperties":false,"required":["productId","quantity"],"properties":{"productId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":99}}}}}}}}},"responses":{"200":{"description":"Private authoritative agent order result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrder"}}}},"400":{"description":"Invalid input"},"401":{"description":"Sign-in required for customer checkout"},"408":{"description":"Request body timed out"},"409":{"description":"Product or price changed"},"413":{"description":"Request body exceeds 32 KiB"},"429":{"description":"Checkout quota exceeded; wait for Retry-After before retrying the same request"},"503":{"description":"Direct checkout is not configured"}}}},"/api/checkout/quote":{"post":{"operationId":"quoteCheckout","summary":"Quote configured direct-sale items","description":"Returns exact catalog items, current Stripe prices, priceCheckedAt and Cartomato’s merchant delivery estimate. Shipping cost and tax are finalized at hosted checkout.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","additionalProperties":false,"required":["productId","quantity"],"properties":{"productId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":99}}}}}}}}},"responses":{"200":{"description":"Private authoritative agent order result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrder"}}}},"400":{"description":"Invalid input"},"401":{"description":"Sign-in required for customer checkout"},"408":{"description":"Request body timed out"},"409":{"description":"Product or price changed"},"413":{"description":"Request body exceeds 32 KiB"},"429":{"description":"Checkout quota exceeded; wait for Retry-After before retrying the same request"},"503":{"description":"Direct checkout is not configured"}},"security":[{"checkoutIdentity":[]}]}},"/api/checkout-sessions":{"post":{"operationId":"createCheckout","summary":"Create an authorized customer’s hosted payment session","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items","expectedSubtotalCents","expectedQuoteId","idempotencyKey"],"properties":{"items":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","additionalProperties":false,"required":["productId","quantity"],"properties":{"productId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":99}}}},"expectedSubtotalCents":{"type":"integer"},"paymentMethod":{"type":"string","enum":["card","crypto"],"default":"card","description":"Choose crypto for USDC through Cartomato’s Stripe checkout when enabled; otherwise card or Link."},"expectedQuoteId":{"type":"string","pattern":"^[a-f0-9]{64}$"},"idempotencyKey":{"type":"string"}}}}}},"responses":{"200":{"description":"Private authoritative agent order result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrder"}}}},"400":{"description":"Invalid input"},"401":{"description":"Sign-in required for customer checkout"},"408":{"description":"Request body timed out"},"409":{"description":"Product or price changed"},"413":{"description":"Request body exceeds 32 KiB"},"429":{"description":"Checkout quota exceeded; wait for Retry-After before retrying the same request"},"503":{"description":"Direct checkout is not configured"}},"security":[{"checkoutIdentity":[]}]}},"/api/checkout-sessions/{id}":{"get":{"operationId":"getCheckout","summary":"Read the current identity’s payment status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private authoritative agent order result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrder"}}}},"400":{"description":"Invalid input"},"401":{"description":"Sign-in required for customer checkout"},"408":{"description":"Request body timed out"},"409":{"description":"Product or price changed"},"413":{"description":"Request body exceeds 32 KiB"},"429":{"description":"Checkout quota exceeded; wait for Retry-After before retrying the same request"},"503":{"description":"Direct checkout is not configured"}},"security":[{"checkoutIdentity":[]}]}},"/api/agent/quotes":{"post":{"operationId":"quoteAgentOrder","summary":"Get exact products and a final total for an authorized agent purchase","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["items","email","shipping"],"properties":{"items":{"type":"array","minItems":1,"maxItems":30,"items":{"type":"object","additionalProperties":false,"required":["productId","quantity"],"properties":{"productId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":99}}}},"email":{"type":"string","format":"email"},"shipping":{"type":"object","additionalProperties":false,"required":["name","address"],"properties":{"name":{"type":"string","maxLength":100},"address":{"type":"object","additionalProperties":false,"required":["line1","city","state","postalCode","country"],"properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"postalCode":{"type":"string","pattern":"^[0-9]{5}(-[0-9]{4})?$"},"country":{"type":"string","const":"US"}}}}}}}}}},"responses":{"200":{"description":"Private authoritative agent order result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrder"}}}},"400":{"description":"Invalid input"},"401":{"description":"Sign-in required for customer checkout"},"408":{"description":"Request body timed out"},"409":{"description":"Product or price changed"},"413":{"description":"Request body exceeds 32 KiB"},"429":{"description":"Checkout quota exceeded; wait for Retry-After before retrying the same request"},"503":{"description":"Direct checkout is not configured"}},"security":[{"checkoutIdentity":[]}]}},"/api/agent/orders":{"post":{"operationId":"purchaseAgentOrder","summary":"Buy a quoted order with a delegated Stripe Shared Payment Token","description":"Uses existing buyer spending authorization; Cartomato adds no approval step. Payment credentials stay private. Retry with the identical key and request after uncertain responses.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["quoteId","expectedTotalCents","idempotencyKey","sharedPaymentToken"],"properties":{"quoteId":{"type":"string","pattern":"^aq_"},"expectedTotalCents":{"type":"integer","minimum":1},"idempotencyKey":{"type":"string","minLength":8,"maxLength":100},"sharedPaymentToken":{"type":"string","pattern":"^spt_","description":"Private seller-scoped Stripe Shared Payment Token issued under the buyer’s spending authorization. Never provide raw card data."}}}}}},"responses":{"200":{"description":"Private authoritative agent order result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrder"}}}},"400":{"description":"Invalid input"},"401":{"description":"Sign-in required for customer checkout"},"408":{"description":"Request body timed out"},"409":{"description":"Product or price changed"},"413":{"description":"Request body exceeds 32 KiB"},"429":{"description":"Checkout quota exceeded; wait for Retry-After before retrying the same request"},"503":{"description":"Direct checkout is not configured"}},"security":[{"checkoutIdentity":[]}]}},"/api/agent/orders/{id}":{"get":{"operationId":"getAgentOrder","summary":"Read authoritative private order status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private authoritative agent order result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentOrder"}}}},"400":{"description":"Invalid input"},"401":{"description":"Sign-in required for customer checkout"},"408":{"description":"Request body timed out"},"409":{"description":"Product or price changed"},"413":{"description":"Request body exceeds 32 KiB"},"429":{"description":"Checkout quota exceeded; wait for Retry-After before retrying the same request"},"503":{"description":"Direct checkout is not configured"}},"security":[{"checkoutIdentity":[]}]}},"/api/checkout-identity":{"post":{"operationId":"beginCheckout","summary":"Start a private anonymous checkout identity; retain its bearer token for subsequent checkout requests","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"responses":{"200":{"description":"Private bearer capability and secure browser cookie. Does not authorize payment."}}}}},"components":{"schemas":{"Product":{"type":"object","required":["id","slug","name","brand","description","category","comparisonGroup","tags","size","color","shape","url","data_url","purchase_url","currency","priceCents","price_kind","priceKind","priceObservedAt","deliveryEstimate","demo","purchasable","salesChannel","commonCartCheckout","checkoutAvailable","source","dataset_version","notice","unit","attributes","specs"],"properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"brand":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"comparisonGroup":{"type":"string","description":"Compare unit prices only within the same comparisonGroup and unit.label. Matching families do not authorize substitutions."},"tags":{"type":"array","items":{"type":"string"}},"size":{"type":"string"},"color":{"type":"string"},"shape":{"type":"string"},"url":{"type":"string","format":"uri"},"data_url":{"type":"string","format":"uri"},"purchase_url":{"type":"string","format":"uri"},"currency":{"type":"string","const":"USD"},"priceCents":{"type":"integer","minimum":0,"description":"Reference item price in USD cents, excluding shipping and tax."},"price_kind":{"type":"string","enum":["current"]},"priceKind":{"type":"string","enum":["current"]},"priceObservedAt":{"type":"string","format":"date"},"deliveryEstimate":{"type":"object","required":["kind","text","scope","appliesWhen","exactDate"],"properties":{"kind":{"type":"string","const":"merchant_estimate"},"text":{"type":"string","const":"Expected within a few days"},"scope":{"type":"string","const":"eligible US orders"},"appliesWhen":{"type":"string","const":"eligible Cartomato checkout order is confirmed"},"exactDate":{"const":null}}},"demo":{"type":"boolean","const":false},"purchasable":{"type":"boolean","const":true},"salesChannel":{"type":"string","const":"cartomato"},"commonCartCheckout":{"type":"boolean","const":true},"checkoutAvailable":{"type":"boolean","const":true},"source":{"type":"string","format":"uri"},"dataset_version":{"type":"string","const":"catalog-v1"},"notice":{"type":"string"},"unit":{"type":"object","required":["count","label"],"properties":{"count":{"type":"number","exclusiveMinimum":0},"label":{"type":"string"}}},"attributes":{"type":"object","required":["fragranceFree","recycled"],"properties":{"fragranceFree":{"type":["boolean","null"]},"recycled":{"type":["boolean","null"]},"heCompatible":{"type":["boolean","null"]}}},"specs":{"type":"object","properties":{"form":{"type":["string"]},"scent":{"type":["string"]},"volumeFlOz":{"type":["number"]},"labelLoads":{"type":["number"]},"heCompatible":{"type":["boolean"]},"dyeFree":{"type":["boolean"]},"pacCount":{"type":["number"]},"netWeightOz":{"type":["number"]},"rollCount":{"type":["number"]},"sheetsPerRoll":{"type":["number"]},"sheetCount":{"type":["number"]},"ply":{"type":["number"]},"sheetFormat":{"type":["string"]},"sheetDimensions":{"type":["null"]},"totalAreaSqFt":{"type":["null"]},"manufacturerScent":{"type":["string"]},"use":{"type":["string"]},"bagCount":{"type":["number"]},"capacityGallons":{"type":["number"]},"closure":{"type":["string"]},"thicknessMil":{"type":["number"]},"widthIn":{"type":["number"]},"heightIn":{"type":["number"]}},"additionalProperties":false},"gtin":{"type":"string","pattern":"^[0-9]{12,14}$"},"priceCheckedAt":{"type":"string","format":"date-time"},"referencePriceCents":{"type":"integer","minimum":0},"referencePriceObservedAt":{"type":"string","format":"date"}}},"Category":{"type":"object","required":["id","name","description","url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"url":{"type":"string","format":"uri"}}},"BundleItem":{"type":"object","required":["productId","quantity"],"properties":{"productId":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":99}}},"Bundle":{"type":"object","required":["id","name","description","demo","purchasable","salesChannel","commonCartCheckout","checkoutAvailable","items"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"demo":{"type":"boolean","const":false},"purchasable":{"type":"boolean","const":true},"salesChannel":{"type":"string","const":"cartomato"},"commonCartCheckout":{"type":"boolean","const":true},"checkoutAvailable":{"type":"boolean","const":true},"items":{"type":"array","minItems":1,"maxItems":30,"items":{"$ref":"#/components/schemas/BundleItem"},"description":"Exact product quantities. No automatic substitution."}}},"Catalog":{"type":"object","required":["name","url","source","dataset_version","demo","purchasable","salesChannel","commonCartCheckout","checkoutAvailable","indexable","notice","products","categories","bundles"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"source":{"type":"string","format":"uri"},"dataset_version":{"type":"string","const":"catalog-v1"},"demo":{"type":"boolean","const":false},"purchasable":{"type":"boolean","const":true},"salesChannel":{"type":"string","const":"cartomato"},"commonCartCheckout":{"type":"boolean","const":true},"checkoutAvailable":{"type":"boolean","const":true},"indexable":{"type":"boolean","const":true},"notice":{"type":"string"},"products":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Product"}},"categories":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Category"}},"bundles":{"type":"array","items":{"$ref":"#/components/schemas/Bundle"}}}},"AgentOrderQuote":{"type":"object","required":["id","items","subtotalCents","shippingCents","taxCents","totalCents","currency","taxCollection","email","shipping","expiresAt","stripeProfileId"],"properties":{"id":{"type":"string","pattern":"^aq_[a-f0-9]{32}$"},"items":{"type":"array","items":{"type":"object","required":["productId","name","size","quantity","unitPriceCents","lineTotalCents"],"properties":{"productId":{"type":"string"},"name":{"type":"string"},"size":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":99},"unitPriceCents":{"type":"integer","minimum":0},"lineTotalCents":{"type":"integer","minimum":0}},"additionalProperties":true}},"subtotalCents":{"type":"integer","minimum":0},"shippingCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer","const":0},"totalCents":{"type":"integer","minimum":1},"currency":{"type":"string","const":"USD"},"taxCollection":{"type":"string","const":"not_collected"},"email":{"type":"string","format":"email"},"shipping":{"type":"object","additionalProperties":false,"required":["name","address"],"properties":{"name":{"type":"string","maxLength":100},"address":{"type":"object","additionalProperties":false,"required":["line1","city","state","postalCode","country"],"properties":{"line1":{"type":"string","maxLength":200},"line2":{"type":"string","maxLength":200},"city":{"type":"string","maxLength":100},"state":{"type":"string","minLength":2,"maxLength":2},"postalCode":{"type":"string","pattern":"^[0-9]{5}(-[0-9]{4})?$"},"country":{"type":"string","const":"US"}}}}},"expiresAt":{"type":"string","format":"date-time"},"stripeProfileId":{"type":"string"},"paymentInstrument":{"type":"string","const":"stripe_shared_payment_token"}},"additionalProperties":true},"AgentOrder":{"type":"object","required":["id","quoteId","paymentStatus","orderPlaced","fulfillmentStatus","items","subtotalCents","shippingCents","taxCents","totalCents","currency","taxCollection","createdAt"],"properties":{"id":{"type":"string","pattern":"^ao_[a-f0-9]{32}$"},"quoteId":{"type":"string","pattern":"^aq_[a-f0-9]{32}$"},"paymentStatus":{"type":"string","enum":["payment_pending","processing","action_required","payment_failed","canceled","paid"]},"orderPlaced":{"type":"boolean"},"fulfillmentStatus":{"type":"string","enum":["awaiting_fulfillment","not_started"]},"items":{"type":"array","items":{"type":"object","required":["productId","name","size","quantity","unitPriceCents","lineTotalCents"],"properties":{"productId":{"type":"string"},"name":{"type":"string"},"size":{"type":"string"},"quantity":{"type":"integer","minimum":1,"maximum":99},"unitPriceCents":{"type":"integer","minimum":0},"lineTotalCents":{"type":"integer","minimum":0}},"additionalProperties":true}},"subtotalCents":{"type":"integer","minimum":0},"shippingCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer","const":0},"totalCents":{"type":"integer","minimum":1},"currency":{"type":"string","const":"USD"},"taxCollection":{"type":"string","const":"not_collected"},"createdAt":{"type":"string","format":"date-time"},"nextAction":{"type":"string"}},"additionalProperties":false}},"securitySchemes":{"checkoutIdentity":{"type":"http","scheme":"bearer","description":"Obtain a token with POST /api/checkout-identity. Keep it private."}}},"x-cartomato-checkout":{"provider":"stripe","mode":"live","enabled":true,"requiresSignIn":false,"authentication":"checkout_capability","identityUrl":"/api/checkout-identity","currency":"USD","paymentMethods":["card","link"],"taxCollection":"disabled","directProductIds":["tide-original-125","tide-free-gentle-132","persil-original-ultra-pacs-100","bounty-select-a-size-mega-xl-6","brawny-tear-a-square-triple-6","dawn-ultra-original-38","glad-forceflex-fragrance-free-100"],"agentCheckout":{"enabled":true,"transport":"rest","paymentInstrument":"stripe_shared_payment_token","credential":"stripe_shared_payment_token","currency":"USD","taxCollection":"not_collected","profileId":"profile_61VhM4VLHBBGSIxU0A6VhM4VQ2SQVjF74CS6heGRkRkW","stripeProfileId":"profile_61VhM4VLHBBGSIxU0A6VhM4VQ2SQVjF74CS6heGRkRkW"}}}