Pular para o conteúdo principal

API Reference — Virtual Stores System

Base URL: https://{slug}.store.inallweb.com Authentication: Bearer JWT token in Authorization header Content-Type: application/json Tenant resolution: automatic via subdomain, custom domain, or JWT


Authentication

MethodEndpointAuthDescription
POST/api/auth/login-Login (admin or customer)
POST/api/auth/register-Register new customer account
GET/api/auth/meBearerGet current user info
POST/api/auth/refreshBearerRefresh access token
POST/api/auth/logout-Logout (client-side invalidation)
POST/api/auth/forgot-password-Request password reset email
POST/api/auth/reset-password-Reset password with token

Products

MethodEndpointAuthDescription
GET/api/products-List products (filters: search, category_id, tag_id, min_price, max_price, stock_status, is_featured, is_active, sort_by, sort_dir; pagination: page, page_size)
GET/api/products/{slug}-Get product by slug
POST/api/productsManager+Create a product
PUT/api/products/{product_id}Manager+Update a product
DELETE/api/products/{product_id}Manager+Delete a product
POST/api/products/{product_id}/imagesManager+Upload product image (multipart: file or image, is_primary; max 10 MB)
DELETE/api/products/{product_id}/images/{image_id}Manager+Delete product image

Product Variants

MethodEndpointAuthDescription
GET/api/products/{product_id}/variants-List variants for a product
POST/api/products/{product_id}/variantsManager+Create a variant
PUT/api/products/{product_id}/variants/{variant_id}Manager+Update a variant
DELETE/api/products/{product_id}/variants/{variant_id}Manager+Delete a variant

Product Attributes

MethodEndpointAuthDescription
GET/api/attributes-List all attributes with values
POST/api/attributesManager+Create an attribute (with optional values)
POST/api/attributes/{attribute_id}/valuesManager+Add a value to an attribute
DELETE/api/attributes/{attribute_id}Manager+Delete an attribute

Categories

MethodEndpointAuthDescription
GET/api/categories-List categories as tree or flat list (params: flat, include_inactive)
GET/api/categories/{slug}-Get category by slug
POST/api/categoriesManager+Create a category
PUT/api/categories/{category_id}Manager+Update a category
DELETE/api/categories/{category_id}Manager+Delete a category

Tags

MethodEndpointAuthDescription
GET/api/tags-List all tags
POST/api/tagsManager+Create a tag
DELETE/api/tags/{tag_id}Manager+Delete a tag

Cart

MethodEndpointAuthDescription
GET/api/cartOptionalGet current cart (auth or X-Session-ID header)
POST/api/cart/itemsOptionalAdd item to cart
PUT/api/cart/items/{item_id}OptionalUpdate cart item quantity
DELETE/api/cart/items/{item_id}OptionalRemove item from cart
POST/api/cart/couponOptionalApply coupon code to cart
DELETE/api/cart/couponOptionalRemove coupon from cart
POST/api/cart/mergeBearerMerge guest cart into authenticated user cart

Guest carts use the X-Session-ID header for identification.


Orders

MethodEndpointAuthDescription
GET/api/ordersStaff+List orders (filters: status, payment_status, date_from, date_to, search; pagination)
GET/api/orders/{order_id}Staff+Get order by ID
GET/api/orders/by-number/{order_number}BearerGet order by order number
POST/api/orders/checkoutOptionalCreate order from cart (checkout)
PUT/api/orders/{order_id}/statusManager+Update order status
POST/api/orders/{order_id}/fulfillStaff+Fulfill order (add tracking: carrier, tracking_number, tracking_url)
POST/api/orders/{order_id}/refundAdminProcess refund (full or partial)
GET/api/orders/{order_id}/timelineStaff+Get order timeline events
POST/api/orders/{order_id}/resend-emailStaff+Resend confirmation email to customer

Checkout (Stripe Hosted)

MethodEndpointAuthDescription
POST/api/checkout/create-sessionBearerCreate Stripe Checkout Session for an order

Payments (Stripe Connect)

MethodEndpointAuthDescription
POST/api/payments/create-intentBearerCreate Stripe PaymentIntent for an order
POST/api/payments/refundAdminCreate refund for an order
GET/api/payments/connect/statusAdminGet Stripe Connect onboarding status
POST/api/payments/connect/onboardAdminStart Stripe Connect onboarding
GET/api/payments/connect/balanceAdminGet Stripe Connect balance
POST/api/payments/connect/payoutAdminCreate manual payout
GET/api/payments/connect/transactionsAdminList recent transactions
GET/api/payments/connect/payoutsAdminList recent payouts
POST/api/payments/webhook-Stripe webhook handler (legacy)

Webhooks

