Skip to main content

Update Purchase Order

Request

PUT:/{accountBookId}/purchaseOrder

Request Parameters

ParameterDescriptionType
docNoDocument number of record.stringrequired

Request Body

object: Purchase Order Input Model

Example Request Body

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

{
"master": {
"docNo": "PO-000001",
"docNoFormatName": null,
"docDate": "2023-03-06",
"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": "",
"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",
"currencyRate": 1,
"inclusiveTax": false,
"isRoundAdj": false
},
"details": [
{
"productCode": "P-00003",
"productVariant": null,
"description": "Coat",
"furtherDescription": "",
"qty": 1,
"unit": "coats",
"unitPrice": 300,
"discount": null,
"taxCode": "P-5",
"taxAdjustment": 0,
"localTaxAdjustment": 0,
"deptNo": null
},
{
"productCode": "P-00002",
"productVariant": null,
"description": "Pants",
"furtherDescription": "",
"qty": 1,
"unit": "pairs",
"unitPrice": 450,
"discount": null,
"taxCode": "P-5",
"taxAdjustment": 0,
"localTaxAdjustment": 0,
"deptNo": null
}
],
"autoFillOption": {
"taxCode": false
}
}

Example Request URL:

Parameters:
accountBookId = 1
docNo = PO-000001

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

Response

Success Response

Code: 204

Error Response

Response Body

object: Error Response Model

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