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=5445ea13-6d6d-4b55-9c63-a7949df4911a

Response

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

{
  "PurchaseOrderHeader": {
    "pkPurchaseID": "ea2970ad-0982-4d8f-8b40-22640530a7af",
    "fkSupplierId": "0f6732f3-c18c-4304-94db-b13d317ee4a9",
    "fkLocationId": "45919f68-66df-4337-9ed2-4a71e09d4131",
    "ExternalInvoiceNumber": "sample string 4",
    "Status": 0,
    "Currency": "sample string 5",
    "SupplierReferenceNumber": "sample string 6",
    "Locked": true,
    "LineCount": 8,
    "DeliveredLinesCount": 9,
    "UnitAmountTaxIncludedType": 10,
    "DateOfPurchase": "2019-06-12T09:27:52.1066845Z",
    "DateOfDelivery": "2019-06-12T09:27:52.1066845Z",
    "QuotedDeliveryDate": "2019-06-12T09:27:52.1066845Z",
    "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": "39f44ab0-27b4-4ab1-a857-2889d77e53cf",
      "fkStockItemId": "01ccb152-04c5-4642-b95a-a8edc0b8e6b6",
      "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": "39f44ab0-27b4-4ab1-a857-2889d77e53cf",
      "fkStockItemId": "01ccb152-04c5-4642-b95a-a8edc0b8e6b6",
      "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": "b350ad85-fd40-4b34-8b2d-3b6653d652b3",
          "AllocationPercentage": 4.0
        },
        {
          "CostAllocationId": 1,
          "PurchaseAdditionalCostItemId": 2,
          "PurchaseItemId": "b350ad85-fd40-4b34-8b2d-3b6653d652b3",
          "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": "b350ad85-fd40-4b34-8b2d-3b6653d652b3",
          "AllocationPercentage": 4.0
        },
        {
          "CostAllocationId": 1,
          "PurchaseAdditionalCostItemId": 2,
          "PurchaseItemId": "b350ad85-fd40-4b34-8b2d-3b6653d652b3",
          "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-06-12T09:27:52.1066845+01:00",
      "PaymentDate": "2019-06-12T09:27:52.1066845+01:00",
      "fkPurchaseAdditionalCostItemId": 1
    },
    {
      "PurchasePaymentStatementId": 1,
      "LineCost": 2.0,
      "ConversionRate": 3.0,
      "Currency": "sample string 4",
      "Reference": "sample string 5",
      "CreationDate": "2019-06-12T09:27:52.1066845+01:00",
      "PaymentDate": "2019-06-12T09:27:52.1066845+01:00",
      "fkPurchaseAdditionalCostItemId": 1
    }
  ],
  "DeliveredRecords": [
    {
      "pkDeliveryRecordId": 1,
      "fkPurchaseItemId": "3071ecf5-66be-454c-a3c0-da13ae67e674",
      "fkStockLocationId": "02a6d417-bdb7-4659-a4a2-0cb1dff9376d",
      "UnitCost": 4.0,
      "DeliveredQuantity": 5,
      "CreatedDateTime": "2019-06-12T09:27:52.1066845+01:00",
      "ModifiedDateTime": "2019-06-12T09:27:52.1066845+01:00",
      "fkBatchInventoryId": 1
    },
    {
      "pkDeliveryRecordId": 1,
      "fkPurchaseItemId": "3071ecf5-66be-454c-a3c0-da13ae67e674",
      "fkStockLocationId": "02a6d417-bdb7-4659-a4a2-0cb1dff9376d",
      "UnitCost": 4.0,
      "DeliveredQuantity": 5,
      "CreatedDateTime": "2019-06-12T09:27:52.1066845+01:00",
      "ModifiedDateTime": "2019-06-12T09:27:52.1066845+01:00",
      "fkBatchInventoryId": 1
    }
  ]
}