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-11-28T09:45:57.4652748+00:00",
  "DateTo": "2019-11-28T09:45:57.4652748+00:00",
  "Status": 0,
  "ReferenceLike": "sample string 1",
  "EntriesPerPage": 2,
  "PageNumber": 3,
  "Location": [
    "0f971430-e43e-4ca6-b167-d659f0ddfda1",
    "4ce9e962-6271-4a3f-bc09-fbcfeb633712"
  ],
  "Supplier": [
    "14dc3b36-0031-46d7-877f-c04eaeef4dfb",
    "ba629cbe-be96-4573-9437-599996ef278f"
  ]
}

Response

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

{
  "Result": [
    {
      "pkPurchaseID": "58b731eb-2af9-4432-83b0-9c5caf130e0b",
      "fkSupplierId": "088d7243-31f5-4e89-ad2d-8d834caee539",
      "fkLocationId": "6e6cd447-75c7-432f-816c-b88753efb6a2",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "UnitAmountTaxIncludedType": 10,
      "DateOfPurchase": "2019-11-28T09:46:00.3064829Z",
      "DateOfDelivery": "2019-11-28T09:46:00.3064829Z",
      "QuotedDeliveryDate": "2019-11-28T09:46:00.3064829Z",
      "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": "58b731eb-2af9-4432-83b0-9c5caf130e0b",
      "fkSupplierId": "088d7243-31f5-4e89-ad2d-8d834caee539",
      "fkLocationId": "6e6cd447-75c7-432f-816c-b88753efb6a2",
      "ExternalInvoiceNumber": "sample string 4",
      "Status": 0,
      "Currency": "sample string 5",
      "SupplierReferenceNumber": "sample string 6",
      "Locked": true,
      "LineCount": 8,
      "DeliveredLinesCount": 9,
      "UnitAmountTaxIncludedType": 10,
      "DateOfPurchase": "2019-11-28T09:46:00.3064829Z",
      "DateOfDelivery": "2019-11-28T09:46:00.3064829Z",
      "QuotedDeliveryDate": "2019-11-28T09:46:00.3064829Z",
      "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
}