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-10-09T15:11:40.26845+01:00",
  "DateTo": "2019-10-09T15:11:40.26845+01:00",
  "Status": 0,
  "ReferenceLike": "sample string 1",
  "EntriesPerPage": 2,
  "PageNumber": 3,
  "Location": [
    "1ab05ce3-4412-4644-b7f1-5d6c8e181ad1",
    "ef10da74-60b8-4927-af74-9e51e654d87c"
  ],
  "Supplier": [
    "8e59db39-f25f-435d-86e6-e37c33317df4",
    "5ece90d1-b48b-4e7d-a697-5379d557dce8"
  ]
}

Response

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

{
  "Result": [
    {
      "pkPurchaseID": "de89cdb2-d793-4eaf-bad4-d178196cc9a7",
      "fkSupplierId": "0b5c8ec7-dc4d-4d9a-9107-83e3942ae223",
      "fkLocationId": "4952f33a-b937-469d-a87d-3eed9b2531b2",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "UnitAmountTaxIncludedType": 10,
      "DateOfPurchase": "2019-10-09T15:11:43.7352146Z",
      "DateOfDelivery": "2019-10-09T15:11:43.7352146Z",
      "QuotedDeliveryDate": "2019-10-09T15:11:43.7352146Z",
      "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": "de89cdb2-d793-4eaf-bad4-d178196cc9a7",
      "fkSupplierId": "0b5c8ec7-dc4d-4d9a-9107-83e3942ae223",
      "fkLocationId": "4952f33a-b937-469d-a87d-3eed9b2531b2",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "UnitAmountTaxIncludedType": 10,
      "DateOfPurchase": "2019-10-09T15:11:43.7352146Z",
      "DateOfDelivery": "2019-10-09T15:11:43.7352146Z",
      "QuotedDeliveryDate": "2019-10-09T15:11:43.7352146Z",
      "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
}