Commands

Every store mutation is a typed, permission-scoped, audit-logged command on POST /v1/commands (ADR 0005). The admin UI, the CLI, extensions, and agents call the SAME commands 1:1 — there is no privileged side channel. GET /v1/commands returns this list with JSON Schemas (scope-filtered for authenticated callers).

Envelope: { command, storeId, payload, idempotencyKey (26-char ULID), dryRun?, deferBump? }. Replays with the same key and payload return the original outcome; a different payload is an idempotency_conflict.

scope agents:admin

commandsummaryflags
token.mintMint an access token for this store (Ajan = propose-only, Geliştirici = direct). Owner sessions only; the plaintext is returned once by POST /v1/tokens, never audited.
token.revokeRevoke an access token immediately (its open proposal is withdrawn by the API layer).destructive
workspace.createCreate a named workspace (an agent's own hidden draft; optionally a hosted sandbox container).
workspace.archiveArchive a workspace: its tokens are revoked and (optionally) its draft discarded. Open proposals stay reviewable.destructive

scope catalog:write

commandsummaryflags
catalog.category.createCreate a category (flat compliance taxonomy; taksitCap = BDDK installment cap).
catalog.category.updateUpdate a category's name, installment cap, or position.
catalog.category.archiveArchive a category (products keep their assignment; hidden from active lists).destructive
catalog.product.createCreate a product. price/compareAt in kuruş; stock null = untracked; handle derived from title when omitted.bumps generation
catalog.product.updatePatch product fields. Price and stock are NOT here — use catalog.price.set / catalog.stock.set.bumps generation
catalog.product.archiveArchive a product — removed from the storefront, history kept.bumps generation, destructive
catalog.price.setSet the price (kuruş) of a product (prd_) or variant (var_). compareAt only on products; null clears it. Variant price null = inherit product price.bumps generation
catalog.stock.adjustAdjust stock by a ± delta (receiving, stocktake, connector sync). Fails on untracked items; expectedStock = compare-and-set.
catalog.stock.setSet stock of a product (prd_) or variant (var_). null = untracked (always available).
catalog.digital.codes.addAdd e-pin codes to a pooled digital product (sealed at rest; duplicates skipped).
catalog.digital.codes.voidVoid unused pool codes (oldest first) — they can never be allocated; nothing is deleted.destructive
catalog.product.setVariantsWholesale-replace a product's variant STRUCTURE (order = array order). Existing variants update title/sku only; initial price/stock allowed solely for new variants.bumps generation
catalog.product.setMediaWholesale-replace a product's media list (order = array order; alt is per-usage).bumps generation
catalog.collection.createCreate a collection (handle derived from title when omitted).bumps generation
catalog.collection.updatePatch collection fields.bumps generation
catalog.collection.archiveArchive a collection — its page 404s; product memberships are kept.bumps generation, destructive
catalog.collection.setProductsWholesale-replace a collection's product list (order = array order = manual sort).bumps generation
catalog.media.commitCommit a staged upload into the media library (variants generated async).
catalog.media.deletePermanently delete an UNUSED media file (refused while referenced by catalog, live design, or the draft).destructive
catalog.product.setDigitalSet a product's digital/shipping posture: requiresShipping, delivered digital content, withdrawal exception.
metafield.setSet a metafield value on a product, variant, collection, or the store.bumps generation
metafield.unsetRemove a metafield value.bumps generation

scope checkout

commandsummaryflags
order.return.requestOpen a return/withdrawal (shopper from the order page, or merchant recording a phone/e-mail notice).
order.return.cancelShopper withdraws their return request (only before the goods are received).
customer.identity.attachAttach an order's customer to a Mozaik ID (explicit, shopper-initiated).
order.createCreate an order from a completed checkout session (server-internal; shopper actor).

scope design:write

commandsummaryflags
design.publishPublish the current draft as the next live version (validates strictly; flips the live pointer).
design.rollbackPoint the live site back at an earlier version (creates a new version entry; the draft is untouched).destructive

scope orders:write

commandsummaryflags
order.shipCreate a shipment for an order's shippable lines (a cargo extension or a manual carrier) — writes the VUK 509 forward fields.
order.shipment.trackRecord a carrier state transition (webhook/poll/manual) and aggregate the order's fulfillment status.
order.shipment.cancelCancel a shipment before carrier handoff completes — resets the order to unfulfilled when nothing else is active.destructive
order.cod.collectRecord that the carrier's COD cash for a shipped/delivered order reached the merchant — order becomes paid.
order.note.addAppend a merchant note to an order's timeline.
order.return.approveApprove a return — issues the instructions the shopper sees (snapshotted as evidence).
order.return.rejectReject a return with a stated reason (the shopper mail carries the THH/consumer-court recourse).destructive
order.return.receiveRecord the returned goods arriving — per-line condition; saleable lines restock (ledgered).
order.return.settleFlip a return to refunded when its completed refunds cover the total (honest no-op otherwise).
order.line.epin.fulfillAllocate newly-added pool codes to a paid order line that was left short (sweep-driven).
customer.identity.unlinkClear a Mozaik ID pointer from this store's customers (revoke/erasure healing).
customer.anonymizeAnonymize a customer row (KVKK request) — order snapshots stay under the statutory retention.destructive
order.transfer.confirmConfirm a bank-transfer payment arrived — order becomes paid; digital content is released.
order.cancelCancel an unpaid order (pending_cod/awaiting_transfer) — restocks lines.destructive
order.refund.requestReserve a refund amount on a paid order (intent row = the PSP conversation anchor).
order.refund.recordFinalize a refund intent after the PSP call (ok releases/settles the reservation).

scope proposals:approve

commandsummaryflags
proposal.approveApprove a submitted proposal and start applying its items in order (store owner only).
proposal.rejectReject a proposal without applying anything (store owner only).
proposal.item.skipSkip one item of a paused proposal (store owner only) so the rest can continue.

scope proposals:write

commandsummaryflags
proposal.submitSubmit an open proposal for the store owner's review (the owner is mailed a link).
proposal.withdrawWithdraw a proposal that has not been applied.

scope secrets:write

commandsummaryflags
secret.setStore or rotate a write-only credential (PSP keys). Values are never readable back.
secret.deleteDelete a stored credential. Extensions requiring it will refuse to enable until re-set.destructive

scope store:admin

commandsummaryflags
store.syncKvRe-project store state (t:, l:, live b:, g:) from Postgres to KV; bumps generation once.bumps generation
settings.store.updateUpdate store settings (display name). Projected to KV tenant records.
settings.identity.updateSet the legal merchant identity (6563 m.3) — complete rows only; rendered live in the footer.bumps generation
settings.flag.setSet or clear a store readiness flag (ETBİS beyanı, rehber kartları).
extension.installInstall an extension for this store (disabled until configured + enabled). Grants the manifest's scopes.
extension.uninstallUninstall a disabled extension. Config is archived in the audit row; secrets and data are kept.bumps generation, destructive
extension.upgradeUpgrade an installed extension to the platform's current manifest version.bumps generation
extension.enableEnable an installed extension. Requires its secrets set and config valid.bumps generation
extension.disableDisable an extension. Its payment method / hooks / panels stop immediately.bumps generation
extension.configureSet an extension's configuration (validated against its schema). Does not enable it.bumps generation
extension.hook.deactivateDeactivate (or reactivate) an extension's hooks without disabling the extension.
settings.checkout.updateUpdate checkout legal settings: delivery estimate, return-cargo carrier/cost disclosure.
metafield.definition.createDefine a typed custom field on products, variants, collections, or the store.
metafield.definition.updateUpdate a metafield definition's label, description, or validations (type/key are immutable).
metafield.definition.deleteDelete a metafield definition AND every value stored under it.bumps generation, destructive
Generated from the live platform registries at build time — reference pages cannot go stale. Markdown variant: /reference/commands.md