Business Apps API

A shop with no website: your system is the shop front, and we keep the orders, bills, stock, points and receipts

Turn it on

  1. On the Integrations page, in the Business Apps API card, click Pick a size and turn on
  2. Pick the shop database's size (you can start small) and its storage (from 10 GB) (prices for each size are on the pricing page)
  3. Click Turn on, give the database a moment to start, and call the API

Each Project has one shop, which can have several branches. For several businesses, use separate Projects (their wallets and bills are already separate). An API shop has no order or item quotas and no monthly module fees.

Resize any time with Resize: CPU and RAM go up or down, storage only grows. The database restarts once.

The shop's backups are on the Integrations page, Backup tab: turn on automatic backups (every 6 or 12 hours, daily or weekly), take one yourself before a big change, and restore one yourself. Only the Owner or an Admin can restore.

Turn off deletes the database and all shop data (items, orders, bills, bookings, members) at once, and it cannot be undone. You confirm by typing the Project name, and the Project cannot be deleted while the Business Apps API is on.

Example: an item, an order and the payment

Shell
API=https://api.thailandhosting.com/v1
KEY="Authorization: Bearer thk_YOUR_KEY"

# An item; prices are in satang (6500 = 65 baht)
curl -X POST $API/apps/items -H "$KEY" -d '{"name":"Latte","category":"Coffee","price":6500,"available":true}'

# A counter order
curl -X POST $API/apps/orders -H "$KEY" -d '{"items":[{"id":"ITEM_ID","qty":2}],"fulfilment":"pickup","payment":"cash"}'

# A PromptPay QR for 130 baht
curl "$API/apps/payment-qr?amount=13000" -H "$KEY"

# Paid: complete the order
curl -X PATCH $API/apps/orders/ORDER_ID -H "$KEY" -d '{"paid":true,"status":"completed"}'
AreaWhat you can do
ShopRead and change the shop's settings, PromptPay/LaoQR, VAT and receipts
ItemsAdd, change and delete items, options, prices and stock
OrdersCreate, change status, take payment, refund (with a credit note) and print receipts
Table bills and shiftsOpen a bill, add orders, close it, open and close till shifts, and the close-of-shift report
Members and couponsSee members, add or take points, and manage coupons
Bookings and roomsServices, staff, bookings, rooms, check-in/out, room charges and folios
Branches and reportsManage branches and read sales reports

Money is always in hundredths of the shop's currency (satang, or the smallest unit of kip). An API shop sends no email to customers itself: your system talks to them, and webhooks tell it at once when something changes.

If something goes wrong

Calls answer 503 starting

The shop's database is starting (after turning on or resizing). Wait for Retry-After and try again.

Changing an order answers 403 saying it needs approval

The shop's settings ask a manager to approve this change (e.g. a refund after the shift was closed). Put the reason in reason and try again.

Creating a branch, room or coupon answers 400

Read detail in the error: it is the same message the shop screens show. Fix the data accordingly.

Still stuck? Let our team help

Open a ticket from the Console. Tell us the site or service, what you did and the message on screen. Our reply comes back in the same ticket, so everything stays in one place.