SmartAcc DynaMod Web API v2024.4 Build 0000 - Local

<back to all web services

CustomerPurchasesHistory

Customer Module - Enquiry

Customer Purchase History API

Requires Authentication
Required permission:CustomerPurchaseHistory-Enquiry.GET
The following routes are available for this service:
GET/Customers/{AcCustomerID}/PurchaseHistoryGet purchase history records for a given Customer IDPurchase history included: Cash Sales, Invoice, Credit Note, Debit Note
GET/Customers/{AcCustomerID}/{FromDate}/PurchaseHistoryGet purchase history from given date records for a given Customer IDPurchase history included: Cash Sales, Invoice, Credit Note, Debit Note
CustomerPurchasesHistory Parameters:
NameParameterData TypeRequiredDescription
AcCustomerIDpathstringNo
FromDatepathDateTimeNo
CustomerPurchasesHistoryResponse Parameters:
NameParameterData TypeRequiredDescription
CustomerPurchaseHistoryformList<CustomerPurchaseHistory>No
ResponseStatusformResponseStatusNo
CustomerPurchaseHistory Parameters:
NameParameterData TypeRequiredDescription
DocumentTypeformstringNoDocument Type: CASH SALES, INVOICE, CREDIT NOTE, DEBIT NOTE
DocumentNoformstringNoDocument Number
DocumentDateformDateTimeNoDocument Date
AcLocationIDformstringNoLocation ID
AcCustomerIDformstringNoCustomer ID
AcSalesmanIDformstringNoSalesman ID
ItemNoformintNoDocument Item Number
ItemDisplaySeqformdecimalNoDocument Line Display Sequence
AcCompanyIDformstringNoSystem Company ID
AcStockIDformstringNoStock ID
AcStockUOMIDformstringNoStock UOM ID
ItemUnitPriceformdecimalNoUnit Price
ItemQuantityformdecimalNoQuantity
ItemGrossTotalformdecimalNoGross Total. Unit Price * Quantity
ItemDiscountTypeformstringNoDiscount Given
ItemDiscountAmountformdecimalNoDocument Amount
ItemTotalPriceformdecimalNoItem Total Price. Gross Total - Discount
ItemCurrencyRateformdecimalNoCurrency Rate
ItemLocalGrossTotalformdecimalNo
ItemLocalDiscountAmountformdecimalNo
ItemLocalTotalPriceformdecimalNo
ItemRemark1formstringNoItem Remark 1
ItemRemark2formstringNoItem Remark 2
ItemRemark3formstringNoItem Remark 3
ItemStockBarcodeformstringNoBarcode
StockDescription1formstringNoStock Description 1
StockDescription2formstringNoStock Description 2
StockArticleNoformstringNoStock Article Number
AcStockBrandIDformstringNoStock Brand ID
AcStockCategoryIDformstringNoStock Category ID
AcStockGroupIDformstringNoStock Group ID
AcStockColorIDformstringNoStock Color ID
AcStockSizeIDformstringNoStock Size ID
AcStockUDGroup1IDformstringNoStock User Define Group 1 ID
AcStockUDGroup2IDformstringNoStock User Define Group 2 ID
AcStockUDGroup3IDformstringNoStock User Define Group 3 ID
AcStockBrandDescformstringNoStock Brand Description
AcStockCategoryDescformstringNoStock Category Description
AcStockGroupDescformstringNoStock Group Description
AcStockColorDescformstringNoStock Color Description
AcStockSizeDescformstringNoStock Size Description
AcStockUDGroup1DescformstringNoStock User Define Group 1 Description
AcStockUDGroup2DescformstringNoStock User Define Group 2 Description
AcStockUDGroup3DescformstringNoStock User Define Group 3 Description
AcLocationDescformstringNoLocation Description
AcSalesmanNameformstringNoSalesman 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/{AcCustomerID}/PurchaseHistory HTTP/1.1 
Host: snr2u.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	CustomerPurchaseHistory: 
	[
		{
			DocumentType: String,
			DocumentNo: String,
			DocumentDate: 0001-01-01,
			AcLocationID: String,
			AcCustomerID: String,
			AcSalesmanID: String,
			ItemNo: 0,
			ItemDisplaySeq: 0,
			AcCompanyID: String,
			AcStockID: String,
			AcStockUOMID: String,
			ItemUnitPrice: 0,
			ItemQuantity: 0,
			ItemGrossTotal: 0,
			ItemDiscountType: String,
			ItemDiscountAmount: 0,
			ItemTotalPrice: 0,
			ItemCurrencyRate: 0,
			ItemLocalGrossTotal: 0,
			ItemLocalDiscountAmount: 0,
			ItemLocalTotalPrice: 0,
			ItemRemark1: String,
			ItemRemark2: String,
			ItemRemark3: String,
			ItemStockBarcode: String,
			StockDescription1: String,
			StockDescription2: String,
			StockArticleNo: String,
			AcStockBrandID: String,
			AcStockCategoryID: String,
			AcStockGroupID: String,
			AcStockColorID: String,
			AcStockSizeID: String,
			AcStockUDGroup1ID: String,
			AcStockUDGroup2ID: String,
			AcStockUDGroup3ID: String,
			AcStockBrandDesc: String,
			AcStockCategoryDesc: String,
			AcStockGroupDesc: String,
			AcStockColorDesc: String,
			AcStockSizeDesc: String,
			AcStockUDGroup1Desc: String,
			AcStockUDGroup2Desc: String,
			AcStockUDGroup3Desc: String,
			AcLocationDesc: String,
			AcSalesmanName: String
		}
	],
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}