Skip to main content

Create Purchase Return

Request

POST:/{accountBookId}/purchaseReturn

Request Body

object: Purchase Return Input Model

Example Request Body
{
"master": {
"docNo": "PR-000001",
"docNoFormatName": null,
"docDate": "2023-03-06",
"orgDocDate": null,
"taxDate": null,
"creditorCode": "400-0001",
"creditorName": "Apparel Supplier",
"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": "C.O.D.",
"purchaseLocation": "HQ",
"currencyRate": 1,
"inclusiveTax": false,
"isRoundAdj": false,
"reason": "Incorrect size",
"supplierInvoiceNo": "",
"supplierCNNo": "CN-000001"
},
"details": [
{
"productCode": "P-00002",
"productVariant": null,
"accNo": "710-0000",
"description": "Pants",
"furtherDescription": "",
"qty": 1,
"unit": "pairs",
"unitPrice": 450,
"discount": "",
"taxCode": "P-5",
"taxAdjustment": 0,
"localTaxAdjustment": 0,
"tariffCode": "40159000",
"taxPermitNo": "",
"goodsReturn": true,
"ourPONo": "",
"ourPODate": null,
"deptNo": "D-0004 "
}
],
"autoFillOption": {
"accNo": false,
"taxCode": false,
"tariffCode": false
}
}

Example Request URL:

Parameters:
accountBookId = 1

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

Response

Success Response

Code: 201

Response Headers

location: The link to the created record, similar to request url in Get Purchase Return API method.

Example Success Response Headers
content-length: 0 
date: Fri,10 Mar 2023 09:19:40 GMT
location: https://accounting-api.autocountcloud.com/1/purchasereturn?docNo=PR-000001
server: Microsoft-IIS/10.0
x-powered-by: ASP.NET
x-rate-limit-limit: 1m
x-rate-limit-remaining: 98
x-rate-limit-reset: 2023-03-10T09:20:07.4902872Z

Error Response

Response Body

object: Error Response Model

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