Skip to content

POS Order

Get Orders

POST /api/v1/models/pos_order

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}

Request Body:

{
"fields": [
"id",
"name",
{
"name": "lines",
"fields": [
"id",
{
"name": "product_id",
"fields": [
"id",
"name",
"list_price"
]
},
"qty"
]
},
"user_id"
],
"offset": 0,
"limit": 2,
"order": "name asc"
}

Response:

[
{
"id": 77,
"name": "/",
"lines": [
{
"id": 104,
"product_id": [
{
"id": 17,
"name": "Pretzel",
"list_price": 2,
"translation": {
"de_DE": {
"name": "Brezel"
}
}
}
],
"qty": 1
},
{
"id": 105,
"product_id": [
{
"id": 17,
"name": "Pretzel",
"list_price": 2,
"translation": {
"de_DE": {
"name": "Brezel"
}
}
}
],
"qty": 1
}
],
"user_id": 2
},
{
"id": 82,
"name": "/",
"lines": null,
"user_id": 9
}
]

Create Order

Set cookie: session_id value what we got from authenticate

POST /api/v1/order/create

Headers:

{
"Content-Type": "application/json",
"Cookie": "session_id=4e21fd7bf236b7d283b471254b8c94a57c8a3a08"
}

Request Body:

{
"orders": [
{
"data": {
"amount_paid": 27.8,
"amount_return": 0,
"amount_tax": 4.44,
"amount_total": 27.8,
"amount_received": 27.8,
"partner_id": 10,
"type": "sale",
"lines": [
{
"price_unit": 11.9,
"product_id": 13,
"qty": 2,
"full_product_name": "Antipasti Selection"
},
{
"price_unit": 4.0,
"product_id": 27,
"qty": 1,
"full_product_name": "Ben & Jerry's Strawberry caramel Chew Chew "
}
],
"statement_ids": [
{
"name": "2024-04-03 06:45:58",
"amount": 27.8,
"payment_method_id": 4
}
],
"context_uids": [
"WH/OUT/00020"
]
}
}
]
}

Response: