Create Purchase Invoice
Request
POST:/{accountBookId}/purchaseInvoice
Request Body
object: Purchase Invoice Input Model
Example Request Body
{
"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
}
],
"autoFillOption": {
"accNo": false,
"taxCode": false,
"tariffCode": false
}
}
Example Request URL:
Parameters:accountBookId
= 1 URL:
POST: https://accounting-api.autocountcloud.com/1/purchaseinvoice
Response
Success Response
Code: 201
Response Headers
location
: The link to the created record, similar to request url in Get Purchase Invoice API method.
Example Success Response Headers
content-length: 0
date: Wed,08 Mar 2023 10:09:13 GMT
location: https://accounting-api.autocountcloud.com/1/purchaseinvoice?docNo=PI-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-08T10:10:10.4708403Z
Error Response
Response Body
object: Error Response Model
Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}