API Documentation
RESTful API documentation for developers
https://api.lotsstore.appAPI Key (Bearer token or X-API-Key header)
78
Authentication
All API requests require authentication using an API key. You can create an API key from your dashboard.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.lotsstore.app/api/v1/lotsstore/stores/:id/analyticsanalytics
/api/v1/lotsstore/stores/:id/analyticsGet Store Analytics
get_store_analyticsRevenue, orders, average order value and the visit-to-order funnel for one store over a date range, with daily rows and the totals compared with the previous period of the same length. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
billing
/api/v1/lotsstore/checkoutChoose a LotsStore plan or add credits
create_checkoutCreate a checkout link for a LotsStore plan: pass plan (starter, pro or business) and cycle (monthly or annual). Give the link to the person to pay in their browser; never ask for card details in chat. Someone who already has a plan gets the page to manage or change it instead. Without plan it returns the lotstech.com page where LotsTech Credits are bought; a store without a plan runs pay as you go from credits.
/api/v1/lotsstore/billingGet LotsStore billing
get_billingShow how the caller's stores are paid for: the plan (if any), whether today is covered by the plan or paid from LotsTech Credits, the credit balance, the pay-as-you-go rate per store, plans_available, the plans to choose from, and top_up_url (lotstech.com) for buying credits. Each store needs room on a plan or credits; an unfunded store keeps its storefront and data but pauses new orders and becomes read-only until funded.
customers
/api/v1/lotsstore/stores/:id/customers/:customerIdGet Customer
get_customerGets one store customer, addresses, and store-scoped order summary after customer-group ownership checks. tax says whether the customer is tax exempt (certificate and expiry) and the business tax number they gave. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/customersList Customers
list_customersList a store's customers with search, creation date filters and paging. For customers added today, send created_after with today's date and the person's time_zone. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/customers/:customerId/taxUpdate customer tax
update_customer_taxMarks a customer with an account as tax exempt, with the exemption certificate number and an optional expiry date, or saves their business tax number (VAT number, GSTIN, ABN). Their orders charge no tax while they are signed in and the exemption is valid, and the invoice says "Tax exempt: certificate (number)". Owner or admin only.
discounts
/api/v1/lotsstore/stores/:id/promotionsCreate Discount
create_promotionCreates a discount code for one store: a percentage or a fixed amount off the whole order. Shoppers type it in the Discount code field in the cart or at checkout; one code per order. The code is stored in upper case and works only while its status is active. limit is how many orders can use it: an order counts from the moment it is placed, also while its payment is pending, and gives its use back if it is cancelled, or closes or is replaced without being paid; null means unlimited. Delivery prices, free delivery above an amount and minimum order amounts use the price after the code. Codes cannot be limited to products, dates or a minimum order. A fixed value is in major units (500 is ₹500.00).
/api/v1/lotsstore/stores/:id/promotions/:promotionIdDelete Discount
delete_promotionDeletes a store-owned discount code.
/api/v1/lotsstore/stores/:id/promotionsList Discounts
list_promotionsList a store's discount codes with status, value and used (orders holding the code, counted by LotsStore: paid or open orders, including unpaid orders still in their payment window). A fixed discount's value is in major units (500 is ₹500.00), a percentage is a percent; display_value on each code says it in words.
/api/v1/lotsstore/stores/:id/promotions/:promotionIdUpdate Discount
update_promotionChanges the status of a store-owned discount code.
domains
/api/v1/lotsstore/stores/:id/domainsAdd Custom Domain
add_custom_domainConnect the person's own domain (for example shop.example.com) to a store. Returns one CNAME record pointing to customers.mylots.store for the owner to add at their DNS provider; HTTPS is set up automatically.
/api/v1/lotsstore/domains/:idDelete Custom Domain
delete_custom_domainRemoves a custom domain from a store and its storefront deployment.
/api/v1/lotsstore/stores/:id/domainsList Custom Domains
list_custom_domainsLists custom domains configured for a store.
/api/v1/lotsstore/domains/:id/verifyVerify Custom Domain
verify_custom_domainCheck a connected domain: reports whether DNS is in place, the security certificate is being issued, or the store is live on the domain.
inventory
/api/v1/lotsstore/stores/:id/inventoryList Inventory
list_inventoryList stock per product variant: in stock, reserved by open orders, incoming and available.
/api/v1/lotsstore/stores/:id/inventoryUpdate Inventory
update_inventorySet the stock of a product variant.
orders
/api/v1/lotsstore/stores/:id/orders/exportExport orders
export_ordersExport a store's orders as rows for a spreadsheet: one row per item, with the order number and date, status, customer, shipping address and phone, item, variant, SKU, quantity and price, order totals, payment, fulfilment, tracking and refunds. Order totals and refunds are on the first row of each order only, so adding up a column gives the real revenue. Store owners and admins only; every export is recorded in the store activity log. Default range is the last 30 days (at most 366 days and 50,000 orders per export). Expired, rejected and canceled orders are left out unless you name them in status. Returns up to 250 orders per call; pass next_cursor back as cursor to get the next page until it is null. Amount columns are in major units (599 is ₹599.00), not minor units.
/api/v1/lotsstore/stores/:id/checkout-orders/:checkoutOrderIdGet Checkout Order
get_checkout_orderGets a tenant-scoped checkout order request, payment attempts, and timeline. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/orders/:orderIdGet Order
get_orderGet one confirmed order: items, totals, customer, addresses, payment and fulfilment. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/checkout-ordersList Checkout Orders
list_checkout_ordersLists pre-fulfillment checkout order requests and their independent payment/acceptance states, newest first. For orders placed today, send created_after with today's date and the person's time_zone. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/ordersList Orders
list_ordersList a store's confirmed orders with paging, status and creation date filters. For orders placed today, send created_after with today's date and the person's time_zone. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/checkout-orders/:checkoutOrderId/operationsOperate Checkout Order
operate_checkout_orderMoves a confirmed LotsStore order through its steps and records refunds made by hand. action: start_processing (from confirmed); fulfill, which packs the order (from confirmed or processing; input.packing_note, input.items); ship (from packed; input.tracking_number required, input.courier_name, input.tracking_url); deliver (from shipped); cancel (only before the order ships; cancelling an order paid online refunds it and is dashboard only); manual_refund (input.reference, input.amount_minor; records money returned outside LotsStore). Steps only move forward: a refused move answers 409 ORDER_STEP_NOT_ALLOWED with the reason, and the same idempotency_key again returns the order unchanged. A shipped order is also marked delivered automatically auto_deliver_after_days after shipping (store setting, default 7, 0 = off), or when the shopper presses "I received my order". The shopper gets an email at each step with a link to their order page. refund, refund_try_now and refund_balance are dashboard only. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/checkout-orders/:checkoutOrderIdUpdate Checkout Order
update_checkout_orderApplies an audited payment verification or seller acceptance action. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
payments
/api/v1/lotsstore/stores/:id/payments/razorpay/connectConnect Razorpay
connect_razorpayRecord the store's own Razorpay account after the owner connects it. Prefer start_payment_oauth, which gives the owner a Razorpay sign-in link.
/api/v1/lotsstore/stores/:id/payments/stripe/connectConnect Stripe
connect_stripeConnect the store owner's own Stripe account. Returns the store's Payments page, where the owner pastes one Stripe restricted key, and the steps page for creating that key. Never ask for or accept a Stripe key in chat. Charges run on the owner's Stripe account and settle to their Stripe balance; LotsStore takes 0% of sales. Stripe works in the countries Stripe supports.
/api/v1/lotsstore/stores/:id/payment-settingsGet Payment Settings
get_payment_settingsGets safe payment method and order acceptance settings for a store.
/api/v1/lotsstore/stores/:id/payment-connections/:provider/startStart Payment Provider Connection
start_payment_oauthStart connecting the store's own Razorpay account: returns a Razorpay sign-in and consent link for the store owner to open in their browser. Payments settle straight to the merchant's Razorpay account.
/api/v1/lotsstore/stores/:id/payment-connections/razorpay/onboarding/startStart Razorpay Account Onboarding
start_razorpay_onboardingGet a link for the store owner to open in their browser to sign in to Razorpay, or create a Razorpay account, and connect it to the store. For businesses registered in India. Money from online payments then settles to the owner's own Razorpay account.
/api/v1/lotsstore/stores/:id/payment-settingsUpdate Payment Settings
update_payment_settingsTurn checkout on or off, choose test or live mode, and set which payment methods the store offers (Stripe, Razorpay, UPI to a UPI ID, WhatsApp orders) and whether verified payments are accepted automatically. A Stripe key is pasted by the owner on the Payments page, never sent here from a chat.
products
/api/v1/lotsstore/stores/:id/productsAdd Product
add_productAdd a product to a store with its variants (for example sizes or colours), prices in minor units of the store currency, stock, images and category. Products start as drafts unless status is published.
/api/v1/lotsstore/stores/:id/products/:productId/variantsAdd Product Variant
add_product_variantCreates a variant with options, pricing, identifiers, dimensions, and inventory behavior on an owned product.
/api/v1/lotsstore/stores/:id/products/bulkBulk Add Products
bulk_add_productsAdd up to 100 products to a store in one call, each with the same fields as add_product.
/api/v1/lotsstore/stores/:id/categoriescreate Category
create_categoryCreate a product category, optionally under a parent category.
/api/v1/lotsstore/stores/:id/collectionscreate Collection
create_collectionCreate a product collection, such as Summer or Best sellers.
/api/v1/lotsstore/stores/:id/categories/:categoryIddelete Category
delete_categoryDelete a product category. Products in it are kept.
/api/v1/lotsstore/stores/:id/collections/:collectionIddelete Collection
delete_collectionDelete a product collection. Its products are kept.
/api/v1/lotsstore/stores/:id/products/:productIdDelete Product
delete_productDeletes a product and its derived Lots snapshot after validating store ownership.
/api/v1/lotsstore/stores/:id/products/:productId/variants/:variantIdDelete Product Variant
delete_product_variantDeletes a variant after validating store and product ownership.
/api/v1/lotsstore/stores/:id/products/:productIdGet Product
get_productGet one product with its variants, prices, stock settings, images and categories. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/categorieslist Categories
list_categoriesList a store's product categories, including parent and subcategories and their order.
/api/v1/lotsstore/stores/:id/collectionslist Collections
list_collectionsList a store's product collections.
/api/v1/lotsstore/stores/:id/productsList Products
list_productsList a store's products with search, status filter, creation date filters and paging. For products added today, send created_after with today's date and the person's time_zone. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/categories/:categoryIdupdate Category
update_categoryRename, move or reorder a product category.
/api/v1/lotsstore/stores/:id/collections/:collectionIdupdate Collection
update_collectionRename a product collection or change its handle.
/api/v1/lotsstore/stores/:id/products/:productIdUpdate Product
update_productChange a product: title, description, status, prices, variants, images, categories, SEO and more.
/api/v1/lotsstore/stores/:id/products/:productId/variants/:variantIdUpdate Product Variant
update_product_variantUpdates a variant and its prices after validating store and product ownership.
reviews
/api/v1/lotsstore/stores/:id/reviewsList Product Reviews
list_product_reviewsLists tenant-scoped product reviews for merchant moderation.
/api/v1/lotsstore/stores/:id/reviews/:reviewIdModerate Product Review
moderate_product_reviewPublishes or rejects a tenant-owned product review.
/api/v1/lotsstore/stores/:id/reviews/:reviewId/replyReply to Product Review
reply_product_reviewAdds or updates the merchant reply on a tenant-owned review.
settings
/api/v1/lotsstore/stores/:id/whatsapp-connection/disconnectDisconnect WhatsApp
disconnect_whatsappDisconnect the store's own WhatsApp number from LotsStore, under the owner's instruction: shoppers stop getting order messages from it, and LotsStore stops receiving its message events. The number keeps working in WhatsApp (and in the WhatsApp Business app); nothing is deleted at Meta. Preview first: without confirm it changes nothing and answers what would stop. Show that to the owner; only after they agree, call again with confirm: true. Reconnecting needs the dashboard. Store owners and admins only.
/api/v1/lotsstore/stores/:id/whatsapp-connectionGet WhatsApp connection
get_whatsapp_connectionThe store's own WhatsApp number that sends order messages to shoppers (order confirmed, order shipped, UPI payment reminder), connected by the owner in the dashboard (Settings, WhatsApp; Meta's sign-in window, so it cannot be connected from here). Returns connected, the number and business name, whether it also runs in the WhatsApp Business app, the message language, each message's template status at Meta (approved, pending, rejected), what Meta reports about the account (payment method, daily messaging limit, quality) when it can be read, recent sending problems in plain words, and the counts of messages sent in the last 30 days. Never returns a token. Store owners and admins only.
shipping
/api/v1/lotsstore/stores/:id/shipping-settingsGet Shipping Settings
get_shipping_settingsGet a store's shipping setup: business and origin address, fallback product weight, delivery date settings (processing days, order cut-off time, working days, automatic delivered after days, time zone), handling fee, zones (highest priority first) and delivery methods with their rates, price bands, limits and delivery days. delivery_settings has every setting with its default filled in. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/shipping-settingsUpdate Shipping Settings
update_shipping_settingsChange a store's shipping setup. Send zones or methods as the full list the store keeps: any left out are removed (get_shipping_settings first). When an address matches more than one zone, only the zone with the highest priority is used; methods without a zone always apply. Method types: fixed, free, local_pickup (needs no delivery address at checkout) and rate_band, priced by a band table of weight (grams) or order value (minor units). The handling fee is added to paid delivery options only; delivery dates count processing days and the method's days as working days from the order cut-off time.
stores
/api/v1/lotsstore/stores/:id/archiveArchive a store
archive_storeArchive a store: owner only, confirmed by typing the store name in confirm_name. The storefront goes offline and billing for the store stops; nothing is deleted. The owner can restore it for 30 days. Show the person what this does and get their go-ahead first.
/api/v1/lotsstore/storesCreate Store
create_storeCreate a store with a free name.mylots.store address. Needs room on the person's LotsStore plan or LotsTech Credits (check get_billing). The country decides the store currency (for example US sells in USD, IN in INR) and cannot change later. The store starts as a draft; publish_store puts it live.
/api/v1/lotsstore/stores/:idGet Store
get_storeGets one LotsStore tenant, storefront settings, user role, and public URL.
/api/v1/lotsstore/stores/:id/activityList Store Activity
list_store_activityLists recent merchant and commerce activity for an accessible store.
/api/v1/lotsstore/storesList Stores
list_storesLists LotsStore tenants where the authenticated user is an active member.
/api/v1/lotsstore/stores/:id/publishPublish Store
publish_storePut a store's storefront live at its address so shoppers can browse and buy.
/api/v1/lotsstore/stores/:id/restoreRestore an archived store
restore_storeRestore a store archived in the last 30 days: owner only. It needs room on the person's plan or LotsTech Credits; the storefront comes back online.
/api/v1/lotsstore/stores/:idUpdate Store
update_storeUpdate a store's name, description, settings or status. Set status to archived to stop billing for the store and take its storefront offline (nothing is deleted); set it back to draft or active to restore it, which needs room on your plan or LotsTech Credits.
/api/v1/lotsstore/stores/:id/storefrontUpdate Storefront Settings
update_storefront_settingsSaves, publishes, or resets versioned storefront appearance, content, navigation, policies, and SEO settings.
support
/api/v1/lotsstore/stores/:store_id/support-accessGrant Support Access
grant_support_accessLet LotsTech support (support@lotstech.com) into one store for a limited time so they can look at a problem and fix it. Support joins as Admin and can never change billing, payments, the owner or the team. Without confirmed: true it changes nothing and returns the consent text; grant only after the person has read it and said yes. duration is 24h, 7d (default) or 30d. may_publish (default false) lets support publish fixes live. Granting again while access is on changes the end time. It opens a support case for the person.
/api/v1/lotsstore/stores/:store_id/support-accessList Support Access
list_support_accessWhether LotsTech support has access to this store, until when, and what support did there. available false means support access is not set up yet.
/api/v1/lotsstore/stores/:store_id/support-accessRevoke Support Access
revoke_support_accessEnd LotsTech support's access to this store now. Support leaves the team at once.
taxes
/api/v1/lotsstore/stores/:id/tax-categoriesCreate tax category
create_tax_categoryAdds a tax category, for example "Food (reduced)" or "Books (zero rate)". Set what it pays per country in update_tax_settings rates, then give products the category with set_product_tax_category.
/api/v1/lotsstore/stores/:id/tax-settingsGet Tax Settings
get_tax_settingsGets the store's tax registrations, rates per country, region and US ZIP code, tax categories, price display, shipping tax and invoice settings, plus suggested standard rates (each with the date it was checked and its source) and notices when a suggestion you used has changed. Suggestions are never applied by themselves. stripe_tax says whether "Use Stripe Tax" is on, whether the store's Stripe connection can use it, and the fallback. business_buyers says whether checkout asks for a business tax number, whether the reverse charge is on and whether refunds get credit notes.
/api/v1/lotsstore/stores/:id/tax-categoriesList tax categories
list_tax_categoriesLists the store's tax categories (Standard and any others, such as food or books) with how many products use each.
/api/v1/lotsstore/stores/:id/tax-previewPreview tax
preview_taxShows the tax and total a shopper at an address would pay for given products, without placing an order. Works the tax out the same way checkout does: with the store's own registrations, rates, ZIP rates and tax categories, or with Stripe Tax when it is on. engine says which answered: lots (own rates), stripe_tax, or lots_fallback (Stripe Tax was unavailable and the store uses its own rates then). Nothing is saved. Amounts are in minor units (59900 is ₹599.00); every amount has a display_<name> value beside it: quote that value.
/api/v1/lotsstore/stores/:id/products/:productId/tax-categorySet product tax category
set_product_tax_categoryGives a product, or one of its variants, a tax category by code. Send an empty code to go back to Standard (for a variant: the same as its product).
/api/v1/lotsstore/stores/:id/tax-categories/:categoryIdUpdate tax category
update_tax_categoryChanges a tax category's name, code, kind, home rate, HSN/SAC code or whether it is the default.
/api/v1/lotsstore/stores/:id/tax-settingsUpdate Tax Settings
update_tax_settingsUpdates where the store is registered for tax, the rates it charges per country, region and US ZIP code, tax categories, whether prices include tax, shipping tax, rounding and invoice settings, the optional "Use Stripe Tax" switch with what happens when Stripe Tax is unavailable, and business buyers: an optional tax number field at checkout, the EU reverse charge and credit notes for refunds. Lists you send replace the saved list; leave a list out to keep it. Suggested rates are never saved unless you send them.
team
/api/v1/lotsstore/invitations/acceptAccept a store invitation
accept_store_invitationAccept an invitation to a store's team with the token from the invitation link. The signed-in account's email must match the invitation.
/api/v1/lotsstore/stores/:id/teamInvite a store teammate
add_store_memberInvite a teammate to a store by email with a role (admin, manager, staff or viewer). They get an email with a link and have access only after they accept it, signed in with that email. Returns invite_url to share if the email does not arrive. Inviting someone again sends a fresh link.
/api/v1/lotsstore/stores/:id/leaveLeave a store
leave_storeLeave a store's team. Anyone except the owner can leave; the owner archives the store instead. Rejoining needs a new invitation.
/api/v1/lotsstore/stores/:id/teamList Store Team Members
list_store_membersLists a store's team: active members, pending invitations (with when they expire) and removed members.
/api/v1/lotsstore/stores/:id/team/:memberIdRemove Store Team Member
remove_store_memberDeactivates a store team member without deleting audit history.
/api/v1/lotsstore/stores/:id/team/:memberIdUpdate Store Team Member
update_store_memberUpdates a store team member role or active status.
