Appearance
Introduction
The XSelly Open Platform lets your own system work with an XSelly store. A sale page, a chat bot or an ERP can:
- create orders that behave exactly as if they had been keyed into the XSelly app. Stock is reserved, the shipping label can be printed and, unless you opt out, a tracking number is requested from the courier automatically.
- read orders back to follow payment and shipping, and to pick up tracking numbers.
- list the store's products and read one in full, with variants, prices and stock, to draw a sale page.
- receive webhooks when a product variant's available stock changes.
What you can call
| Endpoint | What it does |
|---|---|
POST /oauth/token | Exchange your credentials for an access token. |
POST /v1/order/create | Create one order. |
POST /v1/order/detail | Read one order, by XSelly id or by your own id. |
POST /v1/store/address/list | List your store's own addresses. Call it rarely and cache what it returns. |
POST /v1/product/list | List your store's products, to show them on a sale page. |
POST /v1/product/detail | Read one product in full, variants included. |
And one webhook XSelly sends to you: stock_available_updated.
How it fits together
An integration belongs to one app, which XSelly also calls a channel. A store owner creates it in XSelly under แอปภายนอก (API). The app has:
- a Client ID and Client Secret, which you exchange for an access token;
- a Webhook URL and Webhook Secret, if you want XSelly to notify you.
The access token identifies your app, and the app decides which store you are working in. That is why no request body ever carries a store_id: there is no way to reach another store, and no way to get it wrong.
A store can have several apps, one per system it connects. Each is configured separately and sees only its own external_order_ids.
Base URL
Every path in these docs, such as /oauth/token or /v1/order/create, is relative to your base URL. It is shown in the XSelly app. If you cannot find it, ask the XSelly team.
Orders are real
Every call works on the store's real data. An order created through the API reserves real stock and can request a real courier pickup, so test against a store where you are happy to have test orders.
Where to next
- Quick start: from a fresh app to your first order, with cURL.
- Authentication: the token rules that save you from rate limits and lockouts.
- Conventions: ids, money and timestamps. Read this before writing a parser.
- API Reference: every field of every endpoint.
