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": "2018-10-03T11:12:33.0084588+01:00",
  "DateTo": "2018-10-03T11:12:33.0084588+01:00",
  "Status": 0,
  "ReferenceLike": "sample string 1",
  "EntriesPerPage": 2,
  "PageNumber": 3,
  "Location": [
    "7b5b62f1-74cf-4032-b9e1-fcc04ef5a411",
    "c3ca970e-5294-4a9b-b8aa-7bb6d1f6323c"
  ],
  "Supplier": [
    "f291e40f-1f33-4e03-bf3f-200a76c96f1c",
    "d4e05b84-fca2-4e2f-984e-177f4f27926e"
  ]
}

Response

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

{
  "Result": [
    {
      "pkPurchaseID": "b40935cd-893a-4d9f-866b-ed6c06dd8987",
      "fkSupplierId": "5b97161b-f183-4b1f-9cd1-c009aa9eccd1",
      "fkLocationId": "44521905-a4c6-414a-8822-495449ab5c4d",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "UnitAmountTaxIncludedType": 10,
      "DateOfPurchase": "2018-10-03T11:12:35.2700524Z",
      "DateOfDelivery": "2018-10-03T11:12:35.2700524Z",
      "QuotedDeliveryDate": "2018-10-03T11:12:35.2700524Z",
      "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": "b40935cd-893a-4d9f-866b-ed6c06dd8987",
      "fkSupplierId": "5b97161b-f183-4b1f-9cd1-c009aa9eccd1",
      "fkLocationId": "44521905-a4c6-414a-8822-495449ab5c4d",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "UnitAmountTaxIncludedType": 10,
      "DateOfPurchase": "2018-10-03T11:12:35.2700524Z",
      "DateOfDelivery": "2018-10-03T11:12:35.2700524Z",
      "QuotedDeliveryDate": "2018-10-03T11:12:35.2700524Z",
      "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
}