Purchase Order

Get all purchase order documents.

เรียกดูข้อมูลเอกสารใบสั่งซื้อทั้งหมดในระบบ

get/purchases-orders

Request

Query parameters

currentPageinteger

Query current page document purchase orders. <br>Example Pattern: <ex>/purchases-orders?currentPage=1 </ex><ex>/purchases-orders?currentPage=1&pageSize=20</ex>

pageSizeinteger

Query document purchase orders list amount per page. <br>Example Pattern: <ex> /purchases-orders?pageSize=20 </ex>

searchStringstring

Query document by Contact Name or Project Name or Document Serial. <br>Example Pattern: <ex> /purchases-orders?searchString=PO2021010001</ex>

rangestring

Query document range type. <br>0 = all<br>1 = Current Month<br>3 = Previous Month<br>5 = Date Range<br>7 = Current Year<br>9 = Previous Year<br>15 = Fiscal Year<br>Example Query Current Month: <ex> /purchases-orders?pageSize=20&currentPage=1&range=1</ex>

monthstring

Query document by month.<br>Example Query Previous Month: <ex> /purchases-orders?pageSize=20&currentPage=1&range=1&month=5&year=2021</ex>

yearstring

Query document by year.<br>Example Query Previous Year: <ex> /purchases-orders?currentPage=1&pageSize=20&range=9&year=2020</ex>

startDatestring

Query document by startDate to endDate.<br>Example Query Date Range: <ex> /purchases-orders?currentPage=1&pageSize=20&range=5&startDate=2021-05-20&endDate=2021-05-22</ex>

endDatestring

Query document by startDate to endDate.<br>Example Query Date Range: <ex> /purchases-orders?currentPage=1&pageSize=20&range=5&startDate=2021-05-20&endDate=2021-05-22</ex>

Headers

Authorizationstring required

Response

200 response

statusboolean

action success

messagestring

error message

codeinteger

error code

Example response

{
  "data": {
    "list": [
      {
        "contactName": "บริษัท ลูกค้า จำกัด, คุณลูกค้า ซื้อประจำ",
        "contactTaxId": "1234567890123",
        "contactEmail": "contact@email.com",
        "contactNumber": "099-999-9999",
        "publishedOn": "2021-01-01",
        "creditDays": 30,
        "dueDate": "2021-01-01",
        "salesName": "พนักงาน ขายหน้าร้าน",
        "reference": "INV2020010001",
        "items": [
          {
            "name": "Service",
            "description": "Type service",
            "quantity": 1.1234,
            "unitName": "บริการ",
            "pricePerUnit": 100.0001,
            "total": 100.01,
            "sellChartOfAccountCode": "41210",
            "discountAmount": 100.01
          }
        ],
        "payments": {
          "paymentDate": "2021-01-01",
          "chequeDate": "2021-01-01"
        }
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.