MobiariDocs

Storefront API

Shopper API: what storefront themes call from the browser for catalog, cart, checkout and customer accounts.

The shopper-facing API storefront themes call: catalog, cart, checkout and customer accounts. Most endpoints are public and addressed by store slug.

Base URLhttps://api.mobiari.com/v1
AuthenticationMost operations are public; each operation lists what it requires
ConventionsErrors, pagination, idempotency, rate limits: API conventions
OpenAPI documentstorefront.json (version 1.0.0)

Paths below are relative to the base URL.

Catalog

Products and collections as shoppers see them

MethodPathOperation
GET/storefront-api/{store_slug}/api/categories/{category_slug}/productsList a category's products
GET/storefront-api/{store_slug}/api/productsList products
GET/storefront-api/{store_slug}/api/products/searchSearch products
GET/storefront-api/{store_slug}/api/products/{product_ref}Get a product

Cart

The shopper's cart: lines, contact details, freight and pickup. The cart id travels in the X-Cart-Id header or the cart_id cookie

MethodPathOperation
GET/storefront-api/{store_slug}/api/cartGet the shopper's cart
POST/storefront-api/{store_slug}/api/cart/contactSave the checkout contact details
PATCH/storefront-api/{store_slug}/api/cart/contactSave the checkout contact details (PATCH)
POST/storefront-api/{store_slug}/api/cart/freight/quoteQuote freight for the cart
POST/storefront-api/{store_slug}/api/cart/freight/selectSelect a freight option
POST/storefront-api/{store_slug}/api/cart/itemsSet a cart line
PATCH/storefront-api/{store_slug}/api/cart/itemsSet a cart line (PATCH)
DELETE/storefront-api/{store_slug}/api/cart/items/{variant_id}Remove a cart line
POST/storefront-api/{store_slug}/api/cart/pickupChoose pickup or shipping
POST/storefront-api/{store_slug}/api/freight/simulateSimulate freight for products
POST/storefront-api/{store_slug}/cart/addAdd to cart (theme form)
POST/storefront-api/{store_slug}/cart/changeChange a line (theme form)
POST/storefront-api/{store_slug}/cart/clearEmpty the cart (theme form)
POST/storefront-api/{store_slug}/cart/freight/quoteQuote freight (theme form)
POST/storefront-api/{store_slug}/cart/freight/selectSelect freight (theme form)

Checkout

Turning the cart into a paid order: payment intents, installments and confirmation

MethodPathOperation
POST/storefront-api/{store_slug}/api/checkoutConfirm a paid checkout
GET/storefront-api/{store_slug}/api/payments/configGet the payment configuration
GET/storefront-api/{store_slug}/api/payments/installmentsGet card installment plans
POST/storefront-api/{store_slug}/api/payments/intentsPay for the cart
GET/storefront-api/{store_slug}/api/payments/intents/{intent_id}Get a payment attempt

Locations

Store locations and pickup points

MethodPathOperation
GET/storefront-api/{store_slug}/api/locationsList store locations
GET/storefront-api/{store_slug}/api/pickup-locationsList pickup locations

Account

Customer sign-in, profile and orders

MethodPathOperation
POST/storefront-api/{store_slug}/customers/loginSign a customer in
GET/storefront-api/{store_slug}/customers/meGet the signed-in customer
GET/storefront-api/{store_slug}/customers/me/ordersList the signed-in customer's orders
POST/storefront-api/{store_slug}/customers/registerCreate a customer account
POST/storefront-api/{store_slug}/customers/verifyFinish a customer registration

Engagement

Chat, forms, reviews and subscriptions

MethodPathOperation
GET/storefront-api/{store_slug}/api/products/{product_ref}/reviewsList a product's reviews
POST/storefront-api/{store_slug}/api/products/{product_ref}/reviewsSubmit a product review
POST/storefront-api/{store_slug}/api/products/{product_ref}/subscribeSubscribe to a product
GET/widget/{key}/bootstrapGet the chat widget settings
POST/widget/{key}/conversationsStart a chat
GET/widget/{key}/conversations/{conversation_id}Get the chat
PATCH/widget/{key}/conversations/{conversation_id}Update the shopper's contact details
GET/widget/{key}/conversations/{conversation_id}/cartGet the chat's cart
POST/widget/{key}/conversations/{conversation_id}/csatRate the chat
GET/widget/{key}/conversations/{conversation_id}/messagesList the chat's messages
POST/widget/{key}/conversations/{conversation_id}/messagesSend a chat message
POST/widget/{key}/conversations/{conversation_id}/readMark the chat as read

Channel API

The headless sales-channel API: products and order intake for an external storefront, authenticated by the sales channel's API key in X-Channel-Key. Field names are camelCase

MethodPathOperation
POST/storefront/ordersCreate an order
GET/storefront/productsList the channel's products
GET/storefront/products/{slug}Get one of the channel's products

Nesta página