Skip to Content
Tools & endpoints

Reference

URLs

ThingProductionDev
Bridge MCPhttps://agent.artos.sh/mcphttps://agent.dev.artos.sh/mcp
API / OAuth AS issuerhttps://api.artos.shhttps://api.dev.artos.sh
Global catalog MCP (Direct)https://api.artos.sh/mcphttps://api.dev.artos.sh/mcp
Per-store MCP (Direct)https://api.artos.sh/s/:slug/mcpsame shape
OAuth tokenhttps://api.artos.sh/ucp/oauth2/tokenhttps://api.dev.artos.sh/ucp/oauth2/token
AS metadatahttps://api.artos.sh/.well-known/oauth-authorization-serversame shape
Discoveryhttps://api.artos.sh/s/:slug/.well-known/ucpsame shape
Consenthttps://my.artos.sh/oauth/consenthttps://my.dev.artos.sh/oauth/consent
Agent profile / CIMDprofile.artos.shsame

SDK (Build track)

@artos-commerce/ucp-client — npm install @artos-commerce/ucp-client (Node 22+; optional @mysten/sui peer for crypto).

ExportPurpose
UcpClientTyped transport: globalSearch, callGlobalTool, callStoreTool, listAccountTools, callAccountTool, fetchStoreProfile, fetchImage, hasBuyerToken, ucpAgentHeader
Ap2SignermintCheckoutMandate, mintPaymentMandate (compact ES256 JWS)
createCheckoutHandlersRead tools + confirmPurchase (one-call card / crypto / $0)
createAccountHandlersTyped wrappers over buyer-account MCP tools (buyer bearer)
OAuthClient, createPkce, DEFAULT_BUYER_SCOPEBuyer OAuth discovery, PKCE, token exchange/refresh
canonicalJson, verifyDetachedJws, verifyMerchantAuthorizationByte-parity canonical JSON + AP2 verification
toMinorUnits, normalizeSearchFilters, resolveRail, grandTotal, currencyOf, asAllowanceId, isUcpError, messageOfHelpers
resolveCryptoDeps (/crypto), SuiSigner (/sui)Crypto rail — sign + submit the Sui PTB (need @mysten/sui). Subpath-only — not on the root barrel

Subpath entries: @artos-commerce/ucp-client/{ucp,ap2,checkout,account,oauth,sui,crypto}. The crypto symbols (resolveCryptoDeps, SuiSigner) are importable only from /crypto and /sui, so card-only builds never load the optional @mysten/sui peer.

Bridge tool catalog (Connect)

Flat inputs; the bridge adds the UCP envelope. Price filters use major units (dollars).

ToolInputAuth
search_productsquery?, filters?, sort?, pagination?, context?Platform key
lookup_productsids: string[]Platform key
get_productid, store_slug?, selected?, context?Platform key
search_locationsstore_slug, query?, distance?, serves?, filters?, pagination?, context?Platform key
lookup_locationsstore_slug, ids: string[], filters?, context?Platform key
create_cartstore_slug, items: [{ id, quantity }]Platform key
update_cartstore_slug, id, itemsPlatform key
get_cartstore_slug, idPlatform key
cancel_cartstore_slug, idPlatform key
create_checkoutstore_slug, cart_id? | items?, buyer?, shipping_address?, fulfillment?, notes?Platform key
update_checkoutstore_slug, id, buyer?, shipping_address?, shipping_method_id?, discounts?, fulfillment?, notes?Platform key
cancel_checkoutstore_slug, idPlatform key
quote_purchasecheckouts: [{ store_slug, checkout_id }], payment_method?, pay_with?, apply_coupon?Buyer bearer (crypto only; moves no money)
confirm_purchasecheckouts: [{ store_slug, checkout_id }], payment_method?, payment_mandate_id?, apply_coupon?, quote_id?, pay_with?, transaction_digest?Platform key (+ buyer bearer for crypto)
get_orderstore_slug, idPlatform key + orders:read
Buyer account toolssee Buyer accountBuyer bearer (proxied)

Two checkout inputs are easy to guess wrong. buyer is { email, first_name, last_name, phone_number, consent? } — the API reads phone_number, never phone. discounts is { codes: string[] }: merchant promo codes, where the list replaces the checkout’s whole code set and [] clears it. Artos coupons are a separate mechanism — buyer opt-in through apply_coupon on confirm_purchase.

