Skip to main content

Get Purchase Return Listing (Specific)

Get purchase return listing using specific listing filters.

Request

POST:/{accountBookId}/purchaseReturn/listing

Request Body

object: Purchase Return Listing Input Model

Example Request Body
Get purchase return listing using a date filter

Available date filters for purchase return records are date, createdDate and lastModifiedDate. Add date filters in purchase return listing filter input model according to your needs.

Example: Get purchase return 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 return listing using a string filter

Available string filters for purchase return records are docNo and creditorCode. Add string filters in purchase return listing filter input model according to your needs.

Example: Get purchase return records with specific document numbers.

For filtering specific string values, use the multiSelect field in the filter.

{
"page": 1,
"filter": {
"docNo": {
"multiSelect": ["PR-000001", "PR-000002"]
}
}
}

Example: Get purchase return 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": "PR-000001",
"to": "PR-000005"
}
}
}

Composite example:

{
"page": 1,
"filter": {
"date": {
"from": "2023-01-06",
"to": "2023-05-06"
},
"docNo": {
"multiSelect": ["PR-000001","PR-000003","PR-000005"]
}
}
}

Example Request URL:

Parameters:
accountBookId = 1

URL:
POST: https://accounting-api.autocountcloud.com/1/purchasereturn/listing

Response

Success Response

Status Code: 200

Response Body

FieldDescriptionType
dataResponse data.array[Purchase Return View Model]
totalCountNumber of records retrieved.number
Example Success Response Body
{
"data": [
{
"master": {
"docKey": 15,
"docNo": "PR-000001",
"docDate": "2023-03-06T00:00:00",
"orgDocDate": "2023-02-19T00:00:00",
"taxDate": "2023-05-08T00:00:00",
"creditorCode": "400-0001",
"creditorName": "Apparel Supplier",
"currencyCode": "MYR",
"currencyRate": 1.000000000000,
"email": "apparelSupplier@gmail.com",
"emailCC": "",
"emailBCC": "",
"address": "Jalan Wawasan 4/12, Pusat Bandar Puchong, Puchong, Selangor",
"attention": "",
"phone1": "03-5192 9527",
"fax1": "",
"ref": "",
"description": "",
"note": "",
"remark1": "",
"remark2": "",
"remark3": "",
"remark4": "",
"creditTerm": "Net 90 days",
"purchaseLocation": "HQ",
"inclusiveTax": false,
"isRoundAdj": false,
"cancelled": false,
"totalExTax": 450.00,
"taxableAmt": 450.00,
"localTaxableAmt": 450.00,
"tax": 22.50,
"localTax": 22.50,
"exTax": 22.50,
"localExTax": 22.50,
"netTotal": 472.50,
"localNetTotal": 472.50,
"roundAdj": 0.00,
"total": 450.00,
"finalTotal": 472.50,
"createdTimeStamp": "2023-03-06T17:08:16.5197181",
"createdUserID": "ADMIN",
"lastModified": "2023-04-19T18:02:17.9526642",
"lastModifiedUserID": "ADMIN",
"reason": "Incorrect size",
"supplierInvoiceNo": "",
"supplierCNNo": "CN-000001",
"status": "Unapplied"
},
"details": [
{
"docKey": 15,
"dtlKey": 43,
"seq": 0,
"productId": 11,
"productCode": "P-00002",
"productVariantId": null,
"productVariant1Option": null,
"productVariant2Option": null,
"accNo": "710-0000",
"description": "Pants",
"furtherDescription": "",
"qty": 1.00000000,
"unit": "pairs",
"unitPrice": 450.00000000,
"discount": "",
"discountAmt": 0.00,
"taxCode": "P-5",
"taxRate": 5.000000,
"taxAdjustment": 0.00,
"localTaxAdjustment": 0.00,
"tariffCode": "40159000",
"taxPermitNo": "",
"subTotalExTax": 450.00,
"localSubTotalExTax": 450.00,
"tax": 22.50,
"localTax": 22.50,
"subTotal": 450.00,
"localSubTotal": 450.00,
"goodsReturn": true,
"ourPONo": "",
"ourPODate": null,
"deptNo": "D-0004"
}
]
}
],
"totalCount": 1
}

Error Response

Response Body

object: Error Response Model

Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}