Skip to main content

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

FieldTypeRequiredDescriptionExample
transaction_idstringYesSource POS transaction identifier.TXN-5001
company_idstringYesMust match a synced company.HTL-001
transaction_datestringOptionalTransaction date.2026-09-01
transaction_timestringOptionalTransaction time.12:45:00
transaction_finishedstringOptionalTransaction finish timestamp.
pos_idstringOptionalReferenced POS identifier.POS-01
sales_type_idstringOptionalReferenced sales type ID.ST-01
typestringOptionalSales transaction type.TRANSFER_TO_ROOM
reservation_folio_idstringOptionalReservation folio identifier.FOL-1001
pos_namestringOptionalPOS name.Restaurant
pax_numbernumberOptionalNumber of guests.1
roundingnumberOptionalRounding amount.0
revenue_amountnumberOptionalRevenue amount.8264.46
subtotalnumberOptionalTransaction subtotal.130000
taxnumberOptionalTax amount.13000
service_chargenumberOptionalService charge amount.13000
total_amountnumberOptionalTotal transaction amount.156000
is_voidboolean-ishOptionalVoid transaction flag.false
customer_idstringOptionalCustomer identifier.GST-01
guest_profileobjectOptionalGuest profile information (See below).{...}
paymentobjectOptionalPayment records (see below).{...}
table_nostring / numberOptionalTable number.
chasier_idstringOptionalCashier identifier.a2e72688-b572-4528...
store_idstringOptionalStore identifier.f229488a-ba5a-44c4...
discountnumberOptionalDiscount amount.
consignment_amountnumberOptionalConsignment amount.
serving_periodestringOptionalServing period value.
remarkstringOptionalTransaction remark.
time_elapsestring / numberOptionalTransaction elapsed time.
serving_period_namestringOptionalServing period name.
serving_period_start_timestringOptionalServing period start time.
serving_period_end_timestringOptionalServing period end time.
invoice_nostringOptionalInvoice number.
detailarray of objectOptionalSales detail records (see below).[...]

Guest Profile Fields

FieldTypeRequiredDescriptionExample
idstringOptionalGuest identifier.GST-01
emailstringOptionalGuest email.guest@example.com
addressstringOptionalGuest address.Jl. Melati No. 5, Jakarta
countrycodestringOptionalGuest country code.ID

Payment Fields

FieldTypeRequiredDescriptionExample
payment_method_idstringOptionalPayment method identifier.8cf96537-41f8-4efd
total_paidnumberOptionalPaid amount.

Detail Fields

FieldTypeRequiredDescriptionExample
product_idstringNot specifiedReferenced product ID.PRD-01
product_category_idstringNot specifiedReferenced product category ID.CAT-02
package_idstringNot specifiedPackage identifier.PKG-01
package_namestringNot specifiedPackage name.
package_qtynumberNot specifiedPackage quantity.
package_pricenumberNot specifiedPackage price.
is_packagebooleanNot specifiedPackage indicator. Defaults to false.false
pricenumberNot specifiedProduct selling price.65000
qtynumberNot specifiedProduct quantity.1
discountnumberNot specifiedDiscount amount.0
service_chargenumberNot specifiedService charge amount.6500
taxnumberNot specifiedTax amount.6500
totalnumberNot specifiedDetail total amount.78000
consignment_amountnumberNot specifiedConsignment amount.
cost_pricenumberNot specifiedProduct cost price.25000
gross_marginnumberNot specifiedGross margin amount.
discount_pctnumberNot specifiedDiscount 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
}
}