Orders
Document representing orders from POS. An order is the primary transaction entity containing line items (products sold) and payment transactions. Orders are stored in daily JSON files organized by business date.
Storage Location
{customer_id}/order/{year}/{month}/{yyyymmdd}.jsonFields
| Field | Type | Required | Description |
|---|---|---|---|
id | guid | Yes | GUID of order. Unique key. |
soid | integer | Yes | Unique order id. Increments and can be used as a high-water mark for incremental loading. |
soguid | guid | Yes | Same value as id. For internal purposes. |
customer_id | integer | Yes | Reference to Customer. Entity owning the order. Partition key. |
terminal_id | integer | Yes | Reference to Terminal that committed the order. |
short_key | integer | No | Short key for order lookup. |
receipt_num | string | Yes | Serial number from receipt. |
name | string | No | Name set on order in POS. Can contain order-split info (/1, /2 etc). |
state | string | Yes | Order state. Values: committed, cancelled. |
type | string | Yes | Order type. Values: sales, refund, deposit, invoice, internalsales. |
opened | datetime | Yes | Date and time order was opened (created) at local POS. |
closed | datetime | Yes | Date and time order was committed or cancelled. |
closed_business_date | date | Yes | The business date order was committed/cancelled. Business date can differ from closed date when opening hours extend past local midnight. |
closed_by_user_id | guid | Yes | Reference to user who committed the order. |
closed_by_username | string | No | Username who committed the order (denormalized). |
receipt_type | string | Yes | Receipt type. Values: cash, credit. |
revenue_unit_id | integer | No | Reference to RevenueUnit. |
revenue_unit_name | string | No | Name of revenue unit at time of order (denormalized). |
order_type_id | integer | No | Reference to OrderType. |
order_type_name | string | No | Name of order type (denormalized). |
order_channel | string | No | Channel that originated the order. Typical values: pos, external. |
order_source_name | string | No | Source of order. Typical values: pos, external. |
delivery_type | string | No | Delivery type. Values: inhouse, takeaway. |
table_id | integer | No | Reference to table in local installation (resource). |
guest_count_registered | integer | No | Number of guests input by operator. |
guest_count_calculated | integer | No | Number of guests based on system config and calculation. |
ready_time | datetime | No | Order ready time for pickup or delivery. |
discount_amount | float | No | Total discount amount (gross) given on order. |
discount_reason | string | No | Information about % discount given. Not for calculations, use discount_amount. |
discount_reason_id | integer | No | Reference to discount reason. |
discount_comment | string | No | Comment about discount. |
corr_count | integer | No | Count of line corrections performed. |
corr_amount | float | No | Sum amount (gross) of line corrections performed. |
cd_open_count | integer | No | Cash drawer open count. Does not count openings due to cash payment. |
cancel_reason_id | integer | No | Reference to reason code for cancelling order. |
cancel_comment | string | No | Comment given by operator when cancelling order. |
refund_of_soguid | guid | No | Reference to soguid this order is refunding. |
refund_user_id | guid | No | User ID who processed refund. |
refund_username | string | No | Username who processed refund. |
refund_comment | string | No | Comment about refund. |
refund_approved_user_id | guid | No | User ID who approved the refund. |
customer_client_guid | guid | No | Reference to CustomerClient tagged to order. |
external_payment_ref | string | No | Reference value from external payment solution. |
webshop_store_name | string | No | Name of Munu Webshop store that produced the order. |
lines | array | Yes | Array of line items. See Lines. |
payments | array | Yes | Array of payment transactions. See Payments. |
State Values
| Value | Description |
|---|---|
committed | Order successfully completed |
cancelled | Order was cancelled |
Type Values
| Value | Description |
|---|---|
sales | Standard sales order |
refund | Refund/return transaction |
deposit | Deposit payment |
invoice | Invoice-based order |
internalsales | Internal sales (staff purchases, etc.) |
Example
json
{
"soid": 188160255,
"id": "87b397da-594d-4f48-8c0b-dcaabf442935",
"customer_id": 10352,
"terminal_id": 26023,
"short_key": 67688979,
"soguid": "87b397da-594d-4f48-8c0b-dcaabf442935",
"receipt_num": "100182917",
"state": "committed",
"type": "cash",
"opened": "2026-01-19T17:24:09",
"closed": "2026-01-20T06:54:49",
"closed_by_user_id": "26647814-d29d-e755-e063-0a01000ab9cc",
"closed_by_username": "PAULINA MUCAJ",
"closed_business_date": "2026-01-20T00:00:00",
"receipt_type": "cash",
"revenue_unit_id": 5307,
"revenue_unit_name": "BB Kanelsnurren Østbanehallen Oslo",
"order_type_name": "-",
"order_channel": "pos",
"order_source_name": "pos",
"corr_count": 0,
"corr_amount": 0,
"discount_amount": 0,
"cd_open_count": 3,
"guest_count_calculated": 1,
"lines": [
{
"solid": 380019009,
"article_id": 584758,
"article_ext_num": "4202",
"article_name": "Latte",
"quantity": 1,
"tax_pct_value": 15,
"net_amount": 54.78,
"gross_amount": 63,
"discount_amount": 0,
"account_id": 35116,
"cost_price": 0,
"line_item_guid": "b33f64cd-2829-4b6b-a269-ca9bc3ad714f",
"line_added_time": "2026-01-20T06:54:36",
"base_net_amount": 54.78,
"base_gross_amount": 63,
"total_net_amount": 54.78,
"total_gross_amount": 63,
"comment": "Enkel\r\nLettmelk\r\n"
}
],
"payments": [
{
"soptid": 187434642,
"payment_type_id": 2,
"amount": 63,
"change": 0,
"rounding": 0,
"tip": 0,
"cashback": 0,
"card_type_name": "BankAxept *",
"payment_guid": "a17b1666-550b-4fbe-8ec8-a93a90fc5218",
"account_id": 35068,
"account_num": 1923,
"account_description": "Bankkort",
"card_ident_string": "957852********8872",
"psp_ref": "010288059334402026012017688884740180476000001"
}
]
}Example - Order with Modifiers
This example shows an order where a Latte has modifiers (extra shot and syrup) as child line items:
json
{
"soid": 188160264,
"id": "7a77d63e-d5d2-4a9d-8fee-0943270fef99",
"customer_id": 10352,
"terminal_id": 26346,
"receipt_num": "100101564",
"state": "committed",
"type": "cash",
"closed_business_date": "2026-01-20T00:00:00",
"revenue_unit_name": "BB Gjelleråsen",
"lines": [
{
"solid": 380019033,
"article_id": 584758,
"article_name": "Latte",
"quantity": 1,
"gross_amount": 63,
"total_gross_amount": 85
},
{
"solid": 380019035,
"article_id": 590397,
"article_name": "Ekstra shot",
"quantity": 1,
"gross_amount": 10,
"parent_solid": 380019033
},
{
"solid": 380019034,
"article_id": 585437,
"article_name": "Karamel sirup",
"quantity": 1,
"gross_amount": 12,
"parent_solid": 380019033
}
],
"payments": [
{
"payment_type_id": 2,
"amount": 85,
"card_type_name": "Visa"
}
]
}Incremental Loading
Use soid as a high-water mark for incremental data fetching. The soid value increments monotonically and can be used to fetch only new orders since the last sync.
Related Entities
- Lines - Order line items (embedded in order)
- Payments - Payment transactions (embedded in order)
- Terminals - POS terminal reference
- Customers - Parent customer/tenant
- RevenueUnits - Revenue unit reference
- Users - User who committed the order
- CustomerClients - Loyalty/invoice customer