Repository navigation
FAQ
Answers to common questions about building vendor panels with @selldone/sdk-vendor, including the setup and
authentication problems developers hit most often.
The Backoffice SDK is for the shop owner and staff: every call
is scoped to a shop (/shops/{shop_id}/...). The Vendor SDK is for vendors in a marketplace: every call is scoped
to one vendor (/vendors/{vendor_id}/...), so a vendor can only see and change its own products, orders and
payments. See Vendor Panels and Marketplaces.
Yes. Vendors, vendor offers and vendor panels exist only in shops whose business model is marketplace.
Call GET /vendors with the vendor user's token. It returns the vendors the user belongs to:
const { data } = await window.axios.get(window.VAPI.GET_MY_VENDORS());A token for the vendor user. The vendor-panel scopes are vendor-read and vendor-write (see the scope list on the
Backoffice wiki's Access Token
page). Provide the token as window.SelldoneUser.access_token before VendorSDK.Setup(), or set
window.axios.defaults.headers.common["Authorization"] yourself.
VendorSDK.Setup() reads the token only once, at setup time, from window.SelldoneUser or the
vendor_access_token cookie. If neither was available, no Authorization header is sent. Set
window.SelldoneUser before calling Setup(), or set the header afterwards. If the header is present, the token may
have expired or been revoked.
The selldone-vapi meta tag is missing, so window.VAPI has no base URL. Add
<meta name="selldone-vapi" content="..."> (or set window.selldone_config["selldone-vapi"]) before setup. See
Getting Started.
Both Selldone Core and the Vendor SDK need the main service URL. Add
<meta name="service-url" content="https://selldone.com"> to the page head.
Through the vendor inventory routes, for example PUT /vendors/{vendor_id}/inventory/{vendor_product_id}
(window.VAPI.PUT_MY_VENDOR_INVENTORY_UPDATE_PRODUCT). The owner-side endpoints
(/shops/{shop_id}/products/{product_id}/vendors/...) are restricted to the marketplace owner. For the vendor's own
products, use window.$vendor.product.setQuantity(). See Products and Inventory.
Yes. The backoffice widgets in Components (@selldone/components-vue)
check whether they run in vendor-panel mode and then call window.$vendor instead of window.$backoffice.
Not directly. The SDK reads its configuration from <meta> tags and registers globals on window. On a server,
call the vendor API routes with any HTTP client, using apis/VAPI.ts as the route reference.
The vendor API limits are not documented in this repository. Handle 429 Too Many Requests with a back-off and
retry, and cache list responses with .cache() and .optimize(). The Backoffice API limits and a retry example are
on the Backoffice wiki's Rate Limits page.