Get Purchase Order Listing (Simple)
Get purchase order listing using simple date filter.
Request
GET:/{accountBookId}/purchaseOrder/listing
Request Parameters
Parameter | Description | Type | |
---|---|---|---|
page | Page index of returned records. Each page contains at most 100 records. Using a page index beyond the number of available pages will result in empty result. | number | required |
startDate | Starting date range. Returns document records where docDate falls on startDate or later. | date | nullable |
endDate | Ending date range. Returns document records where docDate falls on startDate or earlier. | date | nullable |
Example Request URL:
Parameters:accountBookId
= 1 page
= 1 startDate
= 2023-01-06 endDate
= 2023-05-06 URL:
GET: https://accounting-api.autocountcloud.com/1/purchaseorder/listing?page=1&startDate=2023-01-06&endDate=2023-05-06
Response
Success Response
Status Code: 200
Response Body
Field | Description | Type |
---|---|---|
data | Response data. | array[Purchase Order View Model] |
totalCount | Number of records retrieved. | number |
Example Success Response Body
{
"data": [
{
"master": {
"docKey": 61,
"docNo": "PO-000001",
"docDate": "2023-03-06T00:00:00",
"creditorCode": "400-0001",
"creditorName": "Apparel Supplier",
"currencyCode": "MYR",
"currencyRate": 1.000000000000,
"email": "apparelSupplier@gmail.com",
"emailCC": null,
"emailBCC": null,
"address": "Jalan Wawasan 4/12, Pusat Bandar Puchong, Puchong, Selangor",
"attention": "",
"phone1": "03-5192 9527",
"fax1": "",
"deliverAddress": "Microsoft (Malaysia) Sdn Bhd, Level 17 & 18, Menara Shell, No. 211, Jalan Tun Sambanthan, 50470 Kuala Lumpur, Malaysia",
"deliverContact": "Mr Bob",
"deliverPhone1": "03-2777 8888",
"deliverFax1": "03-2710 6500",
"ref": null,
"description": null,
"note": null,
"remark1": null,
"remark2": null,
"remark3": null,
"remark4": null,
"creditTerm": "Net 45 days",
"purchaseLocation": "HQ",
"inclusiveTax": false,
"isRoundAdj": false,
"cancelled": false,
"documentStatus": 0,
"totalExTax": 300.00,
"taxableAmt": 300.00,
"localTaxableAmt": 300.00,
"tax": 15.00,
"localTax": 15.00,
"exTax": 15.00,
"localExTax": 15.00,
"total": 300.00,
"netTotal": 315.00,
"localNetTotal": 315.00,
"roundAdj": 0.00,
"finalTotal": 315.00,
"createdTimeStamp": "2023-03-08T15:01:38.8061959",
"createdUserID": "ADMIN",
"lastModified": "2023-03-08T16:21:46.9525207",
"lastModifiedUserID": "ADMIN",
"status": "Open"
},
"details": [
{
"docKey": 61,
"dtlKey": 150,
"seq": 0,
"productId": 542,
"productCode": "P-00003",
"productVariantId": null,
"productVariant1Option": null,
"productVariant2Option": null,
"description": "Coat",
"furtherDescription": "",
"qty": 1.00000000,
"unit": "coats",
"unitPrice": 300.00000000,
"taxCode": "P-5",
"taxRate": 5.000000,
"taxAdjustment": 0.00,
"localTaxAdjustment": 0.00,
"discount": null,
"discountAmt": 0.00,
"subTotalExTax": 300.00,
"localSubTotalExTax": 300.00,
"tax": 15.00,
"localTax": 15.00,
"subTotal": 300.00,
"localSubTotal": 300.00,
"deptNo": null
}
]
}
],
"totalCount": 1
}
Error Response
Response Body
object: Error Response Model
Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}