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.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": "2019-07-23T15:31:53.9747191+01:00",
  "DateTo": "2019-07-23T15:31:53.9747191+01:00",
  "Status": 0,
  "ReferenceLike": "sample string 1",
  "EntriesPerPage": 2,
  "PageNumber": 3,
  "Location": [
    "81054646-ee1d-48f3-975b-d04068ed231d",
    "cda418f2-b9c3-4902-80eb-bfed1d5e4a95"
  ],
  "Supplier": [
    "2171e4a1-c8dd-4cec-bb14-12866c6da7bc",
    "6b68ec45-202c-417f-8df8-3a6cdaf7a39e"
  ]
}

Response

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

{
  "Result": [
    {
      "pkPurchaseID": "0d4b7fbf-5914-46c0-b181-a1fc9c4732d8",
      "fkSupplierId": "a00d6cb8-1f1f-499d-88a9-8d5bf7410652",
      "fkLocationId": "6bc8e79a-c07f-415c-89a7-de7b1469a716",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "UnitAmountTaxIncludedType": 10,
      "DateOfPurchase": "2019-07-23T15:31:56.0232411Z",
      "DateOfDelivery": "2019-07-23T15:31:56.0232411Z",
      "QuotedDeliveryDate": "2019-07-23T15:31:56.0232411Z",
      "PostagePaid": 4.0,
      "TotalCost": 5.0,
      "taxPaid": 6.0,
      "ShippingTaxRate": 7.0,
      "ConversionRate": 8.0,
      "ConvertedShippingCost": 9.0,
      "ConvertedShippingTax": 10.0,
      "ConvertedOtherCost": 11.0,
      "ConvertedOtherTax": 12.0,
      "ConvertedGrandTotal": 13.0
    },
    {
      "pkPurchaseID": "0d4b7fbf-5914-46c0-b181-a1fc9c4732d8",
      "fkSupplierId": "a00d6cb8-1f1f-499d-88a9-8d5bf7410652",
      "fkLocationId": "6bc8e79a-c07f-415c-89a7-de7b1469a716",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "UnitAmountTaxIncludedType": 10,
      "DateOfPurchase": "2019-07-23T15:31:56.0232411Z",
      "DateOfDelivery": "2019-07-23T15:31:56.0232411Z",
      "QuotedDeliveryDate": "2019-07-23T15:31:56.0232411Z",
      "PostagePaid": 4.0,
      "TotalCost": 5.0,
      "taxPaid": 6.0,
      "ShippingTaxRate": 7.0,
      "ConversionRate": 8.0,
      "ConvertedShippingCost": 9.0,
      "ConvertedShippingTax": 10.0,
      "ConvertedOtherCost": 11.0,
      "ConvertedOtherTax": 12.0,
      "ConvertedGrandTotal": 13.0
    }
  ],
  "TotalPages": 1,
  "CurrentPageNumber": 2,
  "EntriesPerPage": 3,
  "TotalNumberOfRecords": 4
}