Skip to content
1 viewer
View

Shop reference

3 pages, 56 routes, 48 connections and 0 CLI commands, generated from the declarations of Shop without reading storage or running anything.

AboutCode

Code · 0 files

No ingested source sits in a crate named for this app. Either its crate has not been ingested, or the app's name does not match its crate.

Pages · 22

Declared views
PageView idRoleRouteOrderParentEntityNavigation
Cartshop.cartdetail/view/shop/cart/{cart_id}0Carthidden
Dashboardshop.dashboarddashboard/view/shop0in navigation
Storefrontshop.itemlist/view/shop/storefront/{shop_id}0shop.indexItemhidden
New couponshop.merchant.coupon.editeditor/view/shop/merchant/{shop_id}/coupon/create0shop.merchant.coupon.indexCouponhidden
Coupon editorshop.merchant.coupon.editeditor/view/shop/merchant/{shop_id}/coupon/{coupon_code}/edit0shop.merchant.coupon.indexCouponhidden
Couponsshop.merchant.coupon.indexlist/view/shop/merchant/{shop_id}/coupon/list0shop.merchant.dashboardCouponhidden
Customersshop.merchant.customer.indexlist/view/shop/merchant/{shop_id}/customer/list0shop.merchant.dashboardCustomerhidden
Customershop.merchant.customer.orderslist/view/shop/merchant/{shop_id}/customer/{customer_ref}/orders0shop.merchant.customer.indexOrderhidden
Merchant dashboardshop.merchant.dashboarddashboard/view/shop/merchant/{shop_id}0shop.merchant.indexShophidden
New shopshop.merchant.neweditor/view/shop/merchant/create0shop.merchant.indexShophidden
Shop ordersshop.merchant.order.indexlist/view/shop/merchant/{shop_id}/order/list0shop.merchant.dashboardOrderhidden
Packing slipshop.merchant.order.slipdetail/view/shop/merchant/{shop_id}/order/{order_id}/slip0shop.merchant.order.indexOrderhidden
Plansshop.merchant.plan.indexlist/view/shop/merchant/{shop_id}/plan/list0shop.merchant.dashboardPlanhidden
Productsshop.merchant.product.indexlist/view/shop/merchant/{shop_id}/product/list0shop.merchant.dashboardItemhidden
Your ordersshop.order.indexlist/view/shop/orders/{customer_ref}0Orderhidden
Ordershop.order.itemdetail/view/shop/order/{order_id}0Orderhidden
Registershop.poseditor/view/shop/merchant/{shop_id}/pos0shop.merchant.dashboardShophidden
Productshop.product.itemdetail/view/shop/product/{item_id}0Itemhidden
New productshop.product.item.editeditor/view/shop/merchant/{shop_id}/product/create0shop.merchant.dashboardItemhidden
Product editorshop.product.item.editeditor/view/shop/merchant/{shop_id}/product/{item_id}/edit0shop.merchant.dashboardItemhidden
Listshop.indexlist/view/shop/list20Shopin navigation
Merchant workspacesshop.merchant.indexlist/view/shop/merchant30in navigation
22 rows

Connections · 48

Shop.AccessCheck

Read the authenticated account's current durable item ownership. Not a provider payment receipt.

Shop.AccessCheck input
FieldTypeRequiredDescriptionAllowed
item_idstringrequiredCanonical item to check.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/accessHTTP route

Shop.BuyNow

One-shot purchase of a single item: quotes supplier shipping, creates the order and opens a checkout session. MOVES VALUE.

Shop.BuyNow input
FieldTypeRequiredDescriptionAllowed
item_idstringoptionalShop item being bought.
quantityintegeroptionalUnits to buy.
customer_emailstringoptionalBuyer email; receipts and shipping notifications go here.
3 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/buyHTTP route

Shop.CartAdd

Add a line to a server-side per-shop cart. The cart id is the cart identity.

Shop.CartAdd input
FieldTypeRequiredDescriptionAllowed
item_idstringrequiredItem to add.
quantityintegeroptionalUnits to add.
cart_idstringoptionalExisting cart to append to. Omit to open a new cart.
3 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/cartHTTP route

