Skip to main content

POS Service

Overview

The POS Service is used to push point-of-sale transaction data from PMS to external systems. This page provides the actual structure used for the integration.

Request Specification

API Specification

  • HTTP Method: POST
  • Secure URL Path: {{external_base_url}}/api/pos

Request Headers

  • x-api-key : {{api_key}} Authorization token assigned to the connecting system. The API key is provided by GuestPro.
  • Content-Type : application/json Explicitly defines the payload structure.

Payload Construction and Schema Definition

Primary Request Body

The root object contains structured data for the transaction header, details, and payments.

FieldTypeRequiredDescription
headerobjectYesMetadata and summary details of the transaction.
detailarrayYesList of line items in the transaction.
paymentarrayYesList of payments made for the transaction.

Header Object (header)

FieldTypeDescriptionExample
idstringUnique identifier for the transaction.a4aa4cf0-32f9-11f1-a0cd-d58d1e81a220
invoice_nostringHuman-readable invoice number.1629
transaction_datestringDate of the transaction (YYYY-MM-DD).2025-09-10
customer_idstringUnique identifier for the customer.36810de0-5e42-11ec-b15c-773ef578a258
reservation_folio_idstring | nullID of the reservation folio if applicable.null
payment_modestringMode of payment.PAY_IN_POS
payment_due_datestring | nullDue date for the payment.null
payment_bystringPayment done by (e.g., NONE, COMPANY).NONE
agent_idstringIdentifier for the agent handling the transaction.e0baa5e0-27c2-11ef-8d1c-1f67fd3f7ed5
ar_statusstringAccount Receivables status.NONE
ar_total_paidnumberTotal paid towards Account Receivables.0
total_transactionnumberTotal transaction amount.133000
total_taxesnumberTotal tax amount.11704.545454545452
total_servicenumberTotal service amount.10754.13223140496
total_paymentnumberTotal final amount paid.133000
total_consigmentnumberTotal consignment amount.573600
show_tax_servicestringFlag indicating if tax and service should be shown (e.g., "1")."1"
created_timestringTime the transaction was created (HH:mm).11:18
tagsarrayArray of string tags associated with the transaction.[]
tx_productobjectExtensive details describing the environment of the POS transaction including POS info, sales type, agent, etc.{...}
customerobjectDetailed object regarding the target customer, carrying personal and contact information.{...}

tx_product Object

