InventoryPro

Contents

api

Purchase Orders

Purchase Orders

The Purchase Orders endpoint manages procurement — listing open POs, retrieving details, creating new orders, and finalizing received orders.

The Purchase Order Object

{
  "poNo": "PO-2025-0042",
  "vendor": "Acme Fasteners",
  "orderDate": "2025-05-15T00:00:00Z",
  "expectedDate": "2025-06-01T00:00:00Z",
  "status": "Open",
  "totalLines": 3,
  "totalValue": 4250.00,
  "lines": [
    {
      "lineNo": 1,
      "shortID": "BOLT-M8-30",
      "description": "M8 x 30mm Hex Bolt",
      "units": 1000,
      "unitsReceived": 0,
      "unitPrice": 0.45,
      "warehouse": 1,
      "warehouseName": "Main"
    }
  ]
}

Fields

FieldTypeDescription
poNostringPurchase order number
vendorstringVendor name
orderDatedatetimeDate the PO was created
expectedDatedatetimeExpected delivery date
statusstringOpen, Partial, or Closed
totalLinesintegerNumber of line items
totalValuedecimalTotal PO value
linesarrayLine items (detail response only)

Line Fields

FieldTypeDescription
lineNointegerLine sequence number
shortIDstringPart short ID
descriptionstringPart description
unitsdecimalQuantity ordered
unitsReceiveddecimalQuantity received to date
unitPricedecimalPer-unit price
warehouseintegerWarehouse ID
warehouseNamestringWarehouse name

List Purchase Orders

GET /PurchaseOrder

Returns open purchase orders. Maximum page size is 50.

Parameters

FieldTypeRequiredDescription
pageintegerNoPage number (default 1)
pageSizeintegerNoResults per page (max 50)
sortstringNoField to sort by
directionstringNoasc or desc
startDatedatetimeNoFilter by order date on or after
endDatedatetimeNoFilter by order date on or before

Response

{
  "value": [
    {
      "poNo": "PO-2025-0042",
      "vendor": "Acme Fasteners",
      "orderDate": "2025-05-15T00:00:00Z",
      "expectedDate": "2025-06-01T00:00:00Z",
      "status": "Open",
      "totalLines": 3,
      "totalValue": 4250.00
    },
    {
      "poNo": "PO-2025-0041",
      "vendor": "Central Supply Co.",
      "orderDate": "2025-05-10T00:00:00Z",
      "expectedDate": "2025-05-28T00:00:00Z",
      "status": "Partial",
      "totalLines": 8,
      "totalValue": 12740.50
    }
  ],
  "totalCount": 28,
  "page": 1,
  "pageSize": 25,
  "pageCount": 2,
  "hasMore": true
}

Get a Purchase Order

GET /PurchaseOrder/{id}

Returns the full PO with header details and all line items.

Response

{
  "poNo": "PO-2025-0042",
  "vendor": "Acme Fasteners",
  "orderDate": "2025-05-15T00:00:00Z",
  "expectedDate": "2025-06-01T00:00:00Z",
  "status": "Open",
  "totalLines": 3,
  "totalValue": 4250.00,
  "lines": [
    {
      "lineNo": 1,
      "shortID": "BOLT-M8-30",
      "description": "M8 x 30mm Hex Bolt",
      "units": 1000,
      "unitsReceived": 0,
      "unitPrice": 0.45,
      "warehouse": 1,
      "warehouseName": "Main"
    },
    {
      "lineNo": 2,
      "shortID": "NUT-M8",
      "description": "M8 Hex Nut",
      "units": 1000,
      "unitsReceived": 0,
      "unitPrice": 0.22,
      "warehouse": 1,
      "warehouseName": "Main"
    },
    {
      "lineNo": 3,
      "shortID": "WSHR-M8",
      "description": "M8 Flat Washer",
      "units": 2000,
      "unitsReceived": 0,
      "unitPrice": 0.12,
      "warehouse": 1,
      "warehouseName": "Main"
    }
  ]
}

Create a Purchase Order

POST /PurchaseOrder

Creates a new purchase order via the system import procedure. At least one line is required.

Request Body

{
  "vendorID": 12,
  "poNumber": "PO-2025-0043",
  "lines": [
    {
      "shortID": "BOLT-M8-30",
      "units": 1000,
      "unitPrice": 0.45,
      "warehouse": 1
    },
    {
      "shortID": "NUT-M8",
      "units": 1000,
      "unitPrice": 0.22,
      "warehouse": 1
    }
  ]
}

Parameters

FieldTypeRequiredDescription
vendorIDintegerYesVendor record ID
poNumberstringYesPO number (must be unique)
linesarrayYesOne or more line items
lines[].shortIDstringYesPart short ID
lines[].unitsdecimalYesQuantity to order
lines[].unitPricedecimalYesPer-unit price
lines[].warehouseintegerYesDestination warehouse ID

Response

{
  "poNo": "PO-2025-0043",
  "vendor": "Acme Fasteners",
  "orderDate": "2025-05-31T14:22:00Z",
  "expectedDate": null,
  "status": "Open",
  "totalLines": 2,
  "totalValue": 670.00
}

Finalize a Purchase Order

POST /PurchaseOrder/Finalize

Marks a PO as complete. Optionally creates a backorder for any lines with undelivered quantity.

Request Body

{
  "poNumber": "PO-2025-0042",
  "createBackorder": true
}

Parameters

FieldTypeRequiredDescription
poNumberstringYesPO number to finalize
createBackorderbooleanYestrue to create a backorder for short-received lines

Response

{
  "poNo": "PO-2025-0042",
  "status": "Closed",
  "backorderCreated": true,
  "backorderPoNo": "PO-2025-0042-BO1"
}

Permissions

ActionRequired Permission
List / Get POsPreview PO (SecurityID 18)
Create / FinalizeCreate/Modify PO (SecurityID 42)

On this page