Shop.CartCheckout

Convert a cart into one multi-line order and open a checkout session. MOVES VALUE.

Shop.CartCheckout input
FieldTypeRequiredDescriptionAllowed
cart_idstringrequiredCart to convert.
customer_emailstringoptionalBuyer email for receipts.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/cart/checkoutHTTP route

Shop.CartGet

Read a cart and its lines.

Shop.CartGet input
FieldTypeRequiredDescriptionAllowed
cart_idstringrequiredCart identity from the cart URL.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/cartHTTP route

Shop.CartRemove

Remove one line from a cart.

Shop.CartRemove input
FieldTypeRequiredDescriptionAllowed
cart_idstringrequiredCart to modify.
item_idstringrequiredLine item to drop.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/cart/removeHTTP route

Shop.CartSweep

Ops sweep: expire abandoned carts and stale unpaid orders.

Shop.CartSweep input
FieldTypeRequiredDescriptionAllowed
ttl_secondsintegeroptionalCart age, in seconds, past which it is swept.
order_ttl_secondsintegeroptionalUnpaid-order age, in seconds, past which it is swept.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/cart/sweepHTTP route

Shop.Catalog

List the sellable items of a shop.

Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/catalogHTTP route

Shop.CheckoutSession

Open (or re-open) the payment checkout session for an order. MOVES VALUE.

Shop.CheckoutSession input
FieldTypeRequiredDescriptionAllowed
order_idstringrequiredOrder to pay for.
order_access_tokenstringoptionalBearer token from the order link; stands in for a session when the buyer is anonymous.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/checkoutHTTP route

Shop.CouponList

List a shop's coupons.

Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/couponsHTTP route

Shop.CouponUpsert

Create or update a coupon. Shop owner only.

Shop.CouponUpsert input
FieldTypeRequiredDescriptionAllowed
shop_idstringrequiredShop that owns the coupon.
coupon_codestringrequiredRedemption code buyers type.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/couponHTTP route

Shop.EntitlementCheck

Does the signed-in account hold access to a resource (e.g. item:{item_id}) through a subscription?

Shop.EntitlementCheck input
FieldTypeRequiredDescriptionAllowed
resourcestringoptionalResource key a plan unlocks.
shop_idstringoptionalShop whose plans to consult; derived for item:/plan: keys.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/entitlementHTTP route

Shop.Get

Read one shop by id or slug.

Shop.Get input
FieldTypeRequiredDescriptionAllowed
shop_idoptional
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/detailHTTP route

Shop.Inventory

Read stock levels for a shop's items.

Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/inventoryHTTP route

Shop.ItemGet

Read one shop item, with its variants.

Shop.ItemGet input
FieldTypeRequiredDescriptionAllowed
item_idstringrequiredItem to read.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/itemHTTP route

Shop.ItemUpsert

Create or update a shop item and its variants. Shop owner only; an existing item cannot move between shops. Flat updates preserve omitted fields. Returns the saved item and its product_url/document_url for navigation.

Shop.ItemUpsert input
FieldTypeRequiredDescriptionAllowed
shop_idstringrequiredShop that owns the item.
product_group_idstringoptionalGroups size/color variants of one product; items sharing it render as one storefront listing with a variant selector.
variant_labelstringoptionalThis item's variant name, e.g. 'Black / M'.
more_image_urlsstringoptionalFurther picture addresses, one per line. When sent, media becomes image_url then these, at most 8.
session_booking_type_idstringoptionalOptional owned appointment type. Empty removes package terms from future purchases.
session_countintegeroptionalSessions per package: 1 to 1000.
session_cancellation_hoursintegeroptionalWhole hours of cancellation notice required to return a session: 0 to 744.
7 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/itemHTTP route

Shop.List

List storefronts. Optional collection {q,sort,page,page_size,status} returns pagination; scope=merchant authorizes candidates before totals. Without collection, legacy limits apply.

Shop.List input
FieldTypeRequiredDescriptionAllowed
collectionoptional
scopeoptional
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shopHTTP route

Shop.ListLedgerItem

Price-and-list one ledger-tracked item (donation intake, fabrication run) in a shop: lists the shop item under the ledger's item id, moves its stock from from_location (default intake:dock) into the shop's stock bucket, and projects the resulting balance into the item counters. Shop owner only.

Shop.ListLedgerItem input
FieldTypeRequiredDescriptionAllowed
shop_idstringrequiredShop to list in.
item_idstringrequiredThe ledger item ref — becomes the shop item id.
price_minorstringoptionalListing price in minor units.
from_locationstringoptionalWhere the stock sits now (default intake:dock).
4 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/list-ledger-itemHTTP route

Shop.MyDownloads

List the signed-in account's purchased downloads, newest first, with their gated download URLs.

Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/my-downloadsHTTP route

Shop.OrderCancel

Cancel an unpaid order.

Shop.OrderCancel input
FieldTypeRequiredDescriptionAllowed
order_idstringrequiredOrder to cancel.
order_access_tokenstringoptionalBearer token from the order link.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/order/cancelHTTP route

Shop.OrderClaim

Adopt an order paid as a guest into the signed-in account: the order link's token proves it, an order another account owns is refused, and a paid order's items (downloads, session packages) unlock for the account. Idempotent.

Shop.OrderClaim input
FieldTypeRequiredDescriptionAllowed
order_idstringrequiredOrder to adopt.
order_access_tokenstringrequiredBearer token from the order link or receipt email.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/order/claimHTTP route

Shop.OrderCreate

Create an order from a line list. MOVES VALUE: the order is the obligation to pay.

Shop.OrderCreate input
FieldTypeRequiredDescriptionAllowed
itemsarrayrequiredOrder lines. Each entry names an item/variant and a quantity.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/orderHTTP route

Shop.OrderGet

Read one order: lifecycle state, lines, discounts and totals.

Shop.OrderGet input
FieldTypeRequiredDescriptionAllowed
order_idstringrequiredOrder to read.
order_access_tokenstringoptionalBearer token from the order link.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/orderHTTP route

Shop.OrderList

List orders for a shop or a buyer.

Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/ordersHTTP route

Shop.OrderQuote

Price a prospective order, including supplier shipping. Reads only -- nothing is created.

Shop.OrderQuote input
FieldTypeRequiredDescriptionAllowed
itemsarrayrequiredProspective order lines to price.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/order/quoteHTTP route

Shop.OrderRefund

Refund a paid order, whole or in part. MOVES VALUE and is irreversible. Shop owner only on paid orders (gateway-verified session only; the input `actor` is not an authorization input). With no amount it refunds what is left: the money, the delivered item assets and the stock, and the order becomes refunded. A smaller amount returns only that money, keeps the order paid and adds it to `metadata.refunded_minor`; the refund that brings that total to the order total is the full one. Part refunds are refused for orders paid through an outside provider, which refunds only a whole payment.

Shop.OrderRefund input
FieldTypeRequiredDescriptionAllowed
order_idstringrequiredPaid order to refund.
amount_minorintegeroptionalPart to refund, in minor units; more than 0 and at most what is left. Omit for the rest.
amountstringoptionalThe same part as a decimal in the order's currency; read when amount_minor is absent.
reasonstringoptionalWhy part of the order is refunded, kept with the refund.
expected_refunded_minorintegeroptionalThe order's metadata.refunded_minor when the caller read it. When sent and the stored total differs, nothing is refunded: a form posted twice refunds once.
5 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/order/refundHTTP route

Shop.OrderRefundDecline

Decline a refund request. Shop owner only.

Shop.OrderRefundDecline input
FieldTypeRequiredDescriptionAllowed
order_idstringrequiredOrder whose refund request is declined.
decision_reasonstringoptionalReason shown to the buyer.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/order/refund/declineHTTP route

Shop.OrderRefundRequest

Buyer-side request for a refund. Records the ask; the owner decides.

Shop.OrderRefundRequest input
FieldTypeRequiredDescriptionAllowed
order_idstringrequiredOrder the buyer wants refunded.
customer_refstringoptionalBuyer email or peer id.
order_access_tokenstringoptionalBearer token from the order link.
reasonstringoptionalWhy the buyer is asking.
4 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/order/refund/requestHTTP route

