SmartAcc DynaMod Web API v2024.4 Build 0000 - Local

<back to all web services

CustomerPurchasesHistoryPOS

Customer Module - Enquiry

Customer Purchase History API

Requires Authentication
Required permission:CustomerPurchaseHistoryPOS-Enquiry.GET
The following routes are available for this service:
GET/Customers/PurchaseHistoryPOS/{AcCustomerID}Get purchase history records for a given Customer IDPurchase history included all databases (if configured any) Cash Sales
CustomerPurchasesHistoryPOS Parameters:
NameParameterData TypeRequiredDescription
AcCustomerIDpathstringNo
CustomerPurchasesHistoryPOSResponse Parameters:
NameParameterData TypeRequiredDescription
CustomerPurchaseHistoryPOSformList<CustomerPurchaseHistoryPOS>No
ResponseStatusformResponseStatusNo
CustomerPurchaseHistoryPOS Parameters:
NameParameterData TypeRequiredDescription
DocumentNoformstringNoDocument Number
AcLocationIDformstringNoLocation ID
AcLocationDescformstringNoLocation Description
AcSalesmanIDformstringNoSalesman ID
AcSalesmanNameformstringNoSalesman Name
AcSalesmanID_ItemformstringNoSalesman ID (Item Level)
AcSalesmanName_ItemformstringNoSalesman Name (Item Level)
DocumentDateformDateTimeNoDocument Date
AcStockIDformstringNoStock ID
AcStockUOMIDformstringNoStock UOM ID
ItemStockBarcodeformstringNoBarcode
ItemRemark1formstringNoItem Remark 1
StockDescription1formstringNoStock Description 1
StockDescription2formstringNoStock Description 2
ItemQuantityformdecimalNoQuantity
ItemUnitPriceformdecimalNoUnit Price
ItemGrossTotalformdecimalNoGross Total. Unit Price * Quantity
ItemDiscountAmountformdecimalNoItem Discount Amount
ItemTotalPriceformdecimalNoItem Total Price. Gross Total - Discount
ItemPriceWithGSTformdecimalNoItem Unit Price (with Tax)
ItemDiscountAmountWithGSTformdecimalNoDiscount Amount (with Tax)
ItemGSTAmountformdecimalNoTax Amount
CreateByformstringNoCreate By
DocumentTimeformDateTimeNoDocument Time
SourceDBNameformstringNoSource DB Name for the transaction
IsStockDiscontinuedformstringNoIs Stock discontinued? Y/N
StockDiscontinuedCreateByformstringNoStock discontinued create by.
StockDiscontinuedCreateDateformDateTimeNoStock discontinued create date.
StockDiscontinuedAcLocationIDformstringNoStock discontinued location ID.
StockDiscontinuedSourceDBNameformstringNoStock discontinued source DB name.

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 /Customers/PurchaseHistoryPOS/{AcCustomerID} HTTP/1.1 
Host: snr2u.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	CustomerPurchaseHistoryPOS: 
	[
		{
			DocumentNo: String,
			AcLocationID: String,
			AcLocationDesc: String,
			AcSalesmanID: String,
			AcSalesmanName: String,
			AcSalesmanID_Item: String,
			AcSalesmanName_Item: String,
			DocumentDate: 0001-01-01,
			AcStockID: String,
			AcStockUOMID: String,
			ItemStockBarcode: String,
			ItemRemark1: String,
			StockDescription1: String,
			StockDescription2: String,
			ItemQuantity: 0,
			ItemUnitPrice: 0,
			ItemGrossTotal: 0,
			ItemDiscountAmount: 0,
			ItemTotalPrice: 0,
			ItemPriceWithGST: 0,
			ItemDiscountAmountWithGST: 0,
			ItemGSTAmount: 0,
			CreateBy: String,
			DocumentTime: 0001-01-01,
			SourceDBName: String,
			IsStockDiscontinued: String,
			StockDiscontinuedCreateBy: String,
			StockDiscontinuedCreateDate: 0001-01-01,
			StockDiscontinuedAcLocationID: String,
			StockDiscontinuedSourceDBName: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}