Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Search_PurchaseOrders

Response: Search_PurchaseOrdersResult



Searches purchase order by a number of parameters, such as Date of Purchase, status, reference number.
Returns paged result of purchase order header.

Parameters

NameTypeDescription
searchParameterSearch_PurchaseOrderParameterSearch Parameter class

HTTP Endpoint

Server /PurchaseOrder / Search_PurchaseOrders

Permissions

GlobalPermissions.PurchaseOrder.SearchPurchaseOrder.SearchPurchaseOrderNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/PurchaseOrder/Search_PurchaseOrders HTTP/1.1
Host: eu-ext.linnworks.net
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
Origin: https://www.linnworks.net
Accept-Language: en
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: https://www.linnworks.net/
Accept-Encoding: gzip, deflate
Authorization: INSERT_YOUR_TOKEN_HERE

searchParameter={
  "DateFrom": "2018-02-19T16:57:06.1832239+00:00",
  "DateTo": "2018-02-19T16:57:06.1832239+00:00",
  "Status": 0,
  "ReferenceLike": "sample string 1",
  "EntriesPerPage": 2,
  "PageNumber": 3,
  "Location": [
    "b542650c-331c-495e-9387-c54cef783bc8",
    "bb024b2a-ebd1-415e-8116-e8e74a0d739b"
  ],
  "Supplier": [
    "359479b4-c785-4ff8-b1eb-3f873f89e27c",
    "dbe5a91a-ea67-4d71-b245-cc350285cd21"
  ]
}

Response

This is an example response. Results may vary depending on your data.

{
  "Result": [
    {
      "pkPurchaseID": "8e6215c7-a618-4864-b1da-44bec9e4b441",
      "fkSupplierId": "ff3a4e0f-0df2-49d1-85dd-1433d0208a20",
      "fkLocationId": "f6a4768c-c269-4bce-b5b7-a13c5376005b",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "DateOfPurchase": "2018-02-19T16:57:07.6754652Z",
      "DateOfDelivery": "2018-02-19T16:57:07.6754652Z",
      "QuotedDeliveryDate": "2018-02-19T16:57:07.6759664Z",
      "PostagePaid": 4.0,
      "TotalCost": 5.0,
      "taxPaid": 6.0,
      "ShippingTaxRate": 7.0,
      "ConversionRate": 8.0
    },
    {
      "pkPurchaseID": "8e6215c7-a618-4864-b1da-44bec9e4b441",
      "fkSupplierId": "ff3a4e0f-0df2-49d1-85dd-1433d0208a20",
      "fkLocationId": "f6a4768c-c269-4bce-b5b7-a13c5376005b",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "DateOfPurchase": "2018-02-19T16:57:07.6754652Z",
      "DateOfDelivery": "2018-02-19T16:57:07.6754652Z",
      "QuotedDeliveryDate": "2018-02-19T16:57:07.6759664Z",
      "PostagePaid": 4.0,
      "TotalCost": 5.0,
      "taxPaid": 6.0,
      "ShippingTaxRate": 7.0,
      "ConversionRate": 8.0
    }
  ],
  "TotalPages": 1,
  "CurrentPageNumber": 2,
  "EntriesPerPage": 3,
  "TotalNumberOfRecords": 4
}