Shop.PaymentWebhook

Payment-provider callback. MOVES VALUE: this is what flips an order to paid and credits item assets to the buyer. Signature-verified; not an agent-facing call.

Shop.PaymentWebhook input
FieldTypeRequiredDescriptionAllowed
raw_bodystringrequiredVerbatim provider request body, for signature checks.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/payment/webhookHTTP route

Shop.PlanGet

Read one recurring plan.

Shop.PlanGet input
FieldTypeRequiredDescriptionAllowed
plan_idoptional
shop_idoptional
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/planHTTP route

Shop.PlanList

List a shop's open recurring plans.

Shop.PlanList input
FieldTypeRequiredDescriptionAllowed
shop_idrequired
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/plansHTTP route

Shop.PlanUpsert

Create or update a recurring plan. Shop owner only. Price edits apply to new subscribers; existing subscriptions keep the terms they signed up at.

Shop.PlanUpsert input
FieldTypeRequiredDescriptionAllowed
shop_idstringrequiredShop selling the plan.
plan_idoptional
namestringoptionalPlan name.
amount_minorintegeroptionalPrice per period in MINOR units (cents for USD). 29500 is $295.00.
pricestringoptionalThe same price as a decimal in the plan's currency; read when amount_minor is absent.
statusstringoptionalAn archived plan takes no new subscribers; its subscribers keep it.active, archived
intervalstringoptionalday, week, month, year
trial_daysintegeroptionalFree days before the first charge.
entitlementsarrayoptionalResource keys the plan unlocks, e.g. item:{item_id} for a protected download.
9 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/planHTTP route

Shop.PosSale

Record an in-person point-of-sale sale. MOVES VALUE. Shop owner only.

Shop.PosSale input
FieldTypeRequiredDescriptionAllowed
shop_idstringoptionalShop making the sale.
itemsarrayoptionalSold lines.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/posHTTP route

Shop.ProductionAcceptance

Build the read-only production-readiness receipt (schema cre8.shop.production-acceptance.v1, no secrets) from a shop's catalog, domain, payment and supplier evidence. Writes nothing. Shop owner only.

Shop.ProductionAcceptance input
FieldTypeRequiredDescriptionAllowed
shop_idstringrequiredReceiving shop.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/production-acceptanceHTTP route

Shop.SessionPackageServices

List the shop owner's appointments for configuring a session package.

Shop.SessionPackageServices input
FieldTypeRequiredDescriptionAllowed
shop_idstringoptionalOwned shop to configure.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/session-package-servicesHTTP route

Shop.SessionPackages

Read session packages from the authenticated customer’s settled purchases.

Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/session-packagesHTTP route

Shop.Status

Shop app health and counters.

Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/statusHTTP route

Shop.Subscribe

Open a hosted checkout that starts a recurring subscription for the signed-in account. MOVES VALUE every period until cancelled. Returns the existing subscription instead when one is already active.

Shop.Subscribe input
FieldTypeRequiredDescriptionAllowed
plan_idstringoptionalPlan to subscribe to.
shop_idoptional
emailstringoptionalReceipt email to prefill at checkout.
3 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/subscribeHTTP route

Shop.SubscriptionCancel

Cancel at the end of the paid period; access continues until then. Subscriber or shop owner.

Shop.SubscriptionCancel input
FieldTypeRequiredDescriptionAllowed
subscription_idstringrequiredSubscription to cancel.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/subscription/cancelHTTP route

Shop.SubscriptionGet

Read one subscription and whether it grants access now. Subscriber or shop owner.

Shop.SubscriptionGet input
FieldTypeRequiredDescriptionAllowed
subscription_idrequired
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/subscriptionHTTP route

Shop.SubscriptionList

List the caller's subscriptions, or every subscription of a shop the caller owns.

Shop.SubscriptionList input
FieldTypeRequiredDescriptionAllowed
shop_idoptional
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/subscriptionsHTTP route

Shop.SubscriptionPortal

Mint the payment provider's customer-portal link (update card, invoices). Subscriber only.

Shop.SubscriptionPortal input
FieldTypeRequiredDescriptionAllowed
subscription_idstringrequiredSubscription whose billing to manage.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/subscription/portalHTTP route

Shop.SubscriptionResume

Withdraw a scheduled cancellation while the period is still paid. Subscriber or shop owner.

Shop.SubscriptionResume input
FieldTypeRequiredDescriptionAllowed
subscription_idstringrequiredSubscription to keep.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/subscription/resumeHTTP route

Shop.SubscriptionSimulate

Drive a preview-rail subscription through one lifecycle step offline (complete_checkout, renew, fail_renewal, recover, end_period, expire_checkout). Shop owner only; never touches a real provider.

Shop.SubscriptionSimulate input
FieldTypeRequiredDescriptionAllowed
subscription_idstringrequiredPreview-rail subscription to advance.
stepstringrequiredcomplete_checkout, renew, fail_renewal, recover, end_period, expire_checkout
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/subscription/simulateHTTP route

Shop.SyncInventory

Project the shared Inventory ledger's balances at the shop's stock location into the shop's own item counters (only items the ledger holds a balance row for). With no shop reference it sweeps every shop declaring metadata.inventory_location_ref. Shop owner only when a shop is named.

Shop.SyncInventory input
FieldTypeRequiredDescriptionAllowed
shop_idstringoptionalShop to sync. Omit to sweep every ledger-bound shop.
item_idstringoptionalSync just this item instead of the whole catalog.
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/sync-inventoryHTTP route

Shop.SyncSupplierCatalog

Pull the supplier catalog into a shop's items. With no shop reference it sweeps every supplier-bound shop. Shop owner only when a shop is named.

Shop.SyncSupplierCatalog input
FieldTypeRequiredDescriptionAllowed
shop_idstringrequiredShop to sync. Omit to sweep every supplier-bound shop.
provider_idstringoptionalSupplier provider to pull from.printful, gelato, printify, fake
2 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shop/syncHTTP route

Shop.Upsert

Create or update a storefront.

Shop.Upsert input
FieldTypeRequiredDescriptionAllowed
namestringrequiredStorefront display name.
1 row
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • POST /shopHTTP route

Shop.ViewPatch

Poll-patch payload for the live commerce SSR documents. Read-only view plumbing.

Shop.ViewPatch input
FieldTypeRequiredDescriptionAllowed
actionstringoptionalWhich document slot to patch.
item_idstringoptionalItem the patch is scoped to.
shop_idstringoptionalShop the patch is scoped to.
3 rows
Calls and output
  • Output keyshop.result
  • Classificationunclassified
  • GET /shop/document/patchHTTP route

Other routes · 8

Routes without a connection
MethodPathKind
GET/shop/download/{item_id}raw handler
POST/shop/download/{item_id}raw handler
GET/shop/merchant/{shop_id}/customers.csvraw handler
GET/shop/merchant/{shop_id}/orders.csvraw handler
GET/view/plan/{plan_id}raw handler
GET/view/shop/merchantraw handler
GET/view/shop/merchant/{shop_id}raw handler
GET/view/subscription/{subscription_id}raw handler
8 rows

Schema and data model

Declared storage and kinds. Linked kinds open their app pages.

Declared storage
  • Authoritysql_compat
  • Preferred truthsql_compat
  • App ownerShop
  • SQL projectionlegacy_truth_until_hyper_model · DDL declarations: 16
Hyper vertex kinds read
  • None declared.
Hyper vertex kinds written
  • None declared.
Hyper edge kinds written
  • None declared.
Asset namespaces read
  • None declared.
Asset namespaces minted
  • None declared.
Model warnings
  • warningApp still declares SQL DDL without a declared Hyper graph model. (sql_without_hyper_model)
SQL tables
Table
shop_runtime
shop_item_runtime
shop_order_runtime
shop_order_item_runtime
shop_item_asset_claim_runtime
shop_coupon_runtime
shop_cart_runtime
shop_download_blob_runtime
8 rows

Capabilities and dependencies

Depends on
  • Account
  • Asset
  • Payment
  • Item
  • Protocol

Structure review · 7

Warnings · 7