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 .csv suffix or ?format=csv
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/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"CustomerPurchaseHistory":[{"DocumentType":"String","DocumentNo":"String","DocumentDate":"\/Date(-62135596800000-0000)\/","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"}}}