Sales
Overview
The sales module synchronizes POS sales transaction data for a company.
This module depends on company. The referenced company_id must already exist in GuestPro's warehouse.
Request
- Method: POST
- Path:
{{base_url}}/api/sync-pos
Request Envelope
The Sales module uses sales as the module and sends sales transaction records as an array in data.
{
"module": "sales",
"data": [
{}
],
"chunk_metadata": {}
}
Request Body Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
transaction_id | string | Yes | Source POS transaction identifier. | TXN-5001 |
company_id | string | Yes | Must match a synced company. | HTL-001 |
transaction_date | string | Optional | Transaction date. | 2026-09-01 |
transaction_time | string | Optional | Transaction time. | 12:45:00 |
transaction_finished | string | Optional | Transaction finish timestamp. | — |
pos_id | string | Optional | Referenced POS identifier. | POS-01 |
sales_type_id | string | Optional | Referenced sales type ID. | ST-01 |
type | string | Optional | Sales transaction type. | TRANSFER_TO_ROOM |
reservation_folio_id | string | Optional | Reservation folio identifier. | FOL-1001 |
pos_name | string | Optional | POS name. | Restaurant |
pax_number | number | Optional | Number of guests. | 1 |
rounding | number | Optional | Rounding amount. | 0 |
revenue_amount | number | Optional | Revenue amount. | 8264.46 |
subtotal | number | Optional | Transaction subtotal. | 130000 |
tax | number | Optional | Tax amount. | 13000 |
service_charge | number | Optional | Service charge amount. | 13000 |
total_amount | number | Optional | Total transaction amount. | 156000 |
is_void | boolean-ish | Optional | Void transaction flag. | false |
customer_id | string | Optional | Customer identifier. | GST-01 |
guest_profile | object | Optional | Guest profile information (See below). | {...} |
payment | object | Optional | Payment records (see below). | {...} |
table_no | string / number | Optional | Table number. | — |
chasier_id | string | Optional | Cashier identifier. | a2e72688-b572-4528... |
store_id | string | Optional | Store identifier. | f229488a-ba5a-44c4... |
discount | number | Optional | Discount amount. | — |
consignment_amount | number | Optional | Consignment amount. | — |
serving_periode | string | Optional | Serving period value. | — |
remark | string | Optional | Transaction remark. | — |
time_elapse | string / number | Optional | Transaction elapsed time. | — |
serving_period_name | string | Optional | Serving period name. | — |
serving_period_start_time | string | Optional | Serving period start time. | — |
serving_period_end_time | string | Optional | Serving period end time. | — |
invoice_no | string | Optional | Invoice number. | — |
detail | array of object | Optional | Sales detail records (see below). | [...] |
Guest Profile Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id | string | Optional | Guest identifier. | GST-01 |
email | string | Optional | Guest email. | guest@example.com |
address | string | Optional | Guest address. | Jl. Melati No. 5, Jakarta |
countrycode | string | Optional | Guest country code. | ID |
Payment Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
payment_method_id | string | Optional | Payment method identifier. | 8cf96537-41f8-4efd |
total_paid | number | Optional | Paid amount. | — |
Detail Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
product_id | string | Not specified | Referenced product ID. | PRD-01 |
product_category_id | string | Not specified | Referenced product category ID. | CAT-02 |
package_id | string | Not specified | Package identifier. | PKG-01 |
package_name | string | Not specified | Package name. | — |
package_qty | number | Not specified | Package quantity. | — |
package_price | number | Not specified | Package price. | — |
is_package | boolean | Not specified | Package indicator. Defaults to false. | false |
price | number | Not specified | Product selling price. | 65000 |
qty | number | Not specified | Product quantity. | 1 |
discount | number | Not specified | Discount amount. | 0 |
service_charge | number | Not specified | Service charge amount. | 6500 |
tax | number | Not specified | Tax amount. | 6500 |
total | number | Not specified | Detail total amount. | 78000 |
consignment_amount | number | Not specified | Consignment amount. | — |
cost_price | number | Not specified | Product cost price. | 25000 |
gross_margin | number | Not specified | Gross margin amount. | — |
discount_pct | number | Not specified | Discount percentage. | 0 |
Request Example
{
"module": "sales",
"data": [
{
"transaction_id": "TXN-5001",
"company_id": "HTL-001",
"transaction_date": "2026-09-01",
"transaction_time": "12:45:00",
"pos_id": "POS-01",
"sales_type_id": "ST-01",
"type": "TRANSFER_TO_ROOM",
"reservation_folio_id": "FOL-1001",
"pos_name": "Restaurant",
"pax_number": 1,
"rounding": 0,
"revenue_amount": 8264.46,
"subtotal": 130000,
"tax": 13000,
"service_charge": 13000,
"total_amount": 156000,
"is_void": false,
"customer_id": "GST-01",
"guest_profile": {
"id": "GST-01",
"email": "guest@example.com",
"address": "Jl. Melati No. 5, Jakarta",
"countrycode": "ID"
},
"payment" : {
"payment_method_id" :"8cf96537-41f8-4efd-a9a5",
},
"chasier": "a2e72688-b572-4528-9f46",
"store_id": "f229488a-ba5a-44c4-9a5e",
"detail": [
{
"product_id": "PRD-01",
"product_category_id": "CAT-02",
"qty": 1,
"is_package": false,
"discount": 0,
"discount_pct": 0,
"price": 65000,
"tax": 6500,
"service_charge": 6500,
"total": 78000,
"cost_price": 25000
}
]
}
],
"chunk_metadata": {
"process_id": "sync-htl001-sales-2026-08-30",
"chunk_sequence": 1,
"is_last_chunk": true,
"total_records_in_chunk": 1
}
}