Skip to main content

Night Audit

Overview

The Night Audit endpoint returns financial and operational data for the requested date, including revenue transactions, payment records, account summaries, and guest ledger balances. Revenue records provide transaction amounts, taxes, service charges, commissions, discounts, and net prices, together with their related account information.

The response also includes payment details grouped by payment method, payment summaries, and guest ledger balances for the current and previous day. This endpoint is commonly used for daily financial reconciliation, revenue verification, payment review, and night audit reporting.

Request Endpoint

  • Method: POST
  • Path: {{base_url}}/api/reports/night-audit

Payload Construction and Schema Definition

The request payload is submitted as form-data fields.

Request Body Fields

FieldTypeRequiredDescriptionExample
datestringYesdate (YYYY-MM-DD) for the report.2025-07-01
pos_idstringYesEnd date (YYYY-MM-DD) for the report.all
userstringYesEnd date (YYYY-MM-DD) for the report.all
na_statusnumberYesEnd date (YYYY-MM-DD) for the report.1
transaction_typestringYesEnd date (YYYY-MM-DD) for the report.all

Response Body Fields

FieldTypeAlways presentDescription
errorbooleanYesIndicates whether the request failed.
statusstringYesStatus string. On success returns e.g. "ok".
messagestringYesHuman-readable message. Often empty on success.
dataarray of objectYes (on success)Night audit report data.

Response data Fields

FieldTypeDescriptionExample
detailarray of objectsList of detail data objects (see below).[...]
summaryobjectList of summary data object (see below).{...}
paymentarray of objectsList of payment data objects (see below).[...]
summary_paymentobjectsList of summary_payment data objects (see below).{...}
guest_ledgerobjectsList of guest_ledger data objects (see below).{...}
payment_city_ledgernumber.0

Response data.detail Fields

FieldTypeDescriptionExample
datesstringDate of the night audit record.2025-07-01
descriptionstringDescription of the revenue transaction.Room Charge - Deluxe Villas - Deluxe Villa 101 - gus adi grup Tes
typestringType of transaction.RESERVATION
na_statusnumberNight audit status.1
idstringUnique identifier of the night audit record.3b0ab8c0-c979-...
header_idstringIdentifier of the related transaction header.3b080760-c979-...
account_idstringIdentifier of the related account.89091480-b33f-...
detailarray of objectsList of revenue details associated with the record.[ ... ]
totalnumberTotal transaction amount.1000000
taxesnumberTotal tax amount.90909.09
servicenumberTotal service charge amount.82644.63
net_pricenumberNet transaction amount after applicable charges and adjustments.826446.28
commissionnumberTotal commission amount.0
consigmentnumberTotal consignment amount.0

Response data.detail.detail Fields

FieldTypeDescriptionExample
datestringDate of the revenue entry.2025-07-01
descriptionstringDescription of the revenue entry.Room Charge
amountnumberGross amount of the revenue entry.885000
commission_amountnumberCommission amount applied to the entry.0
consigment_amountnumberConsignment amount applied to the entry.0
taxes_amountnumberTax amount applied to the entry.80454.54545454546
service_amountnumberService charge amount applied to the entry.73140.4958677686
account_namestringAccount associated with the revenue entry.4.1.01.01 - Room Revenue
created_bystringUser who created the revenue entry.gusadi
discountnumberDiscount amount applied to the entry.0
net_pricenumberNet amount of the revenue entry.731404.958677686

Response data.summary Fields

FieldTypeDescriptionExample
<account>objectRevenue summary grouped by account.{ ... }

Response data.summary.<account> Fields

FieldTypeDescriptionExample
labelstringAccount label for the revenue summary.4.1.01.01 - Room Revenue
amountnumberTotal gross revenue amount.1770000
net_pricenumberTotal net revenue amount.1462809.917355372
taxes_amountnumberTotal tax amount.160909.0909090909
service_amountnumberTotal service charge amount.146280.9917355372
commission_amountnumberTotal commission amount.0
consigment_amountnumberTotal consignment amount.0
account_namestringAccount associated with the revenue summary.4.1.01.01 - Room Revenue

Response data.payment Fields

FieldTypeDescriptionExample
payment_method_idstringIdentifier of the payment method.36f2fb40-9edb-...
deposit_idnullDeposit identifier when available.null
namestringName of the payment method.test custom pos
created_bystringUser who created the payment record.admin
total_paidnumberTotal amount paid using the payment method.3000000
detailarray of objectsList of payment transactions associated with the payment method.[ ... ]