FieldTypeDescriptionExample
idstringUnique identifier for the tx_product.a4aa4cf0-32f9-11f1-a0cd-d58d1e81a220
transaction_datestringDate of the transaction.2025-09-10
company_idstringIdentifier for the company.757beb40-3669-11ea-9b7a-a3422e769033
created_atstringTimestamp when the transaction product was created.2026-04-08 11:18:41
created_bystringUser who created the transaction.yoga
updated_atstringTimestamp when the transaction product was last updated.2026-04-08 11:24:58
updated_bystringUser who last updated the transaction.yoga
deleted_atstring | nullTimestamp when the transaction product was deleted.null
deleted_bystring | nullUser who deleted the transaction.null
invoice_idstringAssociated invoice ID.a4aa4cf0-32f9-11f1-a0cd-d58d1e81a220
pos_idstringAssociated POS identifier.2c45e240-3678-11ea-a448-ad984dc06ea3
bookeepingratenumberBookkeeping exchange rate.1
remarkstring | nullGeneral remarks for the transaction product.null
table_nostring | nullTable number if applicable.null
is_completednumberCompletion flah (1 for completed).1
remark_voidstring | nullRemarks related to voiding the transaction.null
agent_idstringAgent identifier associated with this transaction.e0baa5e0-27c2-11ef-8d1c-1f67fd3f7ed5
sales_type_idstringSales type identifier.ed7dcd40-1b76-11ec-b355-8365980ed46c
card_feenumberAbsolute card fee applied.0
card_fee_pctnumberPercentage of card fee applied.0
table_map_idstring | nullID mapping to the table layout.null
paxnumberNumber of people/pax for the transaction.1
pos_typestringType of the POS.STANDAR
shift_idstring | nullShift identifier.null
reference_codestring | nullAssociated reference code.null
reference_idstring | nullAssociated reference ID.null
reference_descstring | nullReference description.null
employee_idstring | nullID of the employee handling the transaction.null
serving_period_idstring | nullID referring to the serving period.null
roundingnumberAmount of rounding applied.0
rounding_account_idstringAccount ID linked to the rounding.75980790-3669-11ea-af8f-f3ca4110793b
posobjectDetails about the specific point of sale.{...}
agentobjectDetails about the agent linked to the transaction.{...}
sales_typeobjectDetails about the type of sale and its configuration.{...}
tx_product.pos Object
FieldTypeDescriptionExample
idstringUnique identifier for the POS.2c45e240-3678-11ea-a448-ad984dc06ea3
namestringName of the POS outlet.Restaurant
company_idstringCompany ID owning the POS.757beb40-3669-11ea-9b7a-a3422e769033
use_tablenumberFlag if the POS uses table management (1=yes).1
descriptionstring | nullPOS description.null
typestringSpecific mode or type of the POS.TABLE_MANAGEMENT
use_employnumberFlag if the POS uses employees/staff (0=no).0
show_tax_servicestringFlag controlling visibility of tax and service."1"
use_shiftnumberFlag if the POS uses shift management (0=no).0
roundingnumberBase rounding configuration for the POS.0
tx_product.agent Object
FieldTypeDescriptionExample
idstringUnique agent identifier.e0baa5e0-27c2-11ef-8d1c-1f67fd3f7ed5
namestringName of the agent.House Use
source_idstringSource linking identifier.S_HU
payment_statusstringStatus of payment processing for the agent.NORMAL
commissionnumberAbsolute commission amount.0
addressstring | nullAgent's address.null
phonestring | nullAgent's phone number.null
emailstring | nullAgent's email address.null
websitestring | nullAgent's website.null
company_idstringCompany identifier for the agent.757beb40-3669-11ea-9b7a-a3422e769033
colorstringDisplay color code for the agent.#FFFFFF
commission_typestringStrategy used for commission (PERCENT or AMOUNT).PERCENT
use_product_commissionnumberFlag if agent uses product level commissions (1=yes).1
product_commission_typestringSource classification for the product commission.POS
sales_type_idstring | nullSpecific sales type ID linked to the agent.null
is_activenumberFlag if agent is active.1
tx_product.sales_type Object
FieldTypeDescriptionExample
idstringSales type unique identifier.ed7dcd40-1b76-11ec-b355-8365980ed46c
namestringName of the sales type.Member
company_idstringCompany identifier.757beb40-3669-11ea-9b7a-a3422e769033
typestringCategorization format (e.g., AMOUNT).AMOUNT
type_valuenumberBase value linked to the type calculation.0
operatorstringMathematical operator intended for calculation.-
system_calculationstringDescribes how calculation evaluates.MANUAL
impactedstringTargets field impacted by this sales type calculation.DISCOUNT
taxes_idstring | nullTarget tax ID linked.null
positionstring | nullVisual ordering/position.null
no_use_paxnumberFlag defining if pax must not be applied.0
impacted_commissionstringEvaluation mechanism parameter for commissions.NET

customer Object

FieldTypeDescriptionExample
idstringUnique customer identifier.36810de0-5e42-11ec-b15c-773ef578a258
namestringCustomer's full name.aditya
addressstring | nullCustomer's address.null
countrystringCustomer's country of residence.Andorra
province_idstring | nullProvince/State identifier.null
city_idstring | nullCity identifier.null
emailstring | nullContact email address.null
date_of_birthstring | nullDate of birth.null
phonestring | nullPhone number.null
notesstring | nullAdditional notes relating to customer.null
company_idstringCompany the customer is linked to.757beb40-3669-11ea-9b7a-a3422e769033
identity_nostring | nullID document number (KTP, Passport, etc).null
identity_imagestring | nullURI/link to stored ID image.null
nationalitystringNationality.Afghanistan
deposit_account_idstringID linked to the customer's active deposit account.2.1.01.02
residencestring | nullMain place of residency information.null
prefix_namestringPrefix for addressing customer (e.g., Mr, Ms).Mr
last_namestringCustomer's surname.putra Bagus
identity_typestring | nullType of the ID document provided.null
postcodestring | nullArea postal code.null
townstring | nullTown name.null
profile_picturestring | nullURI/link to profile picture.null
is_activenumberFlag if customer is active in PMS (1=active).1

Detail Object (detail)

