Purchase Order Line Item Receiving (POLIR) - API

Implementation Steps

TaskResponsible Party
Provide API endpoint access details and credentialsFacilityOS
Set up automated job to send PO Header and PO Line Data, and to pull PO Receipt dataClient
Review data and confirm accuracyClient

Add PO Header

Endpoint: /api/po/purchaseOrder

Authentication: Basic

Format: JSON

For each PO Header, send a POST to the /api/po/purchaseOrder endpoint with the latest PO Header details.  It is recommended to only send updates for records that have recently changed. 

Request

Fields

Friendly NameField NameData TypeRequiredDescription
PO IDpo_IDText (50)Yes

Primary Key

Used to track Purchase Orders entered into system

PO Typepo_TypeText (20)NoReporting use and may be displayed in the LOS UI
Business Unitbusiness_UnitText (50)YesReporting use and may be displayed in the Line Item UI
Receive StatusRecv_StatusText (1)No 

N = New, P = Partial, R = Received (complete)

Reporting use and may be displayed in the LOS UI

Vendor IDvendor_IDText (50)NoReporting use and may be displayed in the LOS UI
Vendor Namevendor_NameText (50)NoReporting use and may be displayed in the LOS UI
Vendor Set IDvendor_SetIDText (20)NoReporting use and may be displayed in the LOS UI
Entered DateTimeentered_DTDateTimeNoReporting use and may be displayed in the LOS UI
Last Modifiedlast_DTTM_UpdateDateTimeNoDatetime of last modified
PO Revisionpo_RevisionIntNoReporting use and may be displayed in the LOS UI
Total Order Amounttotal_Order_AmtCurrencyNoReporting use and may be displayed in the LOS UI
Default Cost Centerdefault_Cost_CenterText (50)NoReporting use and may be displayed in the LOS UI
Default Deliver Todefault_Deliver_ToText (50)NoReporting use and may match EmpID in Recipient table; if so, the PO Lookup automation may set the Location.  
Profile IDprofileIDIntYesThe FacilityOS profile ID

Message

{
  "business_Unit": "string",
  "po_ID": "string",
  "po_Type": "string",
  "po_REVISION": 0,
  "recv_STATUS": 0,
  "vendor_ID": 0,
  "vendor_SETID": 0,
  "vendor_Name": "string",
  "entered_DT": "2026-07-21T18:32:47.450Z",
  "last_DTTM_UPDATE": "2026-07-21T18:32:47.450Z",
  "total_Order_Amt": 0,
  "default_Cost_Center": "string",
  "default_Deliver_To": "string",
  "profileID": 0
}

Curl

curl -X POST "https://<FOS API URL>/api/po/purchaseOrder" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"business_Unit\": \"string\", \"po_ID\": \"string\", \"po_Type\": \"string\", \"po_REVISION\": 0, \"recv_STATUS\": 0, \"vendor_ID\": 0, \"vendor_SETID\": 0, \"vendor_Name\": \"string\", \"entered_DT\": \"2026-07-21T18:32:47.450Z\", \"last_DTTM_UPDATE\": \"2026-07-21T18:32:47.450Z\", \"total_Order_Amt\": 0, \"default_Cost_Center\": \"string\", \"default_Deliver_To\": \"string\", \"profileID\": 0}"

Add PO Line

Endpoint: /api/po/poLine

Authentication: Basic

Format: JSON

For each PO Line, send a POST to the /api/po/poLine endpoint with the latest PO Line details.  It is recommended to only send updates for records that have recently changed. 

Request

Fields

Friendly NameField NameData TypeRequiredDescription
PO IDpo_IdText (50) Yes

Composite Key (with Line_Number)

Used to track Purchase Orders entered into system

Line Numberline_NumberIntYes 

Composite Key (with PO_ID)

The line in the PO

Line numbers should start with 1 and be sequential

Business Unitbusiness_UnitText (50)YesReporting use and may be displayed in the Line Item UI
Entered DateTimeentered_DTDatetimeNoReporting use
Quantityquantity_PONumeric (11.4) Yes

Reporting use and displayed in the Line Item UI

Most quantities are whole numbers, but decimals are possible for units like gallons

Priceprice_POCurrencyNoReporting use and may be displayed in the Line Item UI
Unit of Measureunit_Of_MeasureText (50)NoReporting use and may be displayed in the Line Item UI
Vendor Item IDvendor_ItemIdText (50)NoReporting use and may be displayed in the Line Item UI
Item Descriptionitem_DescriptionText (255)YesReporting use and may be displayed in the Line Item UI
Location IDlocation_IdText (50)No 

Reporting use

Vendor's Ship-to location; for central receiving, this is often the same for every order

Financial Asset SWfinancial_Asset_SWText (1)NoReporting use and available for PO Receipts export
Requisition IDreq_IdText (50)NoReporting use and available for PO Receipts export
Schedule Line Numberschedule_Line_NumberIntNoReporting use and available for PO Receipts export
Distribution Line Numberdistribution_Line_NumberIntNoReporting use and available for PO Receipts export
Delivery Location IDdelivery_Location_IDText (50)NoReporting use and may match EmpID in Recipient table; if so, the PO Lookup automation may set the Location
Delivery CommentdeliverycommentText (50)NoReporting use and may be displayed in the Line Item UI
Buyer NamebuyernameText (50)NoReporting use and may be displayed in the Line Item UI
Default Cost CenterdefaultcostcenterText (50)NoReporting use and may be displayed in the Line Item UI
Last ModifiedlastModifiedDatetimeNoDatetime of last modified
Profile IDprofileIDIntYesThe FacilityOS profile ID

Message

