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
  1. What the shopper can do
  2. Two tokens
  3. Bootstrap a session
  4. Send messages
  5. Store FAQ
  6. Find products
  7. Photo search
  8. Variants and stock
  9. Cart and bag sync
  10. Checkout in the bag
  11. Past orders
  12. Browse categories
  13. Action IDs
  14. Language

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:

  • cart and cart_count refresh the in-chat cart badge
  • odoo_cart_order_id must be written back so the bag reloads the same draft
  • navigate of open_native_bag opens native checkout
  • step is a coarse hint: shopping, review, or payment

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.

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.

  1. At bootstrap, send odoo_cart_order_id if the shopper already has a bag.
  2. After add, remove, or clear, persist session.odoo_cart_order_id and reload the bag from Odoo.
  3. Show the cart in chat from cart_summary or session.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.

  1. Look for session.navigate of open_native_bag, or a navigate widget with action open_native_bag.
  2. Open the native bag. Address and pay stay in the app.
  3. A quick-action chip open_native_bag is 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_orders returns order_history
  • track_order:{order_name} (for example track_order:S00063) returns order_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.

ActionWhenWhat you do
add_catalog:NSimple product cardPOST the action and refresh the bag from session
variant_pick:TMulti-variant cardPOST the action and show the variant option_list
variant_select:PA specific variantPOST the action. It adds that product id
view_cart, clear_cart, remove_cart:PCart chipsPOST the action and sync the bag
checkout_cart, open_native_bagReady to payOpen the native bag. Do not charge in chat
my_orders, track_order:NAMEHistoryPOST the action and render history or details
browse_products, browse_categoriesShop morePOST 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?