Home / Developer API
DEVELOPERS

Developer API: the full reference

Every merchant endpoint is open: integrate one scenario (e.g. sync orders into your ERP) or build your own front end entirely. All endpoints below, searchable; responses are authoritative over docs.

Conventions

All endpoints are HTTPS POST with an application/json body (some also accept x-www-form-urlencoded).

Uniform envelope: {"code": 200, "msg": "ok", "data": {...}}. code 200 means success; any other code is a business error while HTTP status stays 200.

Money is always a two-decimal string (e.g. "88.00"). Timestamps use YYYY-MM-DD HH:mm:ss; a sale is dated by its completion time.

codeMeaning
200Success
100Missing or invalid parameter
101Not logged in / token expired
102No permission
429Rate limited, retry later
500Server error (please include out_trade_no / time when reporting)
Authentication

Successful logins issue a JWT as Cookie: token, valid 30 days with sliding renewal; send it back on every request (browsers do this automatically; server-side integrations should persist and replay it).

Customers log in via WeChat or SMS; the back office and POS use staff accounts. The two token types are not interchangeable. Public read endpoints under /api/login, /api/payment, /api/banner, /api/menu, /api/store, /api/cart work anonymously; everything else returns code 101 without a token.

Sandbox: https://orderstaging.teamotto.net (demo store Pizza King Mong Kok, store_id=13; request demo credentials from us).

Order Status Quick Reference
statusMeaning
0Awaiting payment
1 / 10 / 11 / 21Confirmed, preparing (11 dine-in, 21 takeaway)
22Ready for pickup (includes number_pick_up)
12 / 23 / 24 / 25Completed (table cleared / pickup verified)
41 / 42Cancelled / voided

Payment channels: 1 WeChat Pay, 2 QFPay, 91 cash, 92 Octopus, 93 FPS, 94 card. After checkout, poll Order/getInfoByOutTradeNo with out_trade_no (4s interval recommended).

Authentication登入認證

Public/api/Login/postLoginForWeChatCustomer WeChat login (miniprogram code to openid).
Parameters
code

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Login/postLoginForPhoneCustomer login via phone SMS code.
Parameters
phone_codephone_number

Request: HTTPS POST; uniform {code, msg, data} envelope.

Customer token/api/Login/postLogoutLog out and clear the token.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Login/postLoginForTestTest-environment login (staging only).
Parameters
user_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Login/postLoginForStaffStaff / merchant back-office login. Issues a JWT cookie (token), valid 30 days with sliding renewal.
Parameters
usernamepasswordbrand

Request: HTTPS POST; uniform {code, msg, data} envelope.

Stores & Tables門店與枱位

Public/api/Store/getBrandByHostForClientResolve brand info by host (customer entry).
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Store/getInfoForStaffRead the current staff's store profile.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Store/postEditForStaffUpdate store profile (open status, notice, takeaway settings).
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Store/getInfoByIdRead a store's public profile.
Parameters
store_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Store/getListForPagePaginated store list (geo sort, keyword), for chain overview and customer store picker.
Parameters
pagerowskeywordbrand_idlatitudelongitudesort_type

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Store/getLocationRead store geolocation.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Store/getSeatListForPageForStaffPaginated table (seat) list.
Parameters
pagerowskeyword

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Store/getSeatListAllForStaffAll seats, unfiltered.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Store/postSeatAddMultipleForStaffAdd seats in batch.
Parameters
array_list

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Store/postSeatDeleteForStaffDelete a seat.
Parameters
store_seat_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Banners橫額廣告

Public/api/Banner/getListAllByStoreIdRead store banners by position.
Parameters
store_idposition

Request: HTTPS POST; uniform {code, msg, data} envelope.

Menu Items菜品

Public/api/Menu/getInfoByIdCustomer-side menu item detail.
Parameters
menu_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/getInfoByIdForStaffStaff-side menu item detail (cost, stock config).
Parameters
menu_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/getListForPageForStaffPaginated menu search for back-office / POS.
Parameters
pagerowskeywordmenu_category_idstatus

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Menu/getListAllByMenuCategoryIdList items of a category (type 1 dine-in, 2 takeaway).
Parameters
menu_category_idtype

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/postEditForStaffCreate or update an item incl. specs, option groups and combos (specs/options absent from payload are removed).
Parameters
menu_idlist_attributelist_comboclear_spec

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/postModifyStatusAllForStaffBatch enable/disable items.
Parameters
status

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/postDeleteForStaffDelete an item.
Parameters
menu_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/getCategoryListAllByStoreIdAll categories of a store, admin view incl. combo-only ones.
Parameters
store_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Menu/getCategoryListAllWithMenuByStoreIdCustomer menu: categories with items (combo-only categories excluded).
Parameters
store_idtype

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/getCategoryListAllWithMenuForStaffIn-store ordering menu (categories with items).
Parameters
type

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/getMenuVersionForStaffMenu data version stamp for POS cache sync.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/getDailyConfigForStaffRead today's stock / special-price config.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/postMenuSupplyForStaffSet daily supply (sold-out restock, default stock).
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Menu/getDailyLogForStaffDaily stock change log.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Menu Categories菜品分類

Staff token/api/MenuCategory/getInfoByIdForStaffCategory detail.
Parameters
menu_category_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/MenuCategory/getListForPageForStaffPaginated category list.
Parameters
pagerowskeywordstatusdeleted

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/MenuCategory/postEditForStaffCreate or update a category (supply window, tea-fee, combo-only flag).
Parameters
menu_category_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/MenuCategory/postDeleteForStaffSoft-delete a category.
Parameters
menu_category_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/MenuCategory/postSetTimeBatchForStaffBatch-set category supply window.
Parameters
start_timeend_time

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/MenuCategory/getDeletedListForStaffDeleted-category list (trash).
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/MenuCategory/postRestoreForStaffRestore a deleted category.
Parameters
menu_category_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Cart購物車