MethodEndpointAuthDescription
POST/api/webhooks/stripe-Stripe webhook handler (payment_intent.succeeded, payment_intent.payment_failed, charge.refunded, charge.dispute.created, charge.dispute.closed, account.updated)

Coupons

MethodEndpointAuthDescription
GET/api/couponsManager+List coupons (pagination)
POST/api/couponsManager+Create a coupon
PUT/api/coupons/{coupon_id}Manager+Update a coupon
DELETE/api/coupons/{coupon_id}Manager+Delete a coupon
POST/api/coupons/validate-Validate coupon code (public)

Customers

Self-service (authenticated customer)

MethodEndpointAuthDescription
GET/api/customers/meBearerGet own profile
PUT/api/customers/meBearerUpdate own profile
PUT/api/customers/me/passwordBearerChange own password
GET/api/customers/me/preferencesBearerGet notification preferences
PUT/api/customers/me/preferencesBearerUpdate notification preferences
GET/api/customers/me/data-exportBearerGDPR: export all personal data (JSON)
DELETE/api/customers/meBearerGDPR: delete account and personal data

Admin endpoints

MethodEndpointAuthDescription
GET/api/customersManager+List customers (filters: search, segment; pagination)
GET/api/customers/{customer_id}Manager+Get full customer detail (stats, orders, addresses, segment)
PUT/api/customers/{customer_id}Manager+Update customer
PUT/api/customers/{user_id}/roleAdminChange user role
GET/api/customers/analytics/overviewManager+Customer analytics (segments, trends, top customers)
GET/api/customers/exportAdminExport all customers as CSV

Addresses

MethodEndpointAuthDescription
GET/api/addressesBearerList own addresses
POST/api/addressesBearerCreate an address
PUT/api/addresses/{address_id}BearerUpdate an address
DELETE/api/addresses/{address_id}BearerDelete an address

Shipping

Admin

MethodEndpointAuthDescription
GET/api/shipping/zonesAdminList shipping zones with methods
POST/api/shipping/zonesAdminCreate a shipping zone
PUT/api/shipping/zones/{zone_id}AdminUpdate a shipping zone
DELETE/api/shipping/zones/{zone_id}AdminDelete a shipping zone
POST/api/shipping/zones/{zone_id}/methodsAdminAdd method to zone
PUT/api/shipping/methods/{method_id}AdminUpdate a shipping method
DELETE/api/shipping/methods/{method_id}AdminDelete a shipping method

Public

MethodEndpointAuthDescription
GET/api/shipping/calculate-Calculate shipping options (params: postal_code, country, weight, total)
POST/api/shipping/calculate-Calculate shipping options (body: country, postcode, weight, subtotal)

Taxes

MethodEndpointAuthDescription
GET/api/taxesAdminList tax rules
POST/api/taxesAdminCreate a tax rule
PUT/api/taxes/{tax_id}AdminUpdate a tax rule
DELETE/api/taxes/{tax_id}AdminDelete a tax rule
POST/api/taxes/calculate-Calculate tax (public: tax_class, country, amount)

Reviews

Public

MethodEndpointAuthDescription
GET/api/products/{product_id}/reviews-List approved reviews (filters: sort_by; pagination)
GET/api/products/{product_id}/rating-Get average rating summary

Customer

MethodEndpointAuthDescription
POST/api/products/{product_id}/reviewsBearerSubmit a review

Admin

MethodEndpointAuthDescription
GET/api/admin/reviewsStaff+List all reviews (filters: status, product_id; pagination)
PATCH/api/admin/reviews/{review_id}/approveStaff+Approve a review
DELETE/api/admin/reviews/{review_id}Staff+Delete a review

Wishlist

Feature-gated: requires the "wishlist" addon to be active.

MethodEndpointAuthDescription
GET/api/wishlistBearerList wishlist items
POST/api/wishlistBearerAdd product to wishlist
DELETE/api/wishlist/{product_id}BearerRemove product from wishlist
GET/api/wishlist/check/{product_id}BearerCheck if product is in wishlist
POST/api/wishlist/shareBearerGenerate shareable wishlist link
GET/api/wishlist/shared/{token}-View shared wishlist (public)

Dashboard

MethodEndpointAuthDescription
GET/api/dashboard/statsStaff+Dashboard KPIs (orders, revenue, products, customers)
GET/api/dashboard/stats/chartStaff+Chart data (params: period = 7d, 30d, 12m)
GET/api/dashboard/stats/breakdownStaff+Order breakdown by status, payment, top categories

Reports

