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

FAQ

Answers to common questions about the Selldone Backoffice API and the @selldone/sdk-backoffice JavaScript SDK, including the errors developers run into most often.

Should I use the JavaScript SDK or call the REST API directly?

Use the REST API from servers, ERPs, scripts and any non-JavaScript stack: every operation is a plain HTTPS call to https://api.selldone.com with a bearer token (Fast Start). Use the SDK when you build a browser dashboard in JavaScript or TypeScript and want typed wrappers, caching and request cancellation (JavaScript SDK). Both use the same endpoints and tokens.

Can I use the SDK in Node.js?

Not directly. The SDK reads its configuration from <meta> tags in document.head and registers globals on window (window.API, window.$backoffice, window.axios), so it is designed for the browser. On a server, call the REST endpoints with any HTTP client. You can still use apis/API.ts as a reference for paths, methods and scopes.

Where do I find my shop ID?

The ERP Bridge shows the shop ID next to the generated token (see Access Token). The ID also appears in the URLs of your shop's dashboard.

BackofficeSDK.Setup() throws "console.style not found"

Selldone Core must be initialized first:

SelldoneCore.Setup();
BackofficeSDK.Setup();

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

Selldone Core needs the service-url value. Add <meta name="service-url" content="https://selldone.com"> to the page head, or define window.selldone_config = { "service-url": "https://selldone.com", ... } before calling Setup(). Also add selldone-api so that window.API builds correct URLs. See Getting Started.

My requests return 401 Unauthenticated

The request has no valid token. The SDK does not add an Authorization header by itself; set it after Setup():

window.axios.defaults.headers.common["Authorization"] = `Bearer ${ACCESS_TOKEN}`;

If the header is set, the token may have expired or been revoked. Generate a new one in the developer panel or through the ERP Bridge.

My requests return 403 with token_has_no_access

The token is missing a required scope, or the user behind it has no access to that shop or permission region. Each URL builder in apis/API.ts documents its @scope and @permission. Request a new token with the missing scope (Access Token).

I get 429 Too Many Requests

You exceeded the dashboard API budget of 80 requests per minute, or a stricter route-specific limit. Back off, retry later, and reduce request volume with pagination, updated_at filters and caching. See Rate Limits.

How many items can I load per page?

Product lists accept up to 250 items per request; 100 is a safe default (Fetch Products List). Vendor and vendor-product lists accept up to 200.

I edited a product, but the vendor's price and stock did not change

In a multi-vendor marketplace, price, quantity, lead time and variant availability are stored per vendor offer. The global Edit Product endpoint does not change them. Use Vendor Product Update as the marketplace owner, or let the vendor update the offer from a vendor panel built with the Vendor SDK.

The endpoint I need has no window.$backoffice method

Build the URL with window.API and call it with window.axios. Search apis/API.ts or the generated catalog ai-guideline/_generated/api-url-builders.md for the builder, HTTP method and scope. An example is at the end of JavaScript SDK.

article.tags.updateTag() fails with "Cannot read properties of undefined"

updateTag builds its URL with window.XAPI, which is created by the Storefront SDK. Set up the Storefront SDK in the same page, or call PUT /shops/{shop_id}/articles/tags with { old, new } directly using window.API.PUT_CHANGE_TAG(shop_id).

A canceled request rejected my promise with undefined

That is expected when .cancellation() is enabled: the older request to the same URL is canceled and rejects with undefined. Ignore undefined in your catch handler.

Related

Clone this wiki locally