Create Invoice
Request
POST:/{accountBookId}/invoice
Request Body
object: Invoice Input Model
Example Request Body
{
"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
}
],
"autoFillOption": {
"accNo": false,
"taxCode": false,
"tariffCode": false,
"localTotalCost": true
},
"saveApprove": null
}
Example Request URL:
Parameters:accountBookId
= 1 URL:
POST: https://accounting-api.autocountcloud.com/1/invoice
Response
Success Response
Code: 201
Response Headers
location
: The link to the created record, similar to request url in Get Invoice API method.
Example Success Response Headers
content-length: 0
date: Mon,06 Mar 2023 04:41:17 GMT
location: https://accounting-api.autocountcloud.com/1/invoice?docNo=I-000001
server: Microsoft-IIS/10.0
x-powered-by: ASP.NET
x-rate-limit-limit: 1m
x-rate-limit-remaining: 99
x-rate-limit-reset: 2023-03-06T04:42:17.5805017Z
Error Response
Response Body
object: Error Response Model
Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}