MethodEndpointAuthDescription
GET/api/reports/salesManager+Sales report (params: period, group_by)
GET/api/reports/productsManager+Top products report (params: period, limit, sort_by)
GET/api/reports/categoriesManager+Category breakdown report
GET/api/reports/customersManager+Customer analytics (new vs returning, LTV)
GET/api/reports/exportManager+Export report as CSV (params: type, period)

Pages (CMS)

MethodEndpointAuthDescription
GET/api/pages-List pages (pagination)
GET/api/pages/{slug}-Get page by slug (public, active only)
POST/api/pagesManager+Create a page
PUT/api/pages/{page_id}Manager+Update a page
DELETE/api/pages/{page_id}Manager+Delete a page

Templates

MethodEndpointAuthDescription
GET/api/templates-List active templates (public)
GET/api/templates/{slug}-Get template by slug (public)
PUT/api/tenants/current/templateAdminApply a template to current tenant

Branding

MethodEndpointAuthDescription
GET/api/brandingAdminGet branding (frontend-friendly names)
PUT/api/brandingAdminUpdate branding
POST/api/branding/upload/{image_type}AdminUpload branding image (logo, banner, hero; max 5 MB)

Tenant Settings

MethodEndpointAuthDescription
GET/api/tenant/settingsAdminGet tenant settings
PUT/api/tenant/settingsAdminUpdate tenant settings
GET/api/tenants/currentAdminGet current tenant full details
PUT/api/tenants/currentAdminUpdate current tenant
PUT/api/tenants/current/brandingAdminUpdate branding (DB field names)

Storefront (Public)

MethodEndpointAuthDescription
GET/api/storefront/branding-Get tenant branding for storefront (no auth, tenant via middleware)
GET/api/storefront/products-List products (filters: search, category_slug, min_price, max_price, in_stock, featured, sort_by; pagination)
GET/api/storefront/products/{slug}-Get product by slug (increments view count)
GET/api/storefront/categories-List active categories with product counts
GET/api/storefront/categories/{slug}-Get category by slug

Plans & Addons

MethodEndpointAuthDescription
GET/api/plans-List all available plans
GET/api/plans/addons-List all available addons
GET/api/plans/tenant/{tenant_id}/features-Get active features for a tenant

Audit Log

MethodEndpointAuthDescription
GET/api/admin/audit-logAdminGet paginated audit log (filters: resource_type, action, user_id, date_from, date_to)

Integrations — Moloni

MethodEndpointAuthDescription
GET/api/integrations/moloni/authorizeAdminStart Moloni OAuth2 authorization flow
GET/api/integrations/moloni/callback-Moloni OAuth2 callback
GET/api/integrations/moloni/statusAdminCheck Moloni connection status
POST/api/integrations/moloni/invoice/{order_id}AdminCreate Moloni invoice for an order
GET/api/integrations/moloni/invoice/{order_id}/pdfAdminGet invoice PDF URL

Migration

MethodEndpointAuthDescription
POST/api/migration/woocommerce/importSysAdminImport products from WooCommerce

SysAdmin — Platform Dashboard

MethodEndpointAuthDescription
GET/api/sysadmin/dashboardSysAdminPlatform-wide statistics (MRR, tenants, orders, revenue growth)
GET/api/sysadmin/tenantsSysAdminList tenants with stats (filters: search, plan, sort_by, sort_order)
GET/api/sysadmin/tenants/{tenant_id}/detailSysAdminGet tenant detail with stats
GET/api/sysadmin/tenants/{tenant_id}/usersSysAdminList tenant users
PUT/api/sysadmin/tenants/{tenant_id}/suspendSysAdminSuspend a tenant
PUT/api/sysadmin/tenants/{tenant_id}/activateSysAdminActivate a tenant
DELETE/api/sysadmin/tenants/{tenant_id}SysAdminSoft-delete a tenant

Tenant Provisioning

MethodEndpointAuthDescription
GET/api/sysadmin/tenantsSysAdminList all tenants (pagination, search)
POST/api/sysadmin/tenantsSysAdminCreate new tenant with admin user
GET/api/sysadmin/tenants/{tenant_id}SysAdminGet tenant by ID
PUT/api/sysadmin/tenants/{tenant_id}SysAdminUpdate tenant (all fields)
POST/api/sysadmin/tenants/{tenant_id}/activateSysAdminActivate tenant
POST/api/sysadmin/tenants/{tenant_id}/suspendSysAdminSuspend tenant

Health

MethodEndpointAuthDescription
GET/api/health-Health check

Auth Levels Reference

LevelDescription
-No authentication required (public)
OptionalWorks with or without authentication
BearerRequires valid JWT token
Staff+Requires staff, manager, admin, or sysadmin role
Manager+Requires manager, admin, or sysadmin role
AdminRequires admin or sysadmin role
SysAdminRequires sysadmin role (In All Web platform team)