place_order
Place an order. Two modes: (A) VIP wholesale: provide lineUserId of a registered VIP customer. (B) Guest retail: provide customerName, phone, items array, and a delivery address — shippingAddress, shippingProvince and email are all required, and an order missing any of them is rejected. Guest orders are priced at tier-linked retail rates (server-calculated) and the total is final at this point; a confirmation email with a PromptPay QR follows. Inventory is NOT deducted — orders go to the pick queue for staff fulfillment. Delivery is available within Thailand only, so the province must be a Thai one. International addresses are not accepted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | (Guest mode, optional) Language of the confirmation email. Defaults to en. | |
| memo | No | (Optional) Order notes | |
| No | (Guest mode) Email address for the order confirmation — required for guest orders | ||
| items | No | (Guest mode) Order items | |
| phone | No | (Guest mode) Contact phone number | |
| fishName | No | (VIP mode) Fish name (romaji) | |
| totalThb | No | (VIP mode) Total amount in THB | |
| lineUserId | No | LINE user ID of VIP customer (VIP mode). Omit for guest mode. | |
| referrerId | No | (Optional) Referrer ID for tracking | |
| customerKey | No | (Guest mode) Registered customer key (from register_customer). Resolves name/phone/shipping automatically. If you are connected through a personal token URL the customer is already resolved: send items[] alone and omit this, customerName, phone and lineUserId. | |
| requestedKg | No | (VIP mode) Requested weight in kg | |
| customerName | No | (Guest mode) Customer name | |
| shippingAddress | No | (Guest mode) Street address and building name — required for guest orders | |
| shippingDistrict | No | (Guest mode, optional) District name | |
| shippingProvince | No | (Guest mode) Thai province name, used for shipping cost — required for guest orders. Thailand only. |