Point of Sale
Create POS Session
A single pos.config can only have one active session at a time. Before starting a new session, always check whether the pos.config record already has an active session linked to it
Get pos.config
{
"id": "839dj3ud9829302jd",
"action": "search_read",
"model_id": "pos.config",
"keyword": {
"fields": [
"name",
"company_id",
"active",
"has_active_session"
],
"context": {
"allowed_company_ids": [
1
],
"default_company_id": 1,
"tz": "Asia/Singapore"
}
},
"params": [
[
[
"active",
"=",
true
]
]
],
"odoo_instance": {
"url": "YOUR_ODOO_INSTANCE_URL",
"user_id": INT(YOUR_USER_ID),
"db": "YOUR_ODOO_DB",
"api_key": "YOUR_ODOO_API_KEY"
}
}Create POS Session
Add Order to POS Session
To fetch products, you can navigate to this endpoint
Important: Avoid repeatedly fetching products directly from Odoo in real time. Instead, cache the product data in a separate system such as Redis, Elasticsearch, vector database or local storage to improve performance and reduce load on your Odoo instance.
Update POS Session into "Closing Control"
Close Session & Post Entries
Last updated