POST v1/PurchaseOrder/Autoreorder?linesPerOrder={linesPerOrder}&deleteSystemDraft={deleteSystemDraft}&deleteAllDraft={deleteAllDraft}&supplierID={supplierID}&labelID={labelID}&noSupplierOptions={noSupplierOptions}

This method finds a list of all products whose stock-on-hand SOH has fallen below the reorder point (MinimumStockQuantity) and creates draft purchase orders grouped by supplier. The user can then inspect each order and confirms if correct. Products without a supplier will be grouped onto one PO at the end - the user can then supply the extra information needed (supplier/price) before confirming.

Request Information

URI Parameters

Name Description Type Additional information
linesPerOrder

integer

Optional

deleteSystemDraft

boolean

Optional

deleteAllDraft

boolean

Optional

supplierID

integer

Optional

labelID

integer

Optional

noSupplierOptions

AutoPONoSupplierOptions

Optional

Body Parameters

None.

Response Information

Resource Description

Collection of PurchaseOrder

Name Description Type
PurchaseOrderID

The unique internal identifier of each purchase order in Tradevine e.g. 34515829115774435643

integer
OrganisationID

The internal identifier of this organisation in Tradevine e.g. 3451460443781171981

integer
SupplierID

The unique internal identifier of the supplier in Tradevine that this purchase order is for to e.g. 34515829112467586585

integer
SupplierBillingAddressID

The internal identifier of the supplier's billing address in Tradevine e.g. 3451460547437456

integer
OrderNumber

The more user friendly identifier for the order (normally auto-generated using your auto-numbering settings) e.g. PO783

string
RequiredDeliveryDate

The date/time (in UTC) that delivery is requested by

date
Status

The order status lookup value

integer
PurchaseOrderDate

The date/time (in UTC) that the purchase order was confirmed

date
DeliveryAddressID

The internal identifier of your address in Tradevine for delivery e.g. your warehouse address 3451460547437456

integer
Currency

The order currency lookup value

integer
TermsOfTrade

The payment terms lookup value

integer
ApplyTaxes

Whether tax is applicable for this order (defaulted according to seller tax-status and suppliers billing address location)

boolean
TaxCalcDate

date
TotalsTaxInclusive

Whether totals include tax

boolean
SubTotal

The sub-total of the order (excluding taxes)

decimal number
SubTotalApplicableTaxes

The sub total of all tax values for the order

decimal number
GrandTotal

The overall order total to be paid

decimal number
InternalNotes

Private notes associated with the order

string
ExternalNotes

Public notes associated with the order - these will be printed on the PDFs

string
CreatedDate

The date and time (in UTC) that the order was created

date
CreatedBy

The internal Tradevine ID of the user that created the order

integer
ModifiedDate

The date and time (in UTC) that the order was last modified

date
ModifiedBy

The internal Tradevine ID of the user that last modified the order

integer
WarehouseID

The internal Tradevine ID of the warehouse that the incoming stock will be associated with. This can be changed at the goods-receipt level.

integer
Supplier

Supplier
BillingAddress

Address
DeliveryAddress

Address
GoodsReceipts

Collection of GoodsReceipt
PurchaseOrderLines

Collection of PurchaseOrderLine
Labels

Collection of string

Response Formats

application/json

Sample:

[
  {
    "PurchaseOrderID": 1,
    "OrganisationID": 1,
    "SupplierID": 1,
    "SupplierBillingAddressID": 1,
    "OrderNumber": "sample string 1",
    "RequiredDeliveryDate": "2024-12-31T06:26:00.5109996+13:00",
    "Status": 1,
    "PurchaseOrderDate": "2024-12-31T06:26:00.5109996+13:00",
    "DeliveryAddressID": 1,
    "Currency": 1,
    "TermsOfTrade": 1,
    "ApplyTaxes": true,
    "TaxCalcDate": "2024-12-31T06:26:00.5109996+13:00",
    "TotalsTaxInclusive": true,
    "SubTotal": 1.0,
    "SubTotalApplicableTaxes": 1.0,
    "GrandTotal": 1.0,
    "InternalNotes": "sample string 2",
    "ExternalNotes": "sample string 3",
    "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
    "CreatedBy": 1,
    "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
    "ModifiedBy": 1,
    "WarehouseID": 1,
    "Supplier": {
      "SupplierID": 1,
      "OrganisationID": 1,
      "Name": "sample string 1",
      "SupplierCode": "sample string 2",
      "DefaultTermsOfTrade": 1,
      "ApprovedAccountLimit": 1.0,
      "TaxNumber": "sample string 3",
      "TrafficLight": 1,
      "Website": "sample string 4",
      "Email": "sample string 5",
      "PhoneNumber": "sample string 6",
      "FaxNumber": "sample string 7",
      "DefaultBillingAddressID": 1,
      "DefaultShippingAddressID": 1,
      "Notes": "sample string 8",
      "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
      "CreatedBy": 1,
      "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
      "ModifiedBy": 1,
      "Addresss": [
        {
          "AddressID": 1,
          "OrganisationID": 1,
          "CustomerID": 1,
          "SupplierID": 1,
          "AddressLine1": "sample string 1",
          "AddressLine2": "sample string 2",
          "AddressLine3": "sample string 3",
          "TownCity": "sample string 4",
          "RegionState": 1,
          "PostalCode": "sample string 5",
          "Country": 1,
          "CountryCode": "sample string 6",
          "DeliveryNotes": "sample string 7",
          "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
          "CreatedBy": 1,
          "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
          "ModifiedBy": 1
        },
        {
          "AddressID": 1,
          "OrganisationID": 1,
          "CustomerID": 1,
          "SupplierID": 1,
          "AddressLine1": "sample string 1",
          "AddressLine2": "sample string 2",
          "AddressLine3": "sample string 3",
          "TownCity": "sample string 4",
          "RegionState": 1,
          "PostalCode": "sample string 5",
          "Country": 1,
          "CountryCode": "sample string 6",
          "DeliveryNotes": "sample string 7",
          "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
          "CreatedBy": 1,
          "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
          "ModifiedBy": 1
        }
      ]
    },
    "BillingAddress": {
      "AddressID": 1,
      "OrganisationID": 1,
      "CustomerID": 1,
      "SupplierID": 1,
      "AddressLine1": "sample string 1",
      "AddressLine2": "sample string 2",
      "AddressLine3": "sample string 3",
      "TownCity": "sample string 4",
      "RegionState": 1,
      "PostalCode": "sample string 5",
      "Country": 1,
      "CountryCode": "sample string 6",
      "DeliveryNotes": "sample string 7",
      "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
      "CreatedBy": 1,
      "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
      "ModifiedBy": 1
    },
    "DeliveryAddress": {
      "AddressID": 1,
      "OrganisationID": 1,
      "CustomerID": 1,
      "SupplierID": 1,
      "AddressLine1": "sample string 1",
      "AddressLine2": "sample string 2",
      "AddressLine3": "sample string 3",
      "TownCity": "sample string 4",
      "RegionState": 1,
      "PostalCode": "sample string 5",
      "Country": 1,
      "CountryCode": "sample string 6",
      "DeliveryNotes": "sample string 7",
      "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
      "CreatedBy": 1,
      "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
      "ModifiedBy": 1
    },
    "GoodsReceipts": [
      {
        "GoodsReceiptID": 1,
        "OrganisationID": 1,
        "PurchaseOrderID": 1,
        "Status": 1,
        "GoodsReceiptNumber": "sample string 1",
        "DeliveryAddressID": 1,
        "SupplierReference": "sample string 2",
        "ReceiptDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedBy": 1,
        "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
        "ModifiedBy": 1,
        "WarehouseID": 1,
        "GoodsReceiptItems": [
          {
            "GoodsReceiptItemID": 1,
            "GoodsReceiptID": 1,
            "OrganisationID": 1,
            "ProductID": 1,
            "Code": "sample string 1",
            "LineNumber": 1,
            "QuantityRequired": 1.0,
            "QuantityReceived": 1.0,
            "QuantityBackOrder": 1.0,
            "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
            "CreatedBy": 1,
            "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
            "ModifiedBy": 1
          },
          {
            "GoodsReceiptItemID": 1,
            "GoodsReceiptID": 1,
            "OrganisationID": 1,
            "ProductID": 1,
            "Code": "sample string 1",
            "LineNumber": 1,
            "QuantityRequired": 1.0,
            "QuantityReceived": 1.0,
            "QuantityBackOrder": 1.0,
            "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
            "CreatedBy": 1,
            "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
            "ModifiedBy": 1
          }
        ]
      },
      {
        "GoodsReceiptID": 1,
        "OrganisationID": 1,
        "PurchaseOrderID": 1,
        "Status": 1,
        "GoodsReceiptNumber": "sample string 1",
        "DeliveryAddressID": 1,
        "SupplierReference": "sample string 2",
        "ReceiptDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedBy": 1,
        "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
        "ModifiedBy": 1,
        "WarehouseID": 1,
        "GoodsReceiptItems": [
          {
            "GoodsReceiptItemID": 1,
            "GoodsReceiptID": 1,
            "OrganisationID": 1,
            "ProductID": 1,
            "Code": "sample string 1",
            "LineNumber": 1,
            "QuantityRequired": 1.0,
            "QuantityReceived": 1.0,
            "QuantityBackOrder": 1.0,
            "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
            "CreatedBy": 1,
            "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
            "ModifiedBy": 1
          },
          {
            "GoodsReceiptItemID": 1,
            "GoodsReceiptID": 1,
            "OrganisationID": 1,
            "ProductID": 1,
            "Code": "sample string 1",
            "LineNumber": 1,
            "QuantityRequired": 1.0,
            "QuantityReceived": 1.0,
            "QuantityBackOrder": 1.0,
            "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
            "CreatedBy": 1,
            "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
            "ModifiedBy": 1
          }
        ]
      }
    ],
    "PurchaseOrderLines": [
      {
        "PurchaseOrderLineID": 1,
        "PurchaseOrderID": 1,
        "OrganisationID": 1,
        "Code": "sample string 1",
        "ProductID": 1,
        "LineNumber": 1,
        "Quantity": 1.0,
        "PriceExTax": 1.0,
        "PriceIncTax": 1.0,
        "TaxClassID": 1,
        "TaxCode": "sample string 2",
        "TaxRate": 1.0,
        "TaxTotal": 1.0,
        "LineTotal": 1.0,
        "LineNotes": "sample string 3",
        "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedBy": 1,
        "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
        "ModifiedBy": 1
      },
      {
        "PurchaseOrderLineID": 1,
        "PurchaseOrderID": 1,
        "OrganisationID": 1,
        "Code": "sample string 1",
        "ProductID": 1,
        "LineNumber": 1,
        "Quantity": 1.0,
        "PriceExTax": 1.0,
        "PriceIncTax": 1.0,
        "TaxClassID": 1,
        "TaxCode": "sample string 2",
        "TaxRate": 1.0,
        "TaxTotal": 1.0,
        "LineTotal": 1.0,
        "LineNotes": "sample string 3",
        "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedBy": 1,
        "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
        "ModifiedBy": 1
      }
    ],
    "Labels": [
      "sample string 1",
      "sample string 2"
    ]
  },
  {
    "PurchaseOrderID": 1,
    "OrganisationID": 1,
    "SupplierID": 1,
    "SupplierBillingAddressID": 1,
    "OrderNumber": "sample string 1",
    "RequiredDeliveryDate": "2024-12-31T06:26:00.5109996+13:00",
    "Status": 1,
    "PurchaseOrderDate": "2024-12-31T06:26:00.5109996+13:00",
    "DeliveryAddressID": 1,
    "Currency": 1,
    "TermsOfTrade": 1,
    "ApplyTaxes": true,
    "TaxCalcDate": "2024-12-31T06:26:00.5109996+13:00",
    "TotalsTaxInclusive": true,
    "SubTotal": 1.0,
    "SubTotalApplicableTaxes": 1.0,
    "GrandTotal": 1.0,
    "InternalNotes": "sample string 2",
    "ExternalNotes": "sample string 3",
    "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
    "CreatedBy": 1,
    "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
    "ModifiedBy": 1,
    "WarehouseID": 1,
    "Supplier": {
      "SupplierID": 1,
      "OrganisationID": 1,
      "Name": "sample string 1",
      "SupplierCode": "sample string 2",
      "DefaultTermsOfTrade": 1,
      "ApprovedAccountLimit": 1.0,
      "TaxNumber": "sample string 3",
      "TrafficLight": 1,
      "Website": "sample string 4",
      "Email": "sample string 5",
      "PhoneNumber": "sample string 6",
      "FaxNumber": "sample string 7",
      "DefaultBillingAddressID": 1,
      "DefaultShippingAddressID": 1,
      "Notes": "sample string 8",
      "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
      "CreatedBy": 1,
      "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
      "ModifiedBy": 1,
      "Addresss": [
        {
          "AddressID": 1,
          "OrganisationID": 1,
          "CustomerID": 1,
          "SupplierID": 1,
          "AddressLine1": "sample string 1",
          "AddressLine2": "sample string 2",
          "AddressLine3": "sample string 3",
          "TownCity": "sample string 4",
          "RegionState": 1,
          "PostalCode": "sample string 5",
          "Country": 1,
          "CountryCode": "sample string 6",
          "DeliveryNotes": "sample string 7",
          "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
          "CreatedBy": 1,
          "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
          "ModifiedBy": 1
        },
        {
          "AddressID": 1,
          "OrganisationID": 1,
          "CustomerID": 1,
          "SupplierID": 1,
          "AddressLine1": "sample string 1",
          "AddressLine2": "sample string 2",
          "AddressLine3": "sample string 3",
          "TownCity": "sample string 4",
          "RegionState": 1,
          "PostalCode": "sample string 5",
          "Country": 1,
          "CountryCode": "sample string 6",
          "DeliveryNotes": "sample string 7",
          "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
          "CreatedBy": 1,
          "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
          "ModifiedBy": 1
        }
      ]
    },
    "BillingAddress": {
      "AddressID": 1,
      "OrganisationID": 1,
      "CustomerID": 1,
      "SupplierID": 1,
      "AddressLine1": "sample string 1",
      "AddressLine2": "sample string 2",
      "AddressLine3": "sample string 3",
      "TownCity": "sample string 4",
      "RegionState": 1,
      "PostalCode": "sample string 5",
      "Country": 1,
      "CountryCode": "sample string 6",
      "DeliveryNotes": "sample string 7",
      "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
      "CreatedBy": 1,
      "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
      "ModifiedBy": 1
    },
    "DeliveryAddress": {
      "AddressID": 1,
      "OrganisationID": 1,
      "CustomerID": 1,
      "SupplierID": 1,
      "AddressLine1": "sample string 1",
      "AddressLine2": "sample string 2",
      "AddressLine3": "sample string 3",
      "TownCity": "sample string 4",
      "RegionState": 1,
      "PostalCode": "sample string 5",
      "Country": 1,
      "CountryCode": "sample string 6",
      "DeliveryNotes": "sample string 7",
      "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
      "CreatedBy": 1,
      "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
      "ModifiedBy": 1
    },
    "GoodsReceipts": [
      {
        "GoodsReceiptID": 1,
        "OrganisationID": 1,
        "PurchaseOrderID": 1,
        "Status": 1,
        "GoodsReceiptNumber": "sample string 1",
        "DeliveryAddressID": 1,
        "SupplierReference": "sample string 2",
        "ReceiptDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedBy": 1,
        "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
        "ModifiedBy": 1,
        "WarehouseID": 1,
        "GoodsReceiptItems": [
          {
            "GoodsReceiptItemID": 1,
            "GoodsReceiptID": 1,
            "OrganisationID": 1,
            "ProductID": 1,
            "Code": "sample string 1",
            "LineNumber": 1,
            "QuantityRequired": 1.0,
            "QuantityReceived": 1.0,
            "QuantityBackOrder": 1.0,
            "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
            "CreatedBy": 1,
            "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
            "ModifiedBy": 1
          },
          {
            "GoodsReceiptItemID": 1,
            "GoodsReceiptID": 1,
            "OrganisationID": 1,
            "ProductID": 1,
            "Code": "sample string 1",
            "LineNumber": 1,
            "QuantityRequired": 1.0,
            "QuantityReceived": 1.0,
            "QuantityBackOrder": 1.0,
            "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
            "CreatedBy": 1,
            "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
            "ModifiedBy": 1
          }
        ]
      },
      {
        "GoodsReceiptID": 1,
        "OrganisationID": 1,
        "PurchaseOrderID": 1,
        "Status": 1,
        "GoodsReceiptNumber": "sample string 1",
        "DeliveryAddressID": 1,
        "SupplierReference": "sample string 2",
        "ReceiptDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedBy": 1,
        "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
        "ModifiedBy": 1,
        "WarehouseID": 1,
        "GoodsReceiptItems": [
          {
            "GoodsReceiptItemID": 1,
            "GoodsReceiptID": 1,
            "OrganisationID": 1,
            "ProductID": 1,
            "Code": "sample string 1",
            "LineNumber": 1,
            "QuantityRequired": 1.0,
            "QuantityReceived": 1.0,
            "QuantityBackOrder": 1.0,
            "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
            "CreatedBy": 1,
            "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
            "ModifiedBy": 1
          },
          {
            "GoodsReceiptItemID": 1,
            "GoodsReceiptID": 1,
            "OrganisationID": 1,
            "ProductID": 1,
            "Code": "sample string 1",
            "LineNumber": 1,
            "QuantityRequired": 1.0,
            "QuantityReceived": 1.0,
            "QuantityBackOrder": 1.0,
            "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
            "CreatedBy": 1,
            "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
            "ModifiedBy": 1
          }
        ]
      }
    ],
    "PurchaseOrderLines": [
      {
        "PurchaseOrderLineID": 1,
        "PurchaseOrderID": 1,
        "OrganisationID": 1,
        "Code": "sample string 1",
        "ProductID": 1,
        "LineNumber": 1,
        "Quantity": 1.0,
        "PriceExTax": 1.0,
        "PriceIncTax": 1.0,
        "TaxClassID": 1,
        "TaxCode": "sample string 2",
        "TaxRate": 1.0,
        "TaxTotal": 1.0,
        "LineTotal": 1.0,
        "LineNotes": "sample string 3",
        "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedBy": 1,
        "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
        "ModifiedBy": 1
      },
      {
        "PurchaseOrderLineID": 1,
        "PurchaseOrderID": 1,
        "OrganisationID": 1,
        "Code": "sample string 1",
        "ProductID": 1,
        "LineNumber": 1,
        "Quantity": 1.0,
        "PriceExTax": 1.0,
        "PriceIncTax": 1.0,
        "TaxClassID": 1,
        "TaxCode": "sample string 2",
        "TaxRate": 1.0,
        "TaxTotal": 1.0,
        "LineTotal": 1.0,
        "LineNotes": "sample string 3",
        "CreatedDate": "2024-12-31T06:26:00.5109996+13:00",
        "CreatedBy": 1,
        "ModifiedDate": "2024-12-31T06:26:00.5109996+13:00",
        "ModifiedBy": 1
      }
    ],
    "Labels": [
      "sample string 1",
      "sample string 2"
    ]
  }
]