Create Purchase Order
Request
POST:/{accountBookId}/purchaseOrder
Request Body
object: Purchase Order Input Model
Example Request Body
{
"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
}
],
"autoFillOption": {
"taxCode": false
}
}
Example Request URL:
Parameters:accountBookId
= 1 URL:
POST: https://accounting-api.autocountcloud.com/1/purchaseorder
Response
Success Response
Code: 201
Response Headers
location
: The link to the created record, similar to request url in Get Purchase Order API method.
Example Success Response Headers
content-length: 0
date: Wed,08 Mar 2023 07:01:40 GMT
location: https://accounting-api.autocountcloud.com/1/purchaseorder?docNo=PO-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-08T07:02:34.6482119Z
Error Response
Response Body
object: Error Response Model
Example Error Response Body
{
"statusCode": 401,
"message": "401 Unauthorized."
}