SmartAcc DynaMod Web API v2024.4 Build 0000 - Local

<back to all web services

CustomerCashSalesSimple

Customer Module - Transaction

Customer Cash Sales API

Requires Authentication
Required permission:CustomerCashSale-Transaction.GET
The following routes are available for this service:
GET/CustomerCashSales/simple
GET/CustomerCashSales/simple/page/{Page}Get records by given a page numberEach page consists of 20 records
GET/CustomerCashSales/simple/CashSale/{DocumentNo}Get a record by given a Document NumberHeader, Detail and Payment record would be return if found.
GET/CustomerCashSales/simple/DocumentDate/{fromDocumentDate}/{toDocumentDate}Get a record by given a Document DateDate format yyyy-MM-dd
GET/CustomerCashSales/simple/EditDate/{fromEditDate}/{toEditDate}Get a record by given a Edit DateDate format yyyy-MM-dd
CustomerCashSalesSimple Parameters:
NameParameterData TypeRequiredDescription
Pagepathint?No
DocumentNopathstringNo
fromDocumentDatepathstringNo
toDocumentDatepathstringNo
fromEditDatepathstringNo
toEditDatepathstringNo
CustomerCashSalesSimpleResponse Parameters:
NameParameterData TypeRequiredDescription
CashSalesformList<CustomerCashSaleSimple>No
ResponseStatusformResponseStatusNo
CustomerCashSaleSimple Parameters:
NameParameterData TypeRequiredDescription
DocumentHeaderformDocumentHeaderYesCash Sales Header - Primary Key: DocumentNo
DocumentDetailsformDocumentDetailsYesCash Sales Details - Primary Key: DocumentNo, ItemNo
DocumentPaymentDetailsformDocumentPaymentDetailsYesCash Sales Payment Details - Primary Key: DocumentNo, ItemNo
AcCSMSimple Parameters:
NameParameterData TypeRequiredDescription
DocumentNoformNVARCHAR(20)YesCash Sales Number
AcCompanyIDformNVARCHAR(20)YesCompany ID
AcLocationIDformNVARCHAR(20)YesLocation ID
AcTerminalIDformNVARCHAR(20)YesTerminal ID. Eg: 01, 02, 03.
AcCustomerIDformNVARCHAR(20)YesCustomer ID
AcSalesmanIDformNVARCHAR(20)YesSalesman ID
DocumentDateformDATEYesDocument Date
DocumentTimeformDATETIMEYesDocument Time
AcPersonalIDformNVARCHAR(20)YesCashier ID
DocumentRemarkformNVARCHAR(100)NoDocument Remark
AmountChangeformNUMERIC(18,2)YesChange of Amount
AmountCentBalanceformNUMERIC(18,2)YesRound Cent Adjustment Amount
AmountNetformNUMERIC(18,2)YesNet Amount. Before Round Cent Adjustment
AmountFinalformNUMERIC(18,2)YesFinal Amount. After Round Cent Adjustment
ShipToRemarkformNVARCHAR(100)NoShip To: Remark
ShipToShipViaformNVARCHAR(20)NoShip To: Ship Via
ShipToAddress1formNVARCHAR(MAX)NoShip To: Address 1
ShipToAddress2formNVARCHAR(100)NoShip To: Address 2
ShipToAddress3formNVARCHAR(100)NoShip To: Address 3
ShipToAddress4formNVARCHAR(100)NoShip To: Address 4
ShipToPhone1formNVARCHAR(100)NoShip To: Phone 1
ShipToPhone2formNVARCHAR(100)NoShip To: Phone 1
ShipToFaxformNVARCHAR(100)NoShip To: Fax
ShipToContact1formNVARCHAR(100)NoShip To: Contact 1
ShipToContact2formNVARCHAR(100)NoShip To: Contact 2
ShipToAttentionformNVARCHAR(100)NoShip To: Attention
EditDateformDATETIMEYesEdit Date
IsUseTransactionBuyerElementformNVARCHAR(100)NoUse Transaction's Buyer Element?. True: Buyer Elements will stored based on provided value; False: Buyer Elements will stored based on Customer Profile's E-Invoice Elements
AcEInvoiceDocumentFlowIDformNVARCHAR(100)NoE-Invoice Document Flow ID. Open; Ready to Submit; Not Applicable
EInvoiceRegName_BuyerformNVARCHAR(300)NoE-Invoice Registration Name Buyer
EInvoiceRegTIN_BuyerformNVARCHAR(40)NoE-Invoice Registration TIN Buyer
EInvoiceRegNumber_BuyerformNVARCHAR(40)NoE-Invoice Registration Number Buyer
EInvoiceBuyerIsMalaysianformNVARCHAR(1)YesE-Invoice Buyer Is Malaysian. Y/N
EInvoiceBuyerRegTypeformNVARCHAR(20)NoE-Invoice Buyer Registration Type. NRIC/BRN/PASSPORT/ARMY
EInvoiceRegSSTNumber_BuyerformNVARCHAR(40)NoE-Invoice Registration SST Number Buyer
EInvoiceRegEmail_BuyerformNVARCHAR(320)NoE-Invoice Registration Email Buyer
EInvoiceAddressLine0_BuyerformNVARCHAR(150)NoE-Invoice Address Line 0 Buyer
EInvoiceAddressLine1_BuyerformNVARCHAR(150)NoE-Invoice Address Line 1 Buyer
EInvoiceAddressLine2_BuyerformNVARCHAR(150)NoE-Invoice Address Line 2 Buyer
EInvoiceAddressPostalZone_BuyerformNVARCHAR(50)NoE-Invoice Address Postal Zone Buyer
EInvoiceAddressCityName_BuyerformNVARCHAR(50)NoE-Invoice Address City Name Buyer
AcEInvoiceAddressStateID_BuyerformNVARCHAR(20)NoE-Invoice Address State ID Buyer. 00 to 17
AcEInvoiceAddressCountryID_BuyerformNVARCHAR(20)NoE-Invoice Address Country ID Buyer. MYS
EInvoiceRegContactNumber_BuyerformNVARCHAR(20)NoE-Invoice Registration Contact Number Buyer
IsEnableEInvoiceMYSformNVARCHAR(1)NoE-Invoice Is Enabled. (Read-Only)
AcEInvoiceDocumentStatusIDformNVARCHAR(40)NoE-Invoice Document Status ID. (Read-Only). Valid;Invalid;Submitted;Cancelled
IsConsolidatedEInvoiceformNVARCHAR(1)NoE-Invoice Is Marked for Consolidated E-Invoice. Y/N. (Read-Only)
EInvoiceDocumentNumber_ConsolidatedformNVARCHAR(50)NoE-Invoice Consolidated E-Invoice Document Number. (Read-Only)
EInvoiceSubmissionUUIDformNVARCHAR(40)NoE-Invoice Submission UUID. (Read-Only)
EInvoiceValidationUUIDformNVARCHAR(40)NoE-Invoice Validation UUID. (Read-Only)
EInvoiceValidationDateTimeformDATETIMENoE-Invoice Validated Datetime. (Read-Only)
EInvoiceValidationLinkformNVARCHAR(MAX)NoE-Invoice Validation Link. (Read-Only)
AcCSDSimple Parameters:
NameParameterData TypeRequiredDescription
DocumentNoformNVARCHAR(20)YesCash Sales Number
ItemNoformINTEGERYesItem Number
AcStockIDformNVARCHAR(20)NoStock ID
AcStockUOMIDformNVARCHAR(20)NoStock UOM ID
ItemUnitPriceformNUMERIC(18,4)YesItem Unit Price. (Tax Exclusive, Data stored to column ItemPrice)
ItemQuantityformNUMERIC(18,4)YesItem Quantity
ItemGrossTotalformNUMERIC(18,2)YesItem Gross Total. [Item Unit Price] x [Item Quantity]. (Data stored to column ItemAmount)
ItemDiscountAmountformNUMERIC(18,2)YesItem Discount Amount
ItemTotalPriceformNUMERIC(18,2)YesItem Total Price. (Exclusive Tax) [(Unit Price x Quantity) - Discount Amount]. (Data stored to column ItemTotal)
ItemRemark1formNVARCHAR(MAX)NoItem Remark 1 aka Item Notes. (Data stored to column ItemNotes)
IsUsePurchaseAccountformNVARCHAR(1)YesUse Purchase Account? Y/N. Default N. If Y, then stock's purchase account would be used instead. Applicable to Quantity less than zero only.
AcTaxIDformNVARCHAR(20)NoTax ID. Only Available in Malaysia.
ItemIsGSTExclusiveformNVARCHAR(1)YesREQUEST DO NOT USE. Indicate Is GST Exclusive (Y/N)
ItemGSTPercentformNUMERIC(18,2)YesREQUEST DO NOT USE. Item GST Percent
ItemPriceInputformNUMERIC(18,4)NoREQUEST DO NOT USE. Item Price Input
ItemPriceWithGSTformNUMERIC(18,6)NoREQUEST DO NOT USE. Item Price with GST
ItemPriceWithoutGSTformNUMERIC(18,6)NoREQUEST DO NOT USE. Item Price without GST
ItemDiscountAmountWithGSTformNUMERIC(18,6)NoREQUEST DO NOT USE. Item Discount Amount with GST
ItemDiscountAmountWithoutGSTformNUMERIC(18,6)NoREQUEST DO NOT USE. Item Discount Amount without GST
ItemTotalWithGSTformNUMERIC(18,6)YesREQUEST DO NOT USE. Item Total Amount with Tax [((Unit Price x Quantity) - Discount Amount) * Tax] (Data stored to column ItemTotalWithGST)
ItemGSTAmountformNUMERIC(18,6)NoItem total Tax/GST Amount
ItemTotalWithoutGSTformNUMERIC(18,6)NoREQUEST DO NOT USE. Item Total Amount without GST
AccountNoGSTformNVARCHAR(20)NoAccount No - GST. *Required if has AcTaxID
AcCSDSerialSimplesformListNoItem Serial Number List.
AcCSDMifareSimplesformListNoItem Mifare Transaction List.
AcEInvoiceItemClassificationIDformNVARCHAR(20)NoE-Invoice Item Classification Code (Read-Only)
AcEInvoiceItemTaxTypeIDformNVARCHAR(20)NoE-Invoice Item Tax Type Code (Read-Only)
AcCSDSerialSimple Parameters:
NameParameterData TypeRequiredDescription
AcCSDSerialIDformNVARCHAR(40)YesPrimary Key
DocumentNoformNVARCHAR(20)YesCash Sales Number
ItemNoformINTEGERYesItem Number (Referred to AcCSD.ItemNo)
AcStockIDformNVARCHAR(20)YesStock ID
AcStockUOMIDformNVARCHAR(20)YesStock UOM ID
StockSerialNumberformNVARCHAR(40)YesStock Serial Number
ItemQuantityformINTYesItem Quantity. Always 1.
AcCSDMifareSimple Parameters:
NameParameterData TypeRequiredDescription
AcCSDMifareIDformBIGINTYesPrimary Key
DocumentNoformNVARCHAR(20)YesCash Sales Number
ItemNoformINTEGERYesItem Number (Referred to AcCSD.ItemNo)
RecordIDformBIGINTYesRecord ID
TrxTypeformNVARCHAR(10)YesTransaction Type. Activate; Redeem; Refund; TopUp
AcMifareCardIDformNVARCHAR(20)YesMIFARE Card ID
MifareActivateDateformDATETIMEYesActivate Date
MifareActivateNoOfDayformINTYesActivate Number of Days
MifareNoOfEntranceformINTYesNumber of Entrance
MifareOpenCreditformNUMERIC(18,2)YesOpen Credit Amount
MifareCreditformNUMERIC(18,2)YesCredit Amount
MifareCreditBalanceformNUMERIC(18,2)YesCredit Balance Amount
CreateByformNVARCHAR(20)YesCreate By
CreateDateformDATETIMEYesCreate Date
EditByformNVARCHAR(20)YesEdit By
EditDateformDATETIMEYesCreate Date
StampformINTYesRecord Stamp. Always 0
AcCSMPaymentSimple Parameters:
NameParameterData TypeRequiredDescription
DocumentNoformNVARCHAR(20)YesCash Sales Number
ItemNoformINTEGERYesItem Number
AcPaymentCodeformNVARCHAR(20)YesPayment Code
AmountformNUMERIC(18,2)YesPayment Amount
CardNoformNVARCHAR(50)NoCard Number. Credit Card Number
ApprovalCodeformNVARCHAR(20)NoApproval Code. Bank or E-Wallet Approval Code
BankNameformNVARCHAR(100)NoBank Name
CardNameformNVARCHAR(100)NoCard Holder Name
EwalletPaymentTypeformNVARCHAR(50)NoEWallet Payment Type
PaymentTypeformNVARCHAR(10)NoInternal Verification Used. Leave it blank. CASH;CARD;OTHER (OTHER; VOUCHER; 88UNIFIED; BOOST; FASSPAY; INCARD; SARAWAKPAY; SHOPPE2GO; WECHATPAY)

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /CustomerCashSales/simple HTTP/1.1 
Host: snr2u.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	CashSales: 
	[
		{
			DocumentHeader: 
			{
				DocumentNo: String,
				AcCompanyID: String,
				AcLocationID: String,
				AcTerminalID: String,
				AcCustomerID: String,
				AcSalesmanID: String,
				DocumentDate: 0001-01-01,
				DocumentTime: 0001-01-01,
				AcPersonalID: String,
				DocumentRemark: String,
				AmountChange: 0,
				AmountCentBalance: 0,
				AmountNet: 0,
				AmountFinal: 0,
				ShipToRemark: String,
				ShipToShipVia: String,
				ShipToAddress1: String,
				ShipToAddress2: String,
				ShipToAddress3: String,
				ShipToAddress4: String,
				ShipToPhone1: String,
				ShipToPhone2: String,
				ShipToFax: String,
				ShipToContact1: String,
				ShipToContact2: String,
				ShipToAttention: String,
				EditDate: 0001-01-01,
				IsUseTransactionBuyerElement: False,
				AcEInvoiceDocumentFlowID: String,
				EInvoiceRegName_Buyer: String,
				EInvoiceRegTIN_Buyer: String,
				EInvoiceRegNumber_Buyer: String,
				EInvoiceBuyerIsMalaysian: String,
				EInvoiceBuyerRegType: String,
				EInvoiceRegSSTNumber_Buyer: String,
				EInvoiceRegEmail_Buyer: String,
				EInvoiceAddressLine0_Buyer: String,
				EInvoiceAddressLine1_Buyer: String,
				EInvoiceAddressLine2_Buyer: String,
				EInvoiceAddressPostalZone_Buyer: String,
				EInvoiceAddressCityName_Buyer: String,
				AcEInvoiceAddressStateID_Buyer: String,
				AcEInvoiceAddressCountryID_Buyer: String,
				EInvoiceRegContactNumber_Buyer: String,
				IsEnableEInvoiceMYS: String,
				AcEInvoiceDocumentStatusID: String,
				IsConsolidatedEInvoice: String,
				EInvoiceDocumentNumber_Consolidated: String,
				EInvoiceSubmissionUUID: String,
				EInvoiceValidationUUID: String,
				EInvoiceValidationDateTime: 0001-01-01,
				EInvoiceValidationLink: String
			},
			DocumentDetails: 
			[
				{
					DocumentNo: String,
					ItemNo: 0,
					AcStockID: String,
					AcStockUOMID: String,
					ItemUnitPrice: 0,
					ItemQuantity: 0,
					ItemGrossTotal: 0,
					ItemDiscountAmount: 0,
					ItemTotalPrice: 0,
					ItemRemark1: String,
					IsUsePurchaseAccount: String,
					AcTaxID: String,
					ItemIsGSTExclusive: String,
					ItemGSTPercent: 0,
					ItemPriceInput: 0,
					ItemPriceWithGST: 0,
					ItemPriceWithoutGST: 0,
					ItemDiscountAmountWithGST: 0,
					ItemDiscountAmountWithoutGST: 0,
					ItemTotalWithGST: 0,
					ItemGSTAmount: 0,
					ItemTotalWithoutGST: 0,
					AccountNoGST: String,
					AcCSDSerialSimples: 
					[
						{
							AcCSDSerialID: String,
							DocumentNo: String,
							ItemNo: 0,
							AcStockID: String,
							AcStockUOMID: String,
							StockSerialNumber: String,
							ItemQuantity: 0
						}
					],
					AcCSDMifareSimples: 
					[
						{
							AcCSDMifareID: 0,
							DocumentNo: String,
							ItemNo: 0,
							RecordID: 0,
							TrxType: String,
							AcMifareCardID: String,
							MifareActivateDate: 0001-01-01,
							MifareActivateNoOfDay: 0,
							MifareNoOfEntrance: 0,
							MifareOpenCredit: 0,
							MifareCredit: 0,
							MifareCreditBalance: 0,
							CreateBy: String,
							CreateDate: 0001-01-01,
							EditBy: String,
							EditDate: 0001-01-01,
							Stamp: 0
						}
					],
					AcEInvoiceItemClassificationID: String,
					AcEInvoiceItemTaxTypeID: String
				}
			],
			DocumentPaymentDetails: 
			[
				{
					DocumentNo: String,
					ItemNo: String,
					AcPaymentCode: String,
					Amount: 0,
					CardNo: String,
					ApprovalCode: String,
					BankName: String,
					CardName: String,
					EwalletPaymentType: String,
					PaymentType: String
				}
			]
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}