Back

Search

Search

Methods

Inventory

Orders

PurchaseOrder /Get_PurchaseOrder

Response: Get_PurchaseOrderResponse



Get purchase order header and items in one call

Parameters

NameTypeDescription
pkPurchaseIdGuidPurchase Order unique identifier

HTTP Endpoint

Server /PurchaseOrder / Get_PurchaseOrder

Permissions

GlobalPermissions.PurchaseOrder.ViewPurchaseOrderNode

Example Code

Example Request

The following request format is required for this method.

POST https://eu-ext.linnworks.net//api/PurchaseOrder/Get_PurchaseOrder 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

pkPurchaseId=deb08455-ca4e-4480-8d44-e4e4560e2502

Response

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

{
  "PurchaseOrderHeader": {
    "pkPurchaseID": "5d354ea7-8f0a-4ca9-9648-acf6430e9c94",
    "fkSupplierId": "834b0cfd-0ee0-44a9-8c5d-b29d74be2352",
    "fkLocationId": "84eb73e5-1b01-4088-af69-bbc334e09653",
    "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.0612765Z",
    "DateOfDelivery": "2019-07-23T15:31:56.0612765Z",
    "QuotedDeliveryDate": "2019-07-23T15:31:56.0612765Z",
    "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
  },
  "PurchaseOrderItem": [
    {
      "pkPurchaseItemId": "c79f85fa-9c8b-44b7-b967-2a9a3006b0b3",
      "fkStockItemId": "22a570ec-d922-4344-a3ce-24e62fed6a4a",
      "Quantity": 3,
      "Cost": 4.0,
      "Delivered": 5,
      "TaxRate": 6.0,
      "Tax": 7.0,
      "PackQuantity": 8,
      "PackSize": 9,
      "SKU": "sample string 10",
      "ItemTitle": "sample string 11",
      "InventoryTrackingType": 12,
      "IsDeleted": true,
      "SortOrder": 14,
      "DimHeight": 15.0,
      "DimWidth": 16.0,
      "DimDepth": 17.0,
      "BoundToOpenOrdersItems": 18,
      "BinRack": "sample string 19",
      "QuantityBoundToOpenOrdersItems": 20,
      "SupplierCode": "sample string 22"
    },
    {
      "pkPurchaseItemId": "c79f85fa-9c8b-44b7-b967-2a9a3006b0b3",
      "fkStockItemId": "22a570ec-d922-4344-a3ce-24e62fed6a4a",
      "Quantity": 3,
      "Cost": 4.0,
      "Delivered": 5,
      "TaxRate": 6.0,
      "Tax": 7.0,
      "PackQuantity": 8,
      "PackSize": 9,
      "SKU": "sample string 10",
      "ItemTitle": "sample string 11",
      "InventoryTrackingType": 12,
      "IsDeleted": true,
      "SortOrder": 14,
      "DimHeight": 15.0,
      "DimWidth": 16.0,
      "DimDepth": 17.0,
      "BoundToOpenOrdersItems": 18,
      "BinRack": "sample string 19",
      "QuantityBoundToOpenOrdersItems": 20,
      "SupplierCode": "sample string 22"
    }
  ],
  "AdditionalCosts": [
    {
      "PurchaseAdditionalCostItemId": 1,
      "AdditionalCostTypeId": 2,
      "Reference": "sample string 3",
      "SubTotalLineCost": 4.0,
      "TaxRate": 5.0,
      "Tax": 6.0,
      "Currency": "sample string 7",
      "ConversionRate": 8.0,
      "TotalLineCost": 9.0,
      "CostAllocation": [
        {
          "CostAllocationId": 1,
          "PurchaseAdditionalCostItemId": 2,
          "PurchaseItemId": "bb63a718-a23e-4b53-a1cd-ec1c3357f707",
          "AllocationPercentage": 4.0
        },
        {
          "CostAllocationId": 1,
          "PurchaseAdditionalCostItemId": 2,
          "PurchaseItemId": "bb63a718-a23e-4b53-a1cd-ec1c3357f707",
          "AllocationPercentage": 4.0
        }
      ],
      "AllocationLocked": true,
      "AdditionalCostTypeName": "sample string 11",
      "AdditionalCostTypeIsShippingType": true,
      "AdditionalCostTypeIsPartialAllocation": true,
      "Print": true,
      "AllocationMethod": 0
    },
    {
      "PurchaseAdditionalCostItemId": 1,
      "AdditionalCostTypeId": 2,
      "Reference": "sample string 3",
      "SubTotalLineCost": 4.0,
      "TaxRate": 5.0,
      "Tax": 6.0,
      "Currency": "sample string 7",
      "ConversionRate": 8.0,
      "TotalLineCost": 9.0,
      "CostAllocation": [
        {
          "CostAllocationId": 1,
          "PurchaseAdditionalCostItemId": 2,
          "PurchaseItemId": "bb63a718-a23e-4b53-a1cd-ec1c3357f707",
          "AllocationPercentage": 4.0
        },
        {
          "CostAllocationId": 1,
          "PurchaseAdditionalCostItemId": 2,
          "PurchaseItemId": "bb63a718-a23e-4b53-a1cd-ec1c3357f707",
          "AllocationPercentage": 4.0
        }
      ],
      "AllocationLocked": true,
      "AdditionalCostTypeName": "sample string 11",
      "AdditionalCostTypeIsShippingType": true,
      "AdditionalCostTypeIsPartialAllocation": true,
      "Print": true,
      "AllocationMethod": 0
    }
  ],
  "NoteCount": 1,
  "PaymentStatements": [
    {
      "PurchasePaymentStatementId": 1,
      "LineCost": 2.0,
      "ConversionRate": 3.0,
      "Currency": "sample string 4",
      "Reference": "sample string 5",
      "CreationDate": "2019-07-23T15:31:56.0622699+01:00",
      "PaymentDate": "2019-07-23T15:31:56.0622699+01:00",
      "fkPurchaseAdditionalCostItemId": 1
    },
    {
      "PurchasePaymentStatementId": 1,
      "LineCost": 2.0,
      "ConversionRate": 3.0,
      "Currency": "sample string 4",
      "Reference": "sample string 5",
      "CreationDate": "2019-07-23T15:31:56.0622699+01:00",
      "PaymentDate": "2019-07-23T15:31:56.0622699+01:00",
      "fkPurchaseAdditionalCostItemId": 1
    }
  ],
  "DeliveredRecords": [
    {
      "pkDeliveryRecordId": 1,
      "fkPurchaseItemId": "597d071b-e6c1-4163-baf4-43c299512cc6",
      "fkStockLocationId": "925637a5-3e4b-4a37-bdb1-379311acde54",
      "UnitCost": 4.0,
      "DeliveredQuantity": 5,
      "CreatedDateTime": "2019-07-23T15:31:56.0612765+01:00",
      "ModifiedDateTime": "2019-07-23T15:31:56.0612765+01:00",
      "fkBatchInventoryId": 1
    },
    {
      "pkDeliveryRecordId": 1,
      "fkPurchaseItemId": "597d071b-e6c1-4163-baf4-43c299512cc6",
      "fkStockLocationId": "925637a5-3e4b-4a37-bdb1-379311acde54",
      "UnitCost": 4.0,
      "DeliveredQuantity": 5,
      "CreatedDateTime": "2019-07-23T15:31:56.0612765+01:00",
      "ModifiedDateTime": "2019-07-23T15:31:56.0612765+01:00",
      "fkBatchInventoryId": 1
    }
  ]
}