The Auth column describes what the bridge sends. On the raw API the global catalog (POST /catalog/*, global /mcp tools) also works at the anonymous tier with no key at all — see Catalog crawler and Authentication.

Bridge tools carry MCP tool annotations so a host can reason about safety: the read tools (search_products, lookup_products, get_product, search_locations, lookup_locations, get_cart, get_order) are readOnlyHint; cart/checkout writes are additive; confirm_purchase (it places the order) and cancel_cart / cancel_checkout (they cannot be undone) are destructiveHint. Proxied buyer-account tools default to read-only unless the API marks them otherwise.

Bridge → raw UCP mapping (Build track)

Bridge toolRaw UCP toolEndpoint
search_productsPOST /catalog/search (REST, not an MCP tool)global
lookup_productslookup_catalog/mcp (global)
get_productget_product/s/:slug/mcp with store_slug, else /mcp (global)
search_locations / lookup_locationssearch_locations / lookup_locations (dev.ucp.common.location.*)/s/:slug/mcp
create_cart / update_cart / get_cart / cancel_cartcreate_cart / update_cart / get_cart / cancel_cart/s/:slug/mcp
create_checkout / update_checkout / cancel_checkoutcreate_checkout / update_checkout / cancel_checkout/s/:slug/mcp
quote_purchaseprepare_checkout_payment/s/:slug/mcp
confirm_purchasecomplete_checkout (+ prepare_checkout_payment for crypto)/s/:slug/mcp
get_orderget_order/s/:slug/mcp

Raw UCP differences (see Direct UCP): args wrapped under catalog/cart/checkout; line items { item: { id }, quantity }; price filters in minor units; rails selected by inner id artos.card / artos.crypto (not the sh.artos.* registry key).

Transport headers (Direct UCP)

Required on the UCP shopping surfaces (/mcp, /s/:slug/mcp, REST /s/:slug/...). The buyer-account surface (/account/mcp) needs none of these — it is bearer-scoped.

HeaderWhenMCPREST
Request-IdEvery callrequiredrequired
UCP-Agent: profile="…"Every shopping callrequired (+ body meta["ucp-agent"].profile)required
Idempotency-KeyState-changing callsuse body meta["idempotency-key"] insteadrequired (header)

REST paths (Direct UCP)

OperationMethod + path
Global catalog searchPOST /catalog/search
Per-store catalog… /s/:slug/catalog
Cart… /s/:slug/carts
CheckoutPOST /s/:slug/checkout-sessions, …/:id (GET/PUT), …/:id/complete, …/:id/payment-intent, …/:id/cancel
Orders… /s/:slug/orders

OAuth grants

POST /ucp/oauth2/token (form-urlencoded):

GrantRequired params
authorization_codecode, code_verifier, client_id, redirect_uri
refresh_tokenrefresh_token (rotated, single-use)
client_credentialsclient_id, client_secret (post or Basic)

Buyer OAuth scopes (advertised by the AS): purchase:complete, offline_access. orders:read is a permission on platform / merchant credentials, not a buyer OAuth scope — see Authentication.

Error signals

Code / signalMeaningFix
invalid_api_keyUnknown/revoked platform keySeed/rotate the platform credential
invalid_tokenExpired/invalid bearerRefresh via OAuth (refresh_token)
missing_request_idNo Request-Id headerSend a unique Request-Id per call
missing_ucp_agent / invalid_ucp_agentNo/malformed UCP-Agent headerSend UCP-Agent: profile="…"
missing_idempotency_keyState-changing REST call without the headerSend an Idempotency-Key header
invalid_profile_urlMalformed agent profile URLSend a valid profile URL
insufficient_trustTier too low for the operationAuthenticate (token tier)
insufficient_scopeMissing required permissionBuyer OAuth: purchase:complete; platform key: grant orders:read on the credential
payment_selection_requiredMultiple rails, none chosenRead ucp.payment_handlers, retry with payment_method
mandate_expiredAP2 exp missing/pastMint a fresh mandate
mandate_scope_mismatchMandate merchant ≠ storeBind the mandate to the store slug
UCP error envelopeBusiness outcome (often HTTP 200, ucp.status: error)Read messages[] and severity

Webhook events

See Orders → Lifecycle webhooks.

Spec & schemas

UCP spec  — UCP schemas, services, and documentation.

Last updated on