Response data.payment.detail Fields

FieldTypeDescriptionExample
payment_datestringDate of the payment transaction.2025-07-01
descriptionstringDescription of the payment transaction.Folio #944 / test late / Suite Villas / Suite Villas 101 /
codestringCurrency or payment code.IDR
account_namestringAccount associated with the payment transaction.1.1.01.01 - Cash On Hand
created_bystringUser who created the payment transaction.admin
total_paidnumberAmount paid in the transaction.1000000

Response data.summary_payment Fields

FieldTypeDescriptionExample
<payment_method>objectPayment summary grouped by payment method.{ ... }

Response data.summary_payment.<payment_method> Fields

FieldTypeDescriptionExample
labelstringIdentifier used as the payment summary label.36f2fb40-9edb-...
payment_method_idstringIdentifier of the payment method.36f2fb40-9edb-...
namestringName of the payment method.test custom pos
total_paidnumberTotal amount paid using the payment method.3000000
qtynumberNumber of payment transactions.2

Response data.guest_ledger Fields

FieldTypeDescriptionExample
debit_todaynumberTotal guest ledger debit for the current day.2000000
credit_todaynumberTotal guest ledger credit for the current day.3000000
debit_yesterdaynumberTotal guest ledger debit from the previous day.671853800
credit_yesterdaynumberTotal guest ledger credit from the previous day.685647000
idstringGuest ledger account identifier.1.1.03.02
account_idstringAccount identifier of the guest ledger.1.1.03.02
account_namestringName of the guest ledger account.1.1.03.02 - Guest Ledger
labelstringDisplay label of the guest ledger account.1.1.03.02 - Guest Ledger
total_todaynumberNet guest ledger balance for the current day.-1000000
total_yesterdaynumberNet guest ledger balance for the previous day.-13793200

Expected System Responses

The system responds with HTTP 200 OK.

{
"error": false,
"status": "ok",
"message": "",
"data": {
"detail": [
{
"dates": "2025-07-01",
"description": "Room Charge - Deluxe Villas - Deluxe Villa 101 - gus adi grup Tes",
"type": "RESERVATION",
"na_status": 1,
"id": "3b0ab8c0-c979-11ef",
"header_id": "3b080760-c979-11ef",
"account_id": "89091480-b33f-11ed",
"detail": [
{
"date": "2025-07-01",
"description": "Room Charge",
"amount": 885000,
"commission_amount": 0,
"consigment_amount": 0,
"taxes_amount": 80454.54545454546,
"service_amount": 73140.4958677686,
"account_name": "4.1.01.01 - Room Revenue",
"created_by": "gusadi",
"discount": 0,
"net_price": 731404.958677686
},
],
"total": 1000000,
"taxes": 90909.09,
"service": 82644.63,
"net_price": 826446.28,
"commission": 0,
"consigment": 0
},
],
"summary": {
"4.1.01.01 - Room Revenue": {
"label": "4.1.01.01 - Room Revenue",
"amount": 1770000,
"net_price": 1462809.917355372,
"taxes_amount": 160909.0909090909,
"service_amount": 146280.9917355372,
"commission_amount": 0,
"consigment_amount": 0,
"account_name": "4.1.01.01 - Room Revenue"
},
},
"payment": [
{
"payment_method_id": "36f2fb40-9edb-11ee",
"deposit_id": null,
"name": "test custom pos",
"created_by": "admin",
"total_paid": 3000000,
"detail": [
{
"payment_date": "2025-07-01",
"description": "Folio #944 / test late / Suite Villas / Suite Villas 101 / ",
"code": "IDR",
"account_name": "1.1.01.01 - Cash On Hand",
"created_by": "admin",
"total_paid": 1000000
},
]
}
],
"summary_payment": {
"36f2fb40-9edb-11ee": {
"label": "36f2fb40-9edb-11ee",
"payment_method_id": "36f2fb40-9edb-11ee",
"name": "test custom pos",
"total_paid": 3000000,
"qty": 2
}
},
"guest_ledger": {
"debit_today": 2000000,
"credit_today": 3000000,
"debit_yesterday": 671853800,
"credit_yesterday": 685647000,
"id": "1.1.03.02",
"account_id": "1.1.03.02",
"account_name": "1.1.03.02 - Guest Ledger",
"label": "1.1.03.02 - Guest Ledger",
"total_today": -1000000,
"total_yesterday": -13793200
},
"payment_city_ledger": 0
}
}