Public/api/Cart/getListAllRead cart by store and seat.
Parameters
store_idnumber_seat

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Cart/postEditAdd or update a cart line.
Parameters
cart_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Cart/postDeleteDelete a cart line.
Parameters
cart_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Cart/postDeleteAllClear the cart.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Orders訂單

Public/api/Order/getInfoByOutTradeNoGet order by out_trade_no (customer status polling).
Parameters
out_trade_no

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/getInfoForStatisticForStaffSales statistics overview by day.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/getInfoForStatisticTwoForStaffStatistics by meal period / channel.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/getInfoForStatisticThreeForStaffStatistics by top-selling items.
Parameters
date

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/getInfoForStatisticChartForStaffChart data for a date range and channel.
Parameters
rangechanneldate

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/getInfoByOutTradeNoForStaffStaff-side order detail by out_trade_no.
Parameters
out_trade_no

Request: HTTPS POST; uniform {code, msg, data} envelope.

Public/api/Order/getListForPagePaginated orders (customer order history).
Parameters
pagerowskeywordstore_idtypestatusis_pending

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/getListForPageForStaffStore order list with status / period / time filters.
Parameters
pagerowskeywordtypestatusis_pendingstart_timeend_time

Request: HTTPS POST; uniform {code, msg, data} envelope.

Customer token/api/Order/postAddForUserCustomer checkout (dine-in or takeaway; returns out_trade_no for the cashier).
Parameters
array_item

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postAddForStaffStaff-side order creation (POS / tablet).
Parameters
array_item

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postSyncOfflineForStaffDescription in progress.
Parameters
client_uuidplaced_atpayment_methodpaid_amountarray_item

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postModifyForPaidForStaffMark order paid for offline methods (cash, Octopus, FPS).
Parameters
out_trade_nopayment_methodpaid_amount

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/getTodayLiveForStaffToday's live operations feed for big-screen / dashboard.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/getAiInsightForStaffAI business insight summary.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postModifyForCancelForStaffCancel or void an order with reason.
Parameters
out_trade_nocancel_reason

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postModifyForCompletePackForStaffMark takeaway packed: enters ready-for-pickup with pickup number.
Parameters
out_trade_nonumber_pick_up

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postScanResolveForStaffScan resolver (item-fire / pickup codes, tolerant of dropped chars).
Parameters
scan_text

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postPrintForStaffManually reprint receipt / kitchen ticket.
Parameters
out_trade_no

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postModifyForItemRefundForStaffRefund a single item.
Parameters
order_item_idquantityrefund_reason

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postModifyForSeatClearedForStaffMark table cleared (order becomes completed).
Parameters
out_trade_no

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Order/postItemModifyForProcessedForStaffMark one item processed (KDS item-level firing).
Parameters
order_item_idorder_item_combo_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Payment Callbacks支付回調

Gateway only/api/Payment/notifyWeChatPayGlobalWeChat Pay server callback (invoked by the payment gateway only).
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Gateway only/api/Payment/notifyQFPayGlobalQFPay server callback.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Payment Settings支付設置

Staff token/api/PaymentConfig/getForStaffRead store payment config (secrets masked).
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/PaymentConfig/postForStaffSave store payment config (QFPay merchant params).
Parameters
qfpay_mchidqfpay_codeqfpay_keyqfpay_currencyqfpay_status

Request: HTTPS POST; uniform {code, msg, data} envelope.

Printers打印機

Staff token/api/Printer/getInfoByIdForStaffPrinter detail.
Parameters
printer_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Printer/getListForPageForStaffPaginated printers (type 1 front receipt, 2 kitchen ticket).
Parameters
pagerowskeywordtypestatus

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Printer/postEditForStaffCreate or update a printer (cloud params, item binding).
Parameters
printer_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Printer/postDeleteForStaffDelete a printer.
Parameters
printer_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Printer/getCloudDefaultsForStaffCloud printer defaults and templates.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Printer/getCloudDevicesForStaffQuery online devices on the cloud printer platform.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Printer/postTestPrintForStaffSend a test print job.
Parameters
printer_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff員工

Staff token/api/Staff/getInfoForStaffCurrent staff profile.
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Staff/getInfoByIdForStaffRead staff by id.
Parameters
staff_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Staff/getListForPageForStaffPaginated staff list.
Parameters
pagerowskeywordstatus

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Staff/postEditForStaffCreate or update staff (role, store assignment).
Parameters
staff_id

Request: HTTPS POST; uniform {code, msg, data} envelope.

Staff token/api/Staff/postModifyPasswordForStaffDescription in progress.
Parameters
old_passwordnew_password

Request: HTTPS POST; uniform {code, msg, data} envelope.

Customers顧客

Customer token/api/User/getInfoCurrent customer profile (points, tags).
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Customer token/api/User/getStoreListForPageForOrderStores the customer can order from.
Parameters
pagerows

Request: HTTPS POST; uniform {code, msg, data} envelope.

Upload文件上傳

Staff token/api/Upload/uploadImageForStaffUpload an image (menu/store photos; auto-compressed with thumbnail).
Parameters
(none explicit; session and body apply)

Request: HTTPS POST; uniform {code, msg, data} envelope.

Docs are generated from production code. This page is compiled from the live service and updated every release. If a field is missing or behaves differently, tell us - that is a bug, and we fix it.
INTEGRATION

Your integration plan, in 30 minutes

Tell us your current system and the data you want in sync; we will give you the plan (and a quote if custom work is involved).

Book a technical call