Skip to main content

Update Invoice

Request

PUT:/{accountBookId}/invoice

Request Parameters

ParameterDescriptionType
docNoDocument number of record.stringrequired

Request Body

object: Invoice Input Model

Example Request Body

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

{
"master": {
"docNo": "I-000001",
"docNoFormatName": null,
"docDate": "2023-03-06",
"taxDate": null,
"debtorCode": "300-D002",
"debtorName": "Customer B",
"email": "debtorB@gmail.com",
"emailCC": null,
"emailBCC": null,
"address": "No. 1327, Jalan Padang Benggali, Butterworth, Pulau Pinang",
"attention": "",
"phone1": "04-656 3345",
"fax1": "",
"deliverAddress": "No. 1327, Jalan Padang Benggali, Butterworth, Pulau Pinang",
"deliverContact": "",
"deliverPhone1": "",
"deliverFax1": "",
"ref": null,
"description": null,
"note": null,
"remark1": null,
"remark2": null,
"remark3": null,
"remark4": null,
"creditTerm": "C.O.D.",
"salesAgent": "Bob",
"salesLocation": "HQ",
"currencyRate": 1,
"inclusiveTax": false,
"isRoundAdj": false,
"paymentMethod": "CASH",
"toBankRate": 1,
"paymentAmt": 0,
"paymentRef": null
},
"details": [
{
"productCode": "P-00002",
"productVariant": null,
"accNo": "500-0000",
"description": "Pants",
"furtherDescription": "",
"qty": 1,
"unit": "pairs",
"unitPrice": 450,
"discount": null,
"taxCode": "S-5",
"taxAdjustment": 0,
"localTaxAdjustment": 0,
"tariffCode": "40159000",
"taxExportCountry": null,
"taxPermitNo": null,
"localTotalCost": 0,
"yourPONo": null,
"yourPODate": null,
"deptNo": null
},
{
"productCode": "P-00003",
"productVariant": null,
"accNo": "500-0000",
"description": "Coat",
"furtherDescription": "",
"qty": 1,
"unit": "coats",
"unitPrice": 300,
"discount": null,
"taxCode": "S-5",
"taxAdjustment": 0,
"localTaxAdjustment": 0,
"tariffCode": "40159000",
"taxExportCountry": null,
"taxPermitNo": null,
"localTotalCost": 0,
"yourPONo": null,
"yourPODate": null,
"deptNo": null
}
],
"autoFillOption": {
"accNo": false,
"taxCode": false,
"tariffCode": false,
"localTotalCost": true
}
}

Example Request URL:

Parameters:
accountBookId = 1
docNo = I-000001

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

Response

Success Response

Code: 204

Error Response

Response Body

object: Error Response Model

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