LotsStore

API Documentation

RESTful API documentation for developers

Quick Info
Base URL
https://api.lotsstore.app
Authentication

API Key (Bearer token or X-API-Key header)

Total Endpoints

78

Getting Started

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/analytics

analytics

GET
/api/v1/lotsstore/stores/:id/analytics

Get Store Analytics

get_store_analytics

Revenue, 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

POST
/api/v1/lotsstore/checkout

Choose a LotsStore plan or add credits

create_checkout

Create 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.

GET
/api/v1/lotsstore/billing

Get LotsStore billing

get_billing

Show 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

GET
/api/v1/lotsstore/stores/:id/customers/:customerId

Get Customer

get_customer

Gets 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.

GET
/api/v1/lotsstore/stores/:id/customers

List Customers

list_customers

List 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.

PATCH
/api/v1/lotsstore/stores/:id/customers/:customerId/tax

Update customer tax

update_customer_tax

Marks 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

POST
/api/v1/lotsstore/stores/:id/promotions

Create Discount

create_promotion

Creates 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).

DELETE
/api/v1/lotsstore/stores/:id/promotions/:promotionId

Delete Discount

delete_promotion

Deletes a store-owned discount code.

GET
/api/v1/lotsstore/stores/:id/promotions

List Discounts

list_promotions

List 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.

PATCH
/api/v1/lotsstore/stores/:id/promotions/:promotionId

Update Discount

update_promotion

Changes the status of a store-owned discount code.

domains

POST
/api/v1/lotsstore/stores/:id/domains

Add Custom Domain

add_custom_domain

Connect 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.

DELETE
/api/v1/lotsstore/domains/:id

Delete Custom Domain

delete_custom_domain

Removes a custom domain from a store and its storefront deployment.

GET
/api/v1/lotsstore/stores/:id/domains

List Custom Domains

list_custom_domains

Lists custom domains configured for a store.

POST
/api/v1/lotsstore/domains/:id/verify

Verify Custom Domain

verify_custom_domain

Check a connected domain: reports whether DNS is in place, the security certificate is being issued, or the store is live on the domain.

inventory

GET
/api/v1/lotsstore/stores/:id/inventory

List Inventory

list_inventory

List stock per product variant: in stock, reserved by open orders, incoming and available.

PATCH
/api/v1/lotsstore/stores/:id/inventory

Update Inventory

update_inventory

Set the stock of a product variant.

orders

GET
/api/v1/lotsstore/stores/:id/orders/export

Export orders

export_orders

Export 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.

GET
/api/v1/lotsstore/stores/:id/checkout-orders/:checkoutOrderId

Get Checkout Order

get_checkout_order

Gets 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.

GET
/api/v1/lotsstore/stores/:id/orders/:orderId

Get Order

get_order

Get 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.

GET
/api/v1/lotsstore/stores/:id/checkout-orders

List Checkout Orders

list_checkout_orders

Lists 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.

GET
/api/v1/lotsstore/stores/:id/orders

List Orders

list_orders

List 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.

POST
/api/v1/lotsstore/stores/:id/checkout-orders/:checkoutOrderId/operations

Operate Checkout Order

operate_checkout_order

Moves 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.

PATCH
/api/v1/lotsstore/stores/:id/checkout-orders/:checkoutOrderId

Update Checkout Order

update_checkout_order

Applies 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

POST
/api/v1/lotsstore/stores/:id/payments/razorpay/connect

Connect Razorpay

connect_razorpay

Record the store's own Razorpay account after the owner connects it. Prefer start_payment_oauth, which gives the owner a Razorpay sign-in link.

POST
/api/v1/lotsstore/stores/:id/payments/stripe/connect

Connect Stripe

connect_stripe

Connect 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.

GET
/api/v1/lotsstore/stores/:id/payment-settings

Get Payment Settings

get_payment_settings

Gets safe payment method and order acceptance settings for a store.

