Get Purchase Order Listing (Specific)
Get purchase order listing using specific listing filters.
Request
POST:/{accountBookId}/purchaseOrder/listing
Request Body
object: Purchase Order Listing Input Model
Example Request Body
Get purchase order listing using a date filter
Available date filters for purchase order records are date
, createdDate
and lastModifiedDate
.
Add date filters in purchase order listing filter input model according to your needs.
Example: Get purchase order records with document date falling between a specific date range.
Date formats for from
and to
fields can be found here.
{
"page": 1,
"filter": {
"date": {
"from": "2022-05-02",
"to": "2023-05-02"
}
}
}
Get purchase order listing using a string filter
Available string filters for purchase order records are docNo
and creditorCode
.
Add string filters in purchase order listing filter input model according to your needs.
Example: Get purchase order records with specific document numbers.
For filtering specific string values, use the multiSelect
field in the filter.
{
"page": 1,
"filter": {
"docNo": {
"multiSelect": ["PO-000001", "PO-000002"]
}
}
}
Example: Get purchase order records with document number falling between a range of string values.
For filtering a range of string values, use the from
and to
fields in the filter.
{
"page": 1,
"filter": {
"docNo": {
"from": "PO-000001",
"to": "PO-000005"
}
}
}
Composite example:
{
"page": 1,
"filter": {
"date": {
"from": "2023-01-06",
"to": "2023-05-06"
},
"docNo": {
"multiSelect": ["PO-000001","PO-000003","PO-000005"]
}
}
}
Example Request URL:
Parameters:accountBookId
= 1 URL:
POST: https://accounting-api.autocountcloud.com/1/purchaseorder/listing
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."
}