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=d247f8dc-1e91-4510-9e7a-5c6c6531ce36

Response

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

{
  "PurchaseOrderHeader": {
    "pkPurchaseID": "6f9e2646-40d1-4ec7-af90-dd2ba4dbae46",
    "fkSupplierId": "aa5298ca-9cee-4ab8-90c0-05f2c3cc8fbb",
    "fkLocationId": "bfaf0590-7c4a-490c-a9ed-9554bf25b7a3",
    "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.3150838Z",
    "DateOfDelivery": "2018-10-03T11:12:35.3150838Z",
    "QuotedDeliveryDate": "2018-10-03T11:12:35.3150838Z",
    "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": "2e65bc9f-ab83-42e4-9311-8558fd300e9a",
      "fkStockItemId": "bd9fce77-83d2-4034-bee1-9de98501be94",
      "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
    },
    {
      "pkPurchaseItemId": "2e65bc9f-ab83-42e4-9311-8558fd300e9a",
      "fkStockItemId": "bd9fce77-83d2-4034-bee1-9de98501be94",
      "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
    }
  ],
  "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": "eea7f64e-97a8-4820-8758-47d6ce54a559",
          "AllocationPercentage": 4.0
        },
        {
          "CostAllocationId": 1,
          "PurchaseAdditionalCostItemId": 2,
          "PurchaseItemId": "eea7f64e-97a8-4820-8758-47d6ce54a559",
          "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": "eea7f64e-97a8-4820-8758-47d6ce54a559",
          "AllocationPercentage": 4.0
        },
        {
          "CostAllocationId": 1,
          "PurchaseAdditionalCostItemId": 2,
          "PurchaseItemId": "eea7f64e-97a8-4820-8758-47d6ce54a559",
          "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": "2018-10-03T11:12:35.3150838+01:00",
      "PaymentDate": "2018-10-03T11:12:35.3150838+01:00",
      "fkPurchaseAdditionalCostItemId": 1
    },
    {
      "PurchasePaymentStatementId": 1,
      "LineCost": 2.0,
      "ConversionRate": 3.0,
      "Currency": "sample string 4",
      "Reference": "sample string 5",
      "CreationDate": "2018-10-03T11:12:35.3150838+01:00",
      "PaymentDate": "2018-10-03T11:12:35.3150838+01:00",
      "fkPurchaseAdditionalCostItemId": 1
    }
  ],
  "DeliveredRecords": [
    {
      "pkDeliveryRecordId": 1,
      "fkPurchaseItemId": "3abdfca9-0a5c-4c2a-8b54-fe5be43ca6d3",
      "fkStockLocationId": "2bf8c513-520b-472a-9055-ca90cc53f0de",
      "UnitCost": 4.0,
      "DeliveredQuantity": 5,
      "CreatedDateTime": "2018-10-03T11:12:35.3150838+01:00",
      "ModifiedDateTime": "2018-10-03T11:12:35.3150838+01:00",
      "fkBatchInventoryId": 1
    },
    {
      "pkDeliveryRecordId": 1,
      "fkPurchaseItemId": "3abdfca9-0a5c-4c2a-8b54-fe5be43ca6d3",
      "fkStockLocationId": "2bf8c513-520b-472a-9055-ca90cc53f0de",
      "UnitCost": 4.0,
      "DeliveredQuantity": 5,
      "CreatedDateTime": "2018-10-03T11:12:35.3150838+01:00",
      "ModifiedDateTime": "2018-10-03T11:12:35.3150838+01:00",
      "fkBatchInventoryId": 1
    }
  ]
}