POST
/api/v1/lotsstore/stores/:id/payment-connections/:provider/start

Start Payment Provider Connection

start_payment_oauth

Start 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.

POST
/api/v1/lotsstore/stores/:id/payment-connections/razorpay/onboarding/start

Start Razorpay Account Onboarding

start_razorpay_onboarding

Get 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.

PATCH
/api/v1/lotsstore/stores/:id/payment-settings

Update Payment Settings

update_payment_settings

Turn 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

POST
/api/v1/lotsstore/stores/:id/products

Add Product

add_product

Add 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.

POST
/api/v1/lotsstore/stores/:id/products/:productId/variants

Add Product Variant

add_product_variant

Creates a variant with options, pricing, identifiers, dimensions, and inventory behavior on an owned product.

POST
/api/v1/lotsstore/stores/:id/products/bulk

Bulk Add Products

bulk_add_products

Add up to 100 products to a store in one call, each with the same fields as add_product.

POST
/api/v1/lotsstore/stores/:id/categories

create Category

create_category

Create a product category, optionally under a parent category.

POST
/api/v1/lotsstore/stores/:id/collections

create Collection

create_collection

Create a product collection, such as Summer or Best sellers.

DELETE
/api/v1/lotsstore/stores/:id/categories/:categoryId

delete Category

delete_category

Delete a product category. Products in it are kept.

DELETE
/api/v1/lotsstore/stores/:id/collections/:collectionId

delete Collection

delete_collection

Delete a product collection. Its products are kept.

DELETE
/api/v1/lotsstore/stores/:id/products/:productId

Delete Product

delete_product

Deletes a product and its derived Lots snapshot after validating store ownership.

DELETE
/api/v1/lotsstore/stores/:id/products/:productId/variants/:variantId

Delete Product Variant

delete_product_variant

Deletes a variant after validating store and product ownership.

GET
/api/v1/lotsstore/stores/:id/products/:productId

Get Product

get_product

Get 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.

GET
/api/v1/lotsstore/stores/:id/categories

list Categories

list_categories

List a store's product categories, including parent and subcategories and their order.

GET
/api/v1/lotsstore/stores/:id/collections

list Collections

list_collections

List a store's product collections.

GET
/api/v1/lotsstore/stores/:id/products

List Products

list_products

List 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.

PATCH
/api/v1/lotsstore/stores/:id/categories/:categoryId

update Category

update_category

Rename, move or reorder a product category.

PATCH
/api/v1/lotsstore/stores/:id/collections/:collectionId

update Collection

update_collection

Rename a product collection or change its handle.

PATCH
/api/v1/lotsstore/stores/:id/products/:productId

Update Product

update_product

Change a product: title, description, status, prices, variants, images, categories, SEO and more.

PATCH
/api/v1/lotsstore/stores/:id/products/:productId/variants/:variantId

Update Product Variant

update_product_variant

Updates a variant and its prices after validating store and product ownership.

reviews

GET
/api/v1/lotsstore/stores/:id/reviews

List Product Reviews

list_product_reviews

Lists tenant-scoped product reviews for merchant moderation.

PATCH
/api/v1/lotsstore/stores/:id/reviews/:reviewId

Moderate Product Review

moderate_product_review

Publishes or rejects a tenant-owned product review.

POST
/api/v1/lotsstore/stores/:id/reviews/:reviewId/reply

Reply to Product Review

reply_product_review

Adds or updates the merchant reply on a tenant-owned review.

settings

POST
/api/v1/lotsstore/stores/:id/whatsapp-connection/disconnect

Disconnect WhatsApp

disconnect_whatsapp

Disconnect 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.

GET
/api/v1/lotsstore/stores/:id/whatsapp-connection

Get WhatsApp connection

get_whatsapp_connection

The 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

GET
/api/v1/lotsstore/stores/:id/shipping-settings

Get Shipping Settings

