Skip to content
Mehrdad Pajuhaan edited this page Oct 23, 2026 · 1 revision

FAQ

Answers to common questions about building vendor panels with @selldone/sdk-vendor, including the setup and authentication problems developers hit most often.

What is the difference between the Vendor SDK and the Backoffice SDK?

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.

Does my shop need to be a marketplace?

Yes. Vendors, vendor offers and vendor panels exist only in shops whose business model is marketplace.

How do I find the vendor ID?

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());

Which token and scopes does a vendor panel use?

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.

My requests return 401 Unauthenticated

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.

Every request goes to a URL that starts with undefined

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.

Setup throws "The service url is not defined in [service-url] meta tag!"

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.

How does a vendor change the price or stock of its offer?

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.

Can I reuse the Selldone dashboard components in my vendor panel?

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.

Can I use the SDK in Node.js?

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.

Are there rate limits?

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.

Related