POST purchase-orders

Creates a new PurchaseOrder

Request Information

URI Parameters

None.

Body Parameters

The purchase order object to be created

NewPurchaseOrderModel
NameDescriptionTypeAdditional information
PurchaseOrderReference Optional. Reference for the PO. This must be unique. If blank a reference will be auto-assigned. string Max length: 50
DeliveryCost Optional. Delivery price for the Purchase Order. If blank the price will be calculated based on the existing settings in StoreFeeder and the Products being ordered. decimal number None.
SupplierID The ID of the Supplier in StoreFeeder that this PO is for integer None.
WarehouseID The ID of the Warehouse in StoreFeeder that this PO is for integer None.
DueDate Purchase Order Lines date None.
Lines Collection of NewPurchaseOrderLineModel None.

Request Formats

application/json, text/json

Sample:
{
  "PurchaseOrderReference": "PO123",
  "DeliveryCost": 5.99,
  "SupplierID": 101,
  "WarehouseID": 23,
  "DueDate": "2017-12-16T13:15:21.1346551+00:00",
  "Lines": [
    {
      "SKU": "ABC",
      "Qty": 10,
      "SingleItemPrice": 1.99,
      "TaxRate": 17.5
    },
    {
      "SupplierSKU": "XYZ",
      "Qty": 8,
      "SingleItemPrice": 5.87,
      "TaxRate": 20.0
    }
  ]
}

Response Information

Resource Description

Creates a new PurchaseOrder

PurchaseOrderModel
NameDescriptionTypeAdditional information
PurchaseOrderID ID of the purchase Order integer None.
PurchaseOrderGuid Unique GIUD of the Purchase Order globally unique identifier None.
User User who created the Purchase Order UserBaseModel None.
PurchaseOrderReference StoreFeeder user facing reference number for the Purchase Order string None.
DateRaised Date the Purchase Order was originally raised date None.
Supplier Supplier that the Purchase Order is for SupplierBaseModel None.
Warehouse Warehouse that the Purchase Order is for WarehouseBaseModel None.
DateDue Date that the Purchase Order is due to be delivered date None.
PurchaseOrderStatus Status of the Purchase Order PurchaseOrderStatuses None.
DeliveryCost Delivery charge for the Purchase Order decimal number None.
Subtotal Subtotal of the Purchase Order (i.e. total product cost and shipping less tax) decimal number None.
TotalVat Total VAT for the purchase order decimal number None.
Total Total cost of the purchase order including shipping and tax. decimal number None.
Currency Currency that the purchase order is created in CurrencyBaseModel None.
DateSent The Date the Purchase Order was sent to the Supplier date None.
PurchaseOrderLines List of Purchase Order Lines contained in the purchase order. Collection of PurchaseOrderLineModel None.

Response Formats

application/json, text/json

Sample:
{
  "PurchaseOrderID": 123,
  "PurchaseOrderGuid": "7940079d-1af5-42b6-b6a8-f03da55f8729",
  "User": {
    "UserID": 9,
    "UserName": "Johnny UserMan"
  },
  "PurchaseOrderReference": "123_abc",
  "DateRaised": "2017-12-16T13:15:21.1658551+00:00",
  "Supplier": {
    "SupplierID": 2,
    "Name": "Example Supplier"
  },
  "Warehouse": {
    "WarehouseName": "Demo Warehouse",
    "WarehouseGuid": "80b32f3a-09b0-44fe-9f87-25b9fddf4cee",
    "WarehouseID": 78
  },
  "DateDue": "2017-12-18T13:15:21.1658551+00:00",
  "PurchaseOrderStatus": "SentToSupplier",
  "DeliveryCost": 5.99,
  "Subtotal": 15.99,
  "TotalVat": 4.67,
  "Total": 25.99,
  "Currency": {
    "CurrencyID": 4,
    "CurrencyCode": "GBP",
    "CurrencyName": "UK Pound",
    "Symbol": "£"
  },
  "DateSent": "2017-12-16T13:35:21.1658551+00:00",
  "PurchaseOrderLines": [
    {
      "PurchaseOrderLineID": 789,
      "ProductSKU": "ABC",
      "QtyOrdered": 10,
      "QtyReceived": 0,
      "PurchaseOrderDetailsStatus": "AwaitingProduct",
      "SinglePrice": 1.99,
      "TaxRate": 20.0,
      "LineVat": 1.78,
      "LineTotal": 19.99,
      "DeliveryStatusID": 1,
      "DeliveryStatus": "Pending",
      "QtyWrittenOff": 0.0,
      "CartonQty": 10,
      "AddedByUserID": 1,
      "BookedInByUserID": 1,
      "TotalUnitsOrdered": 10,
      "TotalUnitsReceived": 0,
      "TotalUnitsWrittenOff": 0
    }
  ]
}