get_shipping_settings

Get 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.

PATCH
/api/v1/lotsstore/stores/:id/shipping-settings

Update Shipping Settings

update_shipping_settings

Change 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

POST
/api/v1/lotsstore/stores/:id/archive

Archive a store

archive_store

Archive 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.

POST
/api/v1/lotsstore/stores

Create Store

create_store

Create 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.

GET
/api/v1/lotsstore/stores/:id

Get Store

get_store

Gets one LotsStore tenant, storefront settings, user role, and public URL.

GET
/api/v1/lotsstore/stores/:id/activity

List Store Activity

list_store_activity

Lists recent merchant and commerce activity for an accessible store.

GET
/api/v1/lotsstore/stores

List Stores

list_stores

Lists LotsStore tenants where the authenticated user is an active member.

POST
/api/v1/lotsstore/stores/:id/publish

Publish Store

publish_store

Put a store's storefront live at its address so shoppers can browse and buy.

POST
/api/v1/lotsstore/stores/:id/restore

Restore an archived store

restore_store

Restore 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.

PATCH
/api/v1/lotsstore/stores/:id

Update Store

update_store

Update 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.

PATCH
/api/v1/lotsstore/stores/:id/storefront

Update Storefront Settings

update_storefront_settings

Saves, publishes, or resets versioned storefront appearance, content, navigation, policies, and SEO settings.

support

POST
/api/v1/lotsstore/stores/:store_id/support-access

Grant Support Access

grant_support_access

Let 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.

GET
/api/v1/lotsstore/stores/:store_id/support-access

List Support Access

list_support_access

Whether LotsTech support has access to this store, until when, and what support did there. available false means support access is not set up yet.

DELETE
/api/v1/lotsstore/stores/:store_id/support-access

Revoke Support Access

revoke_support_access

End LotsTech support's access to this store now. Support leaves the team at once.

taxes

POST
/api/v1/lotsstore/stores/:id/tax-categories

Create tax category

create_tax_category

Adds 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.

GET
/api/v1/lotsstore/stores/:id/tax-settings

Get Tax Settings

get_tax_settings

Gets 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.

GET
/api/v1/lotsstore/stores/:id/tax-categories

List tax categories

list_tax_categories

Lists the store's tax categories (Standard and any others, such as food or books) with how many products use each.

POST
/api/v1/lotsstore/stores/:id/tax-preview

Preview tax

preview_tax

Shows 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.

POST
/api/v1/lotsstore/stores/:id/products/:productId/tax-category

Set product tax category

set_product_tax_category

Gives 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).

PATCH
/api/v1/lotsstore/stores/:id/tax-categories/:categoryId

Update tax category

update_tax_category

Changes a tax category's name, code, kind, home rate, HSN/SAC code or whether it is the default.

PATCH
/api/v1/lotsstore/stores/:id/tax-settings

Update Tax Settings

update_tax_settings

Updates 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

POST
/api/v1/lotsstore/invitations/accept

Accept a store invitation

accept_store_invitation

Accept an invitation to a store's team with the token from the invitation link. The signed-in account's email must match the invitation.

POST
/api/v1/lotsstore/stores/:id/team

Invite a store teammate

add_store_member

Invite 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.

POST
/api/v1/lotsstore/stores/:id/leave

Leave a store

leave_store

Leave a store's team. Anyone except the owner can leave; the owner archives the store instead. Rejoining needs a new invitation.

GET
/api/v1/lotsstore/stores/:id/team

List Store Team Members

list_store_members

Lists a store's team: active members, pending invitations (with when they expire) and removed members.

DELETE
/api/v1/lotsstore/stores/:id/team/:memberId

Remove Store Team Member

remove_store_member

Deactivates a store team member without deleting audit history.

PATCH
/api/v1/lotsstore/stores/:id/team/:memberId

Update Store Team Member

update_store_member

Updates a store team member role or active status.