Required permission: | CustomerPurchaseHistory-Enquiry.GET |
GET | /Customers/{AcCustomerID}/PurchaseHistory | Get purchase history records for a given Customer ID | Purchase history included: Cash Sales, Invoice, Credit Note, Debit Note |
---|---|---|---|
GET | /Customers/{AcCustomerID}/{FromDate}/PurchaseHistory | Get purchase history from given date records for a given Customer ID | Purchase history included: Cash Sales, Invoice, Credit Note, Debit Note |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcCustomerID | path | string | No | |
FromDate | path | DateTime | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CustomerPurchaseHistory | form | List<CustomerPurchaseHistory> | No | |
ResponseStatus | form | ResponseStatus | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
DocumentType | form | string | No | Document Type: CASH SALES, INVOICE, CREDIT NOTE, DEBIT NOTE |
DocumentNo | form | string | No | Document Number |
DocumentDate | form | DateTime | No | Document Date |
AcLocationID | form | string | No | Location ID |
AcCustomerID | form | string | No | Customer ID |
AcSalesmanID | form | string | No | Salesman ID |
ItemNo | form | int | No | Document Item Number |
ItemDisplaySeq | form | decimal | No | Document Line Display Sequence |
AcCompanyID | form | string | No | System Company ID |
AcStockID | form | string | No | Stock ID |
AcStockUOMID | form | string | No | Stock UOM ID |
ItemUnitPrice | form | decimal | No | Unit Price |
ItemQuantity | form | decimal | No | Quantity |
ItemGrossTotal | form | decimal | No | Gross Total. Unit Price * Quantity |
ItemDiscountType | form | string | No | Discount Given |
ItemDiscountAmount | form | decimal | No | Document Amount |
ItemTotalPrice | form | decimal | No | Item Total Price. Gross Total - Discount |
ItemCurrencyRate | form | decimal | No | Currency Rate |
ItemLocalGrossTotal | form | decimal | No | |
ItemLocalDiscountAmount | form | decimal | No | |
ItemLocalTotalPrice | form | decimal | No | |
ItemRemark1 | form | string | No | Item Remark 1 |
ItemRemark2 | form | string | No | Item Remark 2 |
ItemRemark3 | form | string | No | Item Remark 3 |
ItemStockBarcode | form | string | No | Barcode |
StockDescription1 | form | string | No | Stock Description 1 |
StockDescription2 | form | string | No | Stock Description 2 |
StockArticleNo | form | string | No | Stock Article Number |
AcStockBrandID | form | string | No | Stock Brand ID |
AcStockCategoryID | form | string | No | Stock Category ID |
AcStockGroupID | form | string | No | Stock Group ID |
AcStockColorID | form | string | No | Stock Color ID |
AcStockSizeID | form | string | No | Stock Size ID |
AcStockUDGroup1ID | form | string | No | Stock User Define Group 1 ID |
AcStockUDGroup2ID | form | string | No | Stock User Define Group 2 ID |
AcStockUDGroup3ID | form | string | No | Stock User Define Group 3 ID |
AcStockBrandDesc | form | string | No | Stock Brand Description |
AcStockCategoryDesc | form | string | No | Stock Category Description |
AcStockGroupDesc | form | string | No | Stock Group Description |
AcStockColorDesc | form | string | No | Stock Color Description |
AcStockSizeDesc | form | string | No | Stock Size Description |
AcStockUDGroup1Desc | form | string | No | Stock User Define Group 1 Description |
AcStockUDGroup2Desc | form | string | No | Stock User Define Group 2 Description |
AcStockUDGroup3Desc | form | string | No | Stock User Define Group 3 Description |
AcLocationDesc | form | string | No | Location Description |
AcSalesmanName | form | string | No | Salesman Name |
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CustomerPurchasesHistoryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SmartDynaModWebAPI.ServiceModel"> <CustomerPurchaseHistory xmlns:d2p1="http://schemas.datacontract.org/2004/07/SmartDynaModWebAPI.ServiceModel.Types"> <d2p1:CustomerPurchaseHistory> <d2p1:AcCompanyID>String</d2p1:AcCompanyID> <d2p1:AcCustomerID>String</d2p1:AcCustomerID> <d2p1:AcLocationDesc>String</d2p1:AcLocationDesc> <d2p1:AcLocationID>String</d2p1:AcLocationID> <d2p1:AcSalesmanID>String</d2p1:AcSalesmanID> <d2p1:AcSalesmanName>String</d2p1:AcSalesmanName> <d2p1:AcStockBrandDesc>String</d2p1:AcStockBrandDesc> <d2p1:AcStockBrandID>String</d2p1:AcStockBrandID> <d2p1:AcStockCategoryDesc>String</d2p1:AcStockCategoryDesc> <d2p1:AcStockCategoryID>String</d2p1:AcStockCategoryID> <d2p1:AcStockColorDesc>String</d2p1:AcStockColorDesc> <d2p1:AcStockColorID>String</d2p1:AcStockColorID> <d2p1:AcStockGroupDesc>String</d2p1:AcStockGroupDesc> <d2p1:AcStockGroupID>String</d2p1:AcStockGroupID> <d2p1:AcStockID>String</d2p1:AcStockID> <d2p1:AcStockSizeDesc>String</d2p1:AcStockSizeDesc> <d2p1:AcStockSizeID>String</d2p1:AcStockSizeID> <d2p1:AcStockUDGroup1Desc>String</d2p1:AcStockUDGroup1Desc> <d2p1:AcStockUDGroup1ID>String</d2p1:AcStockUDGroup1ID> <d2p1:AcStockUDGroup2Desc>String</d2p1:AcStockUDGroup2Desc> <d2p1:AcStockUDGroup2ID>String</d2p1:AcStockUDGroup2ID> <d2p1:AcStockUDGroup3Desc>String</d2p1:AcStockUDGroup3Desc> <d2p1:AcStockUDGroup3ID>String</d2p1:AcStockUDGroup3ID> <d2p1:AcStockUOMID>String</d2p1:AcStockUOMID> <d2p1:DocumentDate>0001-01-01T00:00:00</d2p1:DocumentDate> <d2p1:DocumentNo>String</d2p1:DocumentNo> <d2p1:DocumentType>String</d2p1:DocumentType> <d2p1:ItemCurrencyRate>0</d2p1:ItemCurrencyRate> <d2p1:ItemDiscountAmount>0</d2p1:ItemDiscountAmount> <d2p1:ItemDiscountType>String</d2p1:ItemDiscountType> <d2p1:ItemDisplaySeq>0</d2p1:ItemDisplaySeq> <d2p1:ItemGrossTotal>0</d2p1:ItemGrossTotal> <d2p1:ItemLocalDiscountAmount>0</d2p1:ItemLocalDiscountAmount> <d2p1:ItemLocalGrossTotal>0</d2p1:ItemLocalGrossTotal> <d2p1:ItemLocalTotalPrice>0</d2p1:ItemLocalTotalPrice> <d2p1:ItemNo>0</d2p1:ItemNo> <d2p1:ItemQuantity>0</d2p1:ItemQuantity> <d2p1:ItemRemark1>String</d2p1:ItemRemark1> <d2p1:ItemRemark2>String</d2p1:ItemRemark2> <d2p1:ItemRemark3>String</d2p1:ItemRemark3> <d2p1:ItemStockBarcode>String</d2p1:ItemStockBarcode> <d2p1:ItemTotalPrice>0</d2p1:ItemTotalPrice> <d2p1:ItemUnitPrice>0</d2p1:ItemUnitPrice> <d2p1:StockArticleNo>String</d2p1:StockArticleNo> <d2p1:StockDescription1>String</d2p1:StockDescription1> <d2p1:StockDescription2>String</d2p1:StockDescription2> </d2p1:CustomerPurchaseHistory> </CustomerPurchaseHistory> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> </CustomerPurchasesHistoryResponse>