FieldTypeDescriptionExample
idstringUnique identifier for the item line.a4b36380-32f9-11f1-b45e-53827812d3fa
descriptionstringDescription of the product/service.Jus Strawberry
namestringName of the product/service.Jus Strawberry
remarkstring | nullAdditional notes or remarks for the item.null
qtynumberQuantity sold.1
pricenumberUnit price before taxes and service.41322.31404958677
taxesnumberTax amount for this item.4545.454545454545
servicenumberService amount for this item.4132.231404958678
discount_pctnumberDiscount percentage applied.0
discountnumberDiscount amount applied.0
notesstringAdditional structural notes for the item.""
created_atstringThe datetime when this detail was created.2026-04-08 11:18:41
index_positionnumberThe relative index order position.0
coststringThe internal cost to the property for the item."0"
is_product_detail_packagenumberIndicator if this serves as part of a detailed package product (1 for true, 0 for false).0
tx_product_package_idstringReference ID of parent package if applicable.""
detailarrayRecursive nested detail list. Usually populated if is_product_detail_package is related to packages.[]

Payment Object (payment)

FieldTypeDescriptionExample
idstringUnique identifier for the payment.8506c480-32fa-11f1-b522-73ef3ba7dd48
payment_method_namestringName of the payment method.Cash
total_paidnumberAmount paid.133000
changenumberChange amount returned.0

Expected System Responses

Successful Execution

The external system must respond with an HTTP 200 OK or 201 Created.

{
"status": "success",
"message": "POS transaction has been successfully ingested."
}

Failure Execution

When the external system provides a response other than success codes (200, 201), the external system delivers the following error response structure.

{
"status": "error",
"message": "<<error_detail>>"
}

Full Request Body

