SmartAcc DynaMod Web API v2024.4 Build 0000 - Local

<back to all web services

CustomerReceiptsSimple

Customer Module - Transaction

Customer Receipt API

Requires Authentication
Required permission:CustomerReceipt-Transaction.GET
The following routes are available for this service:
GET/CustomerReceipts/simple
GET/CustomerReceipts/simple/page/{Page}Get records by given a page numberEach page consists of 20 records
GET/CustomerReceipts/simple/Receipt/{AcCusReceiptMID}Get a record by given a Document NumberHeader and Detail record would be return if found.
CustomerReceiptsSimple Parameters:
NameParameterData TypeRequiredDescription
Pagepathint?No
AcCusReceiptMIDpathstringNo
CustomerReceiptsSimpleResponse Parameters:
NameParameterData TypeRequiredDescription
ReceiptsformList<CustomerReceiptSimple>No
ResponseStatusformResponseStatusNo
CustomerReceiptSimple Parameters:
NameParameterData TypeRequiredDescription
DocumentHeaderformDocumentHeaderYesCustomer Receipt Header - Primary Key: AcCusReceiptMID
DocumentDetailsformDocumentDetailsYesCustomer Receipt Knock-Off Details - Primary Key: AcCusReceiptMID, ItemNo, MatchType, MatchDocumentNo. Note: You may get the outstanding list from CustomerOutstandingDocumentListing service.
DocumentPaymentDetailsformDocumentKnockOffDetailsYesCustomer Receipt Payment Details - Primary Key: AcCusReceiptMID, ItemNo, AcBillPaymentMethodID.
AcCusReceiptMSimple Parameters:
NameParameterData TypeRequiredDescription
AcCusReceiptMIDformNVARCHAR(20)YesReceipt Number
AcCustomerIDformNVARCHAR(20)YesCustomer ID
AcLocationIDformNVARCHAR(20)YesLocation ID
DocumentDateformDATEYesReceipt Date
RefDocumentNoformNVARCHAR(50)NoReference Number
DocumentRemarkformNVARCHAR(100)NoDocument Remark
ExtraRemark1formNVARCHAR(100)NoExtra Remark 1
ExtraRemark2formNVARCHAR(100)NoExtra Remark 2
ExtraRemark3formNVARCHAR(100)NoExtra Remark 3
ExtraRemark4formNVARCHAR(100)NoExtra Remark 4
AcCusReceiptTypeIDformNVARCHAR(20)YesReceipt Type ID (CUSTOMER RECEIPT)
PayeeformNVARCHAR(100)YesPayee Name. Default to Customer Name
AcSalesmanIDformNVARCHAR(20)YesSalesman ID
DocumentItemCurrencyAmountformNUMERIC(18,2)YesTotal Item Amount.
DocumentItemCurrencyAppliedAmountformNUMERIC(18,2)YesTotal Applied Amount. Total knock-off amount that applied to outstanding invoices.
DocumentItemCurrencyBalanceAmountformNUMERIC(18,2)YesTotal Balance Amount. (DocumentPaymentCurrencyAmount - DocumentItemCurrencyAppliedAmount).
DocumentPaymentCurrencyAmountformNUMERIC(18,2)YesTotal Payment Amount.
DocumentUnappliedCurrencyAmountformNUMERIC(18,2)YesTotal Unapplied Amount. It would be Advanced Amount. Balance amount after knock-off amount to outstanding invoice amount.
AcCusReceiptDSimple Parameters:
NameParameterData TypeRequiredDescription
AcCusReceiptDIDformNVARCHAR(40)YesRecord ID. Recommend use GUID
AcCusReceiptMIDformNVARCHAR(20)YesReceipt Number
ItemNoformINTYesItem Number
MatchTypeformNVARCHAR(20)YesMatch Document Type. Source of Document: Eg: Customer Invoice
MatchDocumentNoformNVARCHAR(20)YesMatch Document Number. Document Number to be knock-off. Eg: Customer Invoice Number
ItemRemark1formNVARCHAR(MAX)YesItem Remark 1
ItemCurrencyAmountformNUMERIC(18,2)YesItem Currency Amount. Current outstanding amount.
ItemCurrencyAppliedAmountformNUMERIC(18,2)YesItem Currency Applied Amount. Amount used to knock-off the oustanding amount. Applied amount should not greater than outstanding amount.
ItemCurrencyBalanceAmountformNUMERIC(18,2)YesItem Currency Balance Amount. Balance amount after knock-off the outstanding amount. (ItemCurrencyBalanceAmount = ItemCurrencyAmount - ItemCurrencyAppliedAmount). Should not have negative balance.
AcCusReceiptPaySimple Parameters:
NameParameterData TypeRequiredDescription
AcCusReceiptMIDformNVARCHAR(20)YesReceipt Number
ItemNoformINTYesItem Number
AcBillPaymentMethodIDformNVARCHAR(20)YesBill Payment Method ID
ItemReferenceNumberformNVARCHAR(100)NoReference Number
ItemRemark1formNVARCHAR(MAX)YesItem Remark 1
ItemCurrencyPaymentAmountformNUMERIC(18,2)YesItem Currency Payment Amount

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 /CustomerReceipts/simple HTTP/1.1 
Host: snr2u.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Receipts: 
	[
		{
			DocumentHeader: 
			{
				AcCusReceiptMID: String,
				AcCustomerID: String,
				AcLocationID: String,
				DocumentDate: 0001-01-01,
				RefDocumentNo: String,
				DocumentRemark: String,
				ExtraRemark1: String,
				ExtraRemark2: String,
				ExtraRemark3: String,
				ExtraRemark4: String,
				AcCusReceiptTypeID: String,
				Payee: String,
				AcSalesmanID: String,
				DocumentItemCurrencyAmount: 0,
				DocumentItemCurrencyAppliedAmount: 0,
				DocumentItemCurrencyBalanceAmount: 0,
				DocumentPaymentCurrencyAmount: 0,
				DocumentUnappliedCurrencyAmount: 0
			},
			DocumentDetails: 
			[
				{
					AcCusReceiptDID: String,
					AcCusReceiptMID: String,
					ItemNo: 0,
					MatchType: String,
					MatchDocumentNo: String,
					ItemRemark1: String,
					ItemCurrencyAmount: 0,
					ItemCurrencyAppliedAmount: 0,
					ItemCurrencyBalanceAmount: 0
				}
			],
			DocumentPaymentDetails: 
			[
				{
					AcCusReceiptMID: String,
					ItemNo: 0,
					AcBillPaymentMethodID: String,
					ItemReferenceNumber: String,
					ItemRemark1: String,
					ItemCurrencyPaymentAmount: 0
				}
			]
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}