Help center
Mobile app
Native apps use the Mobile Chat API with a customer JWT, not the Platform REST tools or the MCP key.
Updated 22 November 2026
On this page
Native apps talk to the Mobile Chat API. They do not call Platform REST from the shopper’s phone. Assist mode is FAQ, find products, and change the cart. Checkout, address, and payment stay in the native bag. The website widget and WhatsApp are separate channels.
Base path: /api/v1/mobile/chat.
What the shopper can do
- Ask store questions (hours, shipping, returns)
- Find products by text or photo
- Pick variants, see stock, add or remove lines
- Keep chat and the app bag on one Odoo draft quotation
- Open native checkout when they are ready to pay
- List and track past orders
Button labels, replies, and Odoo text follow the language sent as language on bootstrap and on each chat request. Odoo must have that language installed and the records translated.
Two tokens
- MCP API key. Workspace secret. Only your backend uses it to create a session. Never ship it in the mobile binary.
- Customer JWT. Returned by bootstrap. The app sends it on every chat request.
Bootstrap a session
Your backend already knows the shopper’s Odoo partner_id. Optionally pass the current draft sale order so chat and the bag stay on one quotation (odoo_cart_order_id).
curl -X POST https://<YOUR_HOST>/api/v1/mobile/chat/session \
-H "Authorization: Bearer <MCP_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"partner_id":42,"phone":"+919876543210","odoo_cart_order_id":156,"assist_mode":true,"language":"es"}'language is the short code the shopper picked (en or es). Send it again whenever they change it. The response includes token, conversation_id, partner_id, odoo_cart_order_id, and the current cart. Persist the order id and reload the bag if lines came back.
To resume the same thread later, send conversation_id on bootstrap. Keep assist_mode true (that is the default).
Send messages
Every reply is one envelope. Choose a screen from primary_type and render each item in assistant.widgets.
curl -X POST https://<YOUR_HOST>/api/v1/mobile/chat/messages \
-H "Authorization: Bearer <CUSTOMER_JWT>" \
-H "Content-Type: application/json" \
-d '{"type":"text","text":"show me office chairs","language":"es"}'Button taps:
{"type":"action","action_id":"add_catalog:1","action_label":"Add to cart"}Always apply session after a reply:
cartandcart_countrefresh the in-chat cart badgeodoo_cart_order_idmust be written back so the bag reloads the same draftnavigateofopen_native_bagopens native checkoutstepis a coarse hint:shopping,review, orpayment
Widget types you will see: product_carousel, option_list, category_list, cart_summary, quick_actions, order_history, order_details, and navigate.
Show assistant.text as the bubble. Do not repeat it as a widget header. Product images may be /api/v1/mobile/chat/product-image?product_id=…. Load them from the same host. GET does not add another auth header.
Store FAQ
There is no FAQ-specific endpoint. Send a text message such as “what is your return policy?”, then render assistant.text. Answers come from store knowledge plus the Odoo catalog. If the model is unsure, it says so.
Find products
Send text such as “office chairs under 200”. When primary_type is product_carousel, render widgets[].items. Each card has a name, price (payable), optional strikethrough list_price, an image, a stock badge, and the actions the server sent. Do not invent buttons.
On tap, POST type: action with that action’s id and label. A typical add id is add_catalog:{selection} where selection is the card index in that reply, not the Odoo product id. After an add, expect cart_summary and an updated session.cart.
Photo search
Same pipeline as text find. The server flag image_search_enabled must be on, and the eCommerce plan must allow image search (not Free). JPEG, PNG, WebP, and GIF, max 10 MB.
curl -X POST https://<YOUR_HOST>/api/v1/mobile/chat/messages/image/json \
-H "Authorization: Bearer <CUSTOMER_JWT>" \
-H "Content-Type: application/json" \
-d '{"image_base64":"<base64>","mime_type":"image/jpeg","caption":"something like this"}'Multipart is POST /api/v1/mobile/chat/messages/image with form fields file and optional caption. An optional caption narrows the search. Render the reply like a text search.
Variants and stock
A carousel item may include qty_available, in_stock, allow_out_of_stock_order, and can_order (in_stock or allow_out_of_stock_order). If can_order is false, show sold out and do not send add. The server already swaps the button label when it needs to.
Multi-variant templates use variant_pick:{template_id} (“Choose options”). The next reply is option_list with purpose product_variants. Tap variant_select:{product_id}. Do not use the SKU as the primary label when attributes exist.
Cart and bag sync
Chat writes the same draft sale.order the app uses for the bag when cart sync is on. If Odoo has sale.order.is_app, that app draft is preferred.
- At bootstrap, send
odoo_cart_order_idif the shopper already has a bag. - After add, remove, or clear, persist
session.odoo_cart_order_idand reload the bag from Odoo. - Show the cart in chat from
cart_summaryorsession.cart.
Shoppers can also type or tap view_cart, remove_cart:{product_id}, or clear_cart. If bootstrap omitted the order id, still write back whatever odoo_cart_order_id the first add creates.
Checkout in the bag
With assist_mode true, chat never places the order or collects payment. Checkout language and the checkout_cart action return the same signal.
- Look for
session.navigateofopen_native_bag, or anavigatewidget withactionopen_native_bag. - Open the native bag. Address and pay stay in the app.
- A quick-action chip
open_native_bagis the same navigation. It is not another chat call unless you want the copy again.
Ignore order_review and payment_link for assist-mode shoppers. Those widgets are for WhatsApp and website chat.
Past orders
“Where is my order?”, “my orders”, or the history chips:
my_ordersreturnsorder_historytrack_order:{order_name}(for exampletrack_order:S00063) returnsorder_details
Render one card: order name and date, status pills (tone of success, warning, danger, or neutral), lines, totals, and the delivery block. Assist mode still does not take payment in chat. If payment_url is present on a leftover unpaid order, opening it is optional. Prefer the native order screen.
Browse categories
“Show categories” or browse_categories returns category_list. Browse Products (browse_products) opens the general catalog. Search again uses that same id and repeats the last product search, so send both action_id and action_label. Category select ids are opaque. Do not parse them. The next reply is a product carousel.
Action IDs
Always POST the id from the widget.
| Action | When | What you do |
|---|---|---|
add_catalog:N | Simple product card | POST the action and refresh the bag from session |
variant_pick:T | Multi-variant card | POST the action and show the variant option_list |
variant_select:P | A specific variant | POST the action. It adds that product id |
view_cart, clear_cart, remove_cart:P | Cart chips | POST the action and sync the bag |
checkout_cart, open_native_bag | Ready to pay | Open the native bag. Do not charge in chat |
my_orders, track_order:NAME | History | POST the action and render history or details |
browse_products, browse_categories | Shop more | POST the id and the label. Search again repeats the last query. Browse Products opens the general catalog |
GET /api/v1/mobile/chat/config reports image_search_enabled and odoo_cart_sync if you need to hide the camera or the bag badge.
Language
Send en or es. The app’s catalog path maps those to es_MX and en_US. Chat does not read the device setting for you. A request that omits language keeps the last language stored on the conversation, so a language change does not apply until the next request includes the new code. After the shopper confirms a language, bootstrap again so the cart reload uses it.
Render assistant.text and each actions[].label as returned. Do not translate them again on the device, and do not hardcode English labels such as “Add to cart”.
If the app omits language and none was stored yet, chat falls back to the language saved on the Mobile app channel in the dashboard, or the website widget reply language until that channel is saved. If the language is not installed in Odoo, catalog text stays in the Odoo user’s language.
Was this helpful?