Skip to main content

Update Purchase Invoice

Request

PUT:/{accountBookId}/purchaseInvoice

Request Parameters

ParameterDescriptionType
docNoDocument number of record.stringrequired

Request Body

object: Purchase Invoice Input Model

Example Request Body

Example: Add another product detail under details field for record created in Create Purchase Invoice.

 {
"master": {
"docNo": "PI-000001",
"docNoFormatName": null,
"docDate": "2023-03-08",
"orgDocDate": null,
"taxDate": null,
"creditorCode": "400-0001",
"creditorName": "Apparel Supplier",
"email": "apparelSupplier@gmail.com",
"emailCC": null,
"emailBCC": null,
"address": "Jalan Wawasan 4/12, Pusat Bandar Puchong, Puchong, Selangor",
"attention": "",
"phone1": "03-5192 9527",
"fax1": "",
"ref": null,
"description": null,
"note": null,
"remark1": null,
"remark2": null,
"remark3": null,
"remark4": null,
"creditTerm": "C.O.D.",
"purchaseLocation": "HQ",
"currencyRate": 1,
"inclusiveTax": false,
"isRoundAdj": false,
"supplierInvoiceNo": "I-000001"
},
"details": [
{
"productCode": "P-00002",
"productVariant": null,
"accNo": "700-1010",
"description": "Pants",
"furtherDescription": "",
"qty": 1,
"unit": "pairs",
"unitPrice": 450,
"discount": null,
"taxCode": "P-5",
"taxAdjustment": 0,
"localTaxAdjustment": 0,
"tariffCode": "40159000",
"taxPermitNo": "",
"cnAmt": 0,
"ourPONo": "",
"ourPODate": null,
"deptNo": null
},
{
"productCode": "P-00003",
"productVariant": null,
"accNo": "700-1010",
"description": "Coat",
"furtherDescription": "",
"qty": 1,
"unit": "coats",
"unitPrice": 300,
"discount": null,
"taxCode": "P-5",
"taxAdjustment": 0,
"localTaxAdjustment": 0,
"tariffCode": "40159000",
"taxPermitNo": "",
"cnAmt": 0,
"ourPONo": "",
"ourPODate": null,
"deptNo": null
}
],
"autoFillOption": {
"accNo": false,
"taxCode": false,
"tariffCode": false
}
}

Example Request URL:

Parameters:
accountBookId = 1
docNo = PI-000001

URL:
PUT: https://accounting-api.autocountcloud.com/1/purchaseinvoice?docNo=PI-000001

Response

Success Response

Code: 204

Error Response

Response Body

object: Error Response Model

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