{
"header": {
"id": "a4aa4cf0-32f9-11f1-a0cd-d58d1e81a220",
"invoice_no": "1629",
"transaction_date": "2025-09-10",
"customer_id": "36810de0-5e42-11ec-b15c-773ef578a258",
"reservation_folio_id": null,
"payment_mode": "PAY_IN_POS",
"payment_due_date": null,
"payment_by": "NONE",
"agent_id": "e0baa5e0-27c2-11ef-8d1c-1f67fd3f7ed5",
"ar_status": "NONE",
"ar_total_paid": 0,
"total_transaction": 133000,
"total_taxes": 11704.545454545452,
"total_service": 10754.13223140496,
"total_payment": 133000,
"total_consigment": 573600,
"show_tax_service": "1",
"created_time": "11:18",
"tags": [],
"tx_product": {
"id": "a4aa4cf0-32f9-11f1-a0cd-d58d1e81a220",
"transaction_date": "2025-09-10",
"company_id": "757beb40-3669-11ea-9b7a-a3422e769033",
"created_at": "2026-04-08 11:18:41",
"created_by": "yoga",
"updated_at": "2026-04-08 11:24:58",
"updated_by": "yoga",
"deleted_at": null,
"deleted_by": null,
"invoice_id": "a4aa4cf0-32f9-11f1-a0cd-d58d1e81a220",
"pos_id": "2c45e240-3678-11ea-a448-ad984dc06ea3",
"bookeepingrate": 1,
"remark": null,
"table_no": null,
"is_completed": 1,
"remark_void": null,
"agent_id": "e0baa5e0-27c2-11ef-8d1c-1f67fd3f7ed5",
"sales_type_id": "ed7dcd40-1b76-11ec-b355-8365980ed46c",
"card_fee": 0,
"card_fee_pct": 0,
"table_map_id": null,
"pax": 1,
"pos_type": "STANDAR",
"shift_id": null,
"reference_code": null,
"reference_id": null,
"reference_desc": null,
"employee_id": null,
"serving_period_id": null,
"rounding": 0,
"rounding_account_id": "75980790-3669-11ea-af8f-f3ca4110793b",
"pos": {
"id": "2c45e240-3678-11ea-a448-ad984dc06ea3",
"name": "Restaurant",
"company_id": "757beb40-3669-11ea-9b7a-a3422e769033",
"use_table": 1,
"description": null,
"type": "TABLE_MANAGEMENT",
"use_employ": 0,
"show_tax_service": "1",
"use_shift": 0,
"rounding": 0
},
"agent": {
"id": "e0baa5e0-27c2-11ef-8d1c-1f67fd3f7ed5",
"name": "House Use",
"source_id": "S_HU",
"payment_status": "NORMAL",
"commission": 0,
"address": null,
"phone": null,
"email": null,
"website": null,
"company_id": "757beb40-3669-11ea-9b7a-a3422e769033",
"color": "#FFFFFF",
"commission_type": "PERCENT",
"use_product_commission": 1,
"product_commission_type": "POS",
"sales_type_id": null,
"is_active": 1
},
"sales_type": {
"id": "ed7dcd40-1b76-11ec-b355-8365980ed46c",
"name": "Member",
"company_id": "757beb40-3669-11ea-9b7a-a3422e769033",
"type": "AMOUNT",
"type_value": 0,
"operator": "-",
"system_calculation": "MANUAL",
"impacted": "DISCOUNT",
"taxes_id": null,
"position": null,
"no_use_pax": 0,
"impacted_commission": "NET"
}
},
"customer": {
"id": "36810de0-5e42-11ec-b15c-773ef578a258",
"name": "aditya",
"address": null,
"country": "Andorra",
"province_id": null,
"city_id": null,
"email": null,
"date_of_birth": null,
"phone": null,
"notes": null,
"company_id": "757beb40-3669-11ea-9b7a-a3422e769033",
"identity_no": null,
"identity_image": null,
"nationality": "Afghanistan",
"deposit_account_id": "2.1.01.02",
"residence": null,
"prefix_name": "Mr",
"last_name": "putra Bagus",
"identity_type": null,
"postcode": null,
"town": null,
"profile_picture": null,
"is_active": 1
}
},
"detail": [
{
"description": "Jus Strawberry",
"name": "Jus Strawberry",
"remark": null,
"qty": 1,
"price": 41322.31404958677,
"taxes": 4545.454545454545,
"service": 4132.231404958678,
"discount_pct": 0,
"discount": 0,
"notes": "",
"created_at": "2026-04-08 11:18:41",
"index_position": 0,
"cost": "0",
"is_product_detail_package": 0,
"tx_product_package_id": "",
"id": "a4b36380-32f9-11f1-b45e-53827812d3fa",
"detail": []
},
{
"description": "Nasi Goreng",
"name": "Nasi Goreng",
"remark": null,
"qty": 1,
"price": 17500,
"taxes": 1250,
"service": 1250,
"discount_pct": 10,
"discount": 2000,
"notes": "",
"created_at": "2026-04-08 11:18:41",
"index_position": 0,
"cost": "3000",
"is_product_detail_package": 0,
"tx_product_package_id": "",
"id": "a4c6c960-32f9-11f1-a51d-197f834fecb9",
"detail": []
},
{
"description": "Ayam Crispy / Extra Pedas",
"name": "Ayam Crispy",
"remark": "Extra Pedas",
"qty": 1,
"price": 24793.388429752064,
"taxes": 2727.272727272727,
"service": 2479.3388429752067,
"discount_pct": 0,
"discount": 0,
"notes": "",
"created_at": "2026-04-08 11:18:41",
"index_position": 0,
"cost": "570600",
"is_product_detail_package": 0,
"tx_product_package_id": "",
"id": "a4d9c070-32f9-11f1-9741-c7cc86638e82",
"detail": []
},
{
"description": "paket option",
"name": "paket option",
"remark": null,
"qty": 1,
"price": 28925.61983471074,
"taxes": 3181.818181818181,
"service": 2892.561983471074,
"discount_pct": 0,
"discount": 0,
"notes": "",
"created_at": "2026-04-08 11:18:41",
"index_position": 0,
"cost": "",
"is_product_detail_package": 0,
"tx_product_package_id": "",
"id": "719fc350-32fa-11f1-a3a2-c766157e3cd2",
"detail": [
{
"description": "2 minuman",
"name": "2 minuman",
"remark": null,
"qty": 2,
"price": 28925.61983471074,
"taxes": 6363.636363636362,
"service": 5785.123966942148,
"discount_pct": 0,
"discount": 0,
"notes": "",
"created_at": "2026-04-08 11:18:41",
"index_position": 0,
"cost": "",
"is_product_detail_package": 0,
"tx_product_package_id": "719fc350-32fa-11f1-a3a2-c766157e3cd2",
"id": "71a722a0-32fa-11f1-a112-f74cc393473e",
"detail": [
{
"description": "coca cola",
"name": "coca cola",
"remark": null,
"qty": 2,
"price": 14462.80991735537,
"taxes": 3181.818181818181,
"service": 2892.561983471074,
"discount_pct": 0,
"discount": 0,
"notes": "",
"created_at": "2026-04-08 11:18:41",
"index_position": 0,
"cost": "0",
"is_product_detail_package": 1,
"tx_product_package_id": "71a722a0-32fa-11f1-a112-f74cc393473e",
"id": "71ad97a0-32fa-11f1-9fda-8d515ef28bdc"
}
]
}
]
}
],
"payment": [
{
"payment_method_name": "Cash",
"total_paid": 133000,
"change": 0,
"id": "8506c480-32fa-11f1-b522-73ef3ba7dd48"
}
]
}