{
  "business_Unit": "string",
  "po_ID": "string",
  "line_Number": 0,
  "entered_DT": "2026-07-21T18:38:01.416Z",
  "quantity_PO": 0,
  "price_PO": 0,
  "unit_of_Measure": "string",
  "vendor_ItemId": "string",
  "item_Description": "string",
  "location_ID": "string",
  "financial_Asset_SW": "string",
  "req_ID": "string",
  "schedule_Line_Number": 0,
  "distribution_Line_Number": 0,
  "delivery_Location_ID": "string",
  "delivery_Comment": "string",
  "lastModified": "2026-07-21T18:38:01.416Z",
  "buyer_Name": "string",
  "default_Cost_Center": "string",
  "profileID": 0
}

Curl

curl -X POST "https://<FOS API URL>/api/po/poLine" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"business_Unit\": \"string\", \"po_ID\": \"string\", \"line_Number\": 0, \"entered_DT\": \"2026-07-21T18:38:01.416Z\", \"quantity_PO\": 0, \"price_PO\": 0, \"unit_of_Measure\": \"string\", \"vendor_ItemId\": \"string\", \"item_Description\": \"string\", \"location_ID\": \"string\", \"financial_Asset_SW\": \"string\", \"req_ID\": \"string\", \"schedule_Line_Number\": 0, \"distribution_Line_Number\": 0, \"delivery_Location_ID\": \"string\", \"delivery_Comment\": \"string\", \"lastModified\": \"2026-07-21T18:38:01.416Z\", \"buyer_Name\": \"string\", \"default_Cost_Center\": \"string\", \"profileID\": 0}"

Get PO Receipts

Endpoint: /api/po/poReceipts

Authentication: Basic

Format: JSON

On a pre-defined frequency, send a POST to the /api/po/poReceipts endpoint with the start and end dates of the requested timeframe. 

Request

Fields

Field NameRequiredTypeDescriptions/Notes
beginDateYesDateTime

The start of the timeframe of receipts to pull

Time zone matches that of database server (UTC for FacilityOS-hosted clients)

endDateYesDateTime

The end of the timeframe of receipts to pull

Time zone matches that of database server (UTC for FacilityOS-hosted clients)

returnUnprocessedNoInt

1 = pull receipts not marked as processed

0 = pull receipts marked as processed; default

receiptSourceNoStringThe source of the receipt transaction
po_IDNoStringPurchase Order Number
profileIDYesIntFacilityOS Profile ID

Message

{
  "beginDate": "2026-07-21T18:43:11.624Z",
  "endDate": "2026-07-21T18:43:11.624Z",
  "returnUnprocessed": 0,
  "receiptSource": "string",
  "po_ID": "string",
  "profileID": 0
}

Curl

curl -X POST "https://<FOS API URL>/ api/po/POReceipts" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"beginDate\": \"2026-07-21T18:43:11.624Z\", \"endDate\": \"2026-07-21T18:43:11.624Z\", \"returnUnprocessed\": 0, \"receiptSource\": \"string\", \"po_ID\": \"string\", \"profileID\": 0}"

Response 

Fields

Field NameType (Length)DescriptionPurpose/Notes
Business_UnitText (50)Business UnitReporting use and may be displayed in the Line Item UI
PO_IDText (50)Purchase Order NumberUsed to track Purchase Orders entered into system
PO_Line_NumberIntLine NumberThe line in the PO
Recv_IDStringReceipt IDSystem-assigned unique ID for the PO and Line Number receipt transaction
ManifestNumberText (50)Manifest IDFacilityOS’s manifest/transaction ID
Quantity_ReceivedNumeric (11.4)Quantity ReceivedQuantity received in manifest/transaction
PO_TypeText (20)PO TypeReporting use and may be displayed in the FacilityOS UI
Vendor_ItemIDText (50)Vendor Item IDReporting use and may be displayed in the Line Item UI
Item_DescriptionText (255)Item DescriptionReporting use and may be displayed in the Line Item UI
IntraUsernameText (50)UsernameThe FacilityOS user who received the PO
ReceivedDateTimeDatetimeHDateTimestamp of receipt
Unit_of_MeasureText (50)EA, PK, CT, etc.Reporting use and may be displayed in the Line Item UI
Price_POCurrencyCost per UnitReporting use and may be displayed in the Line Item UI
Vendor_IDText (50)Vendor IDReporting use and may be displayed in the FacilityOS UI
Receiving_CommentsText (350)Comments from receipt activityDuring the receiving process, the user can enter comments
ProcessedIntFor ERP to mark receipt as processed

For ERP to mark receipt as processed 

1 = processed by ERP

0 = not processed by ERP

ProcessedDateTimeDatetimeTimestamp of receipt being processedTimestamp of receipt being processed

Sample

The following is a sample response with a single receipt transaction.  Multiple receipt transactions will be returned in an array.

[
  {
    "business_UNIT": "IT",
    "po_ID": "130054AA32",
    "po_LINE_NBR": 1,
    "recv_ID": "SC00000034",
    "manifestNumber": "130054AA32",
    "quantity_RECEIVED": 2,
    "po_TYPE": "GEN",
    "vendor_ItemId": "0201255",
    "item_Description": "100 Count Cable Ties",
    "intraUsername": "admin",
    "receivedDateTime": "2026-06-12T11:24:21.093",
    "unit_of_Measure": "EA",
    "price_PO": 20.00,
    "vendor_ID": "0000000002",
    "receiving_Comments": "",
    "processed": 0,
    "processedDateTime": "1900-01-01T00:00:00",
    "receipt_Source": "",
    "profileID": 1
  }
]

Was this article helpful?
0 out of 0 found this helpful