API Integration for Purchase Order Line Item Receiving (POLIR)

Implementation Steps

Task Responsible Party
Provide API endpoint access details and credentials FacilityOS
Set up automated job to send PO Header and PO Line Data, and to pull PO Receipt data Client
Set up PO receiving screen for use by end users FacilityOS
Review data and confirm accuracy Client

 

Data Flow

Note: PO and Receipt data is specific to a LogisticsOS profile.  If multiple profiles will use PO line item receiving, PO data must be sent to and Receipt data must be pulled from multiple profiles.  Consult your FacilityOS implementation contact for the correct ProfileID value(s).

  1. Add or update PO Header
    1. Attempt to add PO Header via POST /api/v1/po/header
    2. If response is PO Header exists, send update via PATCH /api/v1/po/header
  2. Add or update PO Line
    1. Attempt to add PO Line via POST /api/v1/po/line
    2. If response is PO Line exists, send update via PATCH /api/v1/po/line
  3. Get PO receipt data
    1. Request PO Receipts for a specified timeframe, optionally filtering out processed receipts, via GET /api/v1/po/receipts
    2. Mark processed PO Receipts as processed via POST /api/v1/po/receiptMarkProcessed
Untitled Diagram.drawio.png

 

API

Authentication: OAuth

Format: JSON

 

PO Header

For each PO, create or update the header details in FacilityOS to ensure the latest PO information is available.  For updates, it is recommended to only send updates for records that have recently changed. 

 

Fields

Friendly Name Field Name Data Type Required Description
PO ID PO_ID Text (50) Yes

Primary Key

Used to track Purchase Orders entered into system

PO Type PO_Type Text (20) No Reporting use and may be displayed in the LOS UI
Business Unit Business_Unit Text (50) Yes Reporting use and may be displayed in the LOS UI
Receive Status RECV_STATUS Text (1) No 

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

Reporting use and may be displayed in the LOS UI

Vendor ID VENDOR_ID Text (50) No Reporting use and may be displayed in the LOS UI
Vendor Name Vendor_Name Text (50) No Reporting use and may be displayed in the LOS UI
Vendor Set ID VENDOR_SETID Text (20) No Reporting use and may be displayed in the LOS UI
Entered DateTime ENTERED_DT DateTime No Reporting use and may be displayed in the LOS UI
PO Revision PO_REVISION Integer No Reporting use and may be displayed in the LOS UI
Total Order Amount Total_Order_Amt Currency No Reporting use and may be displayed in the LOS UI
Default Cost Center Default_Cost_Center Text (50) No Reporting use and may be displayed in the LOS UI
Default Deliver To Default_Deliver_To Text (50) No Reporting use and may match EmpID in Recipient table; if so, the PO Lookup automation may configured to set the Recipient
Profile ID profileID Integer Yes The FacilityOS profile ID.  Consult your FacilityOS implementation contact for the correct ProfileID value(s).

 

Add a PO Header

Endpoint: POST /api/v1/po/header

For additional endpoint details, including status codes, see full specification.  Note: This reference is not your base URL and the endpoints are disconnected from a live LogisticsOS system.

Curl

curl -X POST \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>' \
  -d '{
    "Business_Unit": "IT",
    "PO_ID": "PO-100254",
    "PO_Type": "STANDARD",
    "RECV_STATUS": "N",
    "VENDOR_ID": "VEND-1001",
    "Vendor_Name": "Acme Office Supplies",
    "VENDOR_SETID": "SET001",
    "ENTERED_DT": "2026-10-21T17:25:13.528Z",
    "PO_REVISION": 1,
    "Total_Order_Amt": 2450.75,
    "Default_Cost_Center": "CC-100",
    "Default_Deliver_To": "Building A - Receiving",
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/header'

Success Response

201

Already Exists Response

409

 

Update a PO Header

Endpoint: PATCH /api/v1/po/header

In the following example, the record's Default_Deliver_to is being updated to a new value and the Vendor_SetID value is being cleared.  All other fields will retain their existing values. 

When updating records, PO_ID and profileID are the only required fields.

For additional endpoint details, including nullable fields and status codes, see full specification.  Note: This reference is not your base URL and the endpoints are disconnected from a live LogisticsOS system.

Curl

curl -X PATCH \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>' \
  -d '{
    "PO_ID": "PO-100254",
    "VENDOR_SETID": null,
    "Default_Deliver_To": "Building B - Dock",
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/header'

Success Response

200

Does Not Exist Response

404

 

PO Lines

For each PO line, create or update the line details in FacilityOS to ensure the latest PO line information is available.  For updates, it is recommended to only send updates for records that have recently changed. 

Fields

Friendly Name Field Name Data Type Required Description
PO ID PO_ID Text (50)  Yes

Composite Key (with Line_Number)

Used to track Purchase Orders entered into system

Line Number Line_Number Integer Yes 

Composite Key (with PO_ID)

The line in the PO

Line numbers should start with 1 and be sequential

Business Unit Business_Unit Text (50) Yes Reporting use and may be displayed in the Line Item UI
Entered DateTime Entered_DT Datetime No Reporting use
Quantity Quantity_PO Numeric (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

Price Price_PO Currency No Reporting use and may be displayed in the Line Item UI
Unit of Measure Unit_Of_Measure Text (50) No Reporting use and may be displayed in the Line Item UI
Vendor Item ID Vendor_ItemId Text (50) No Reporting use and may be displayed in the Line Item UI
Item Description Item_Description Text (255) Yes Reporting use and may be displayed in the Line Item UI
Location ID Location_ID Text (50) No 

Reporting use

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

Financial Asset SW Financial_Asset_SW Text (1) No Reporting use
Requisition ID REQ_ID Text (50) No Reporting use
Schedule Line Number Schedule_Line_Number Integer No Reporting use
Distribution Line Number Distribution_Line_Number Integer No Reporting use
Delivery Location ID Delivery_Location_ID Text (50) No Reporting use and may match EmpID in Recipient table; if so, the PO Lookup automation may be configured to set the Recipient
Delivery Comment Delivery_Comment Text (50) No Reporting use and may be displayed in the Line Item UI
Buyer Name Buyer_Name Text (50) No Reporting use and may be displayed in the Line Item UI
Default Cost Center Default_Cost_Center Text (50) No Reporting use and may be displayed in the Line Item UI
Item Type ItemType Text(50) No Reporting use
PO Line Status PO_Line_Status Text(50) No Reporting use
Profile ID profileID Integer Yes The FacilityOS profile ID.  Consult your FacilityOS implementation contact for the correct ProfileID value(s).

 

Add a PO Line

Endpoint: POST /api/v1/po/line

For additional endpoint details, including status codes, see full specification.  Note: This reference is not your base URL and the endpoints are disconnected from a live LogisticsOS system.

Curl

curl -X POST \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>' \
  -d '{
    "Business_Unit": "IT",
    "PO_ID": "PO-100254",
    "Line_Number": 1,
    "Entered_DT": "2026-10-21T18:41:53.956Z",
    "Quantity_PO": 100,
    "Price_PO": 24.50,
    "Unit_Of_Measure": "EA",
    "Vendor_ItemId": "ITEM-1001",
    "Item_Description": "USB-C Charging Cable",
    "Location_ID": "LOC-001",
    "Financial_Asset_SW": "N",
    "REQ_ID": "REQ-10025",
    "Schedule_Line_Number": 1,
    "Distribution_Line_Number": 1,
    "Delivery_Location_ID": "BLDG-A",
    "Delivery_Comment": "Deliver to IT receiving department",
    "Buyer_Name": "John Smith",
    "Default_Cost_Center": "CC-100",
    "ItemType": "IT",
    "PO_LineStatus": "1",   
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/line'

Success Response

201

Already Exists Response

409

 

Update a PO Line

Endpoint: PATCH /api/v1/po/line

In the following example, the record's item_Description is being updated to a new value and the delivery_Comment value is being cleared.  All other fields will retain their existing values. 

When updating records, PO_ID, line_Number, and profileID are the only required fields.

For additional endpoint details, including nullable fields and status codes, see full specification.  Note: This reference is not your base URL and the endpoints are disconnected from a live LogisticsOS system.

Curl

curl -X PATCH \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>' \
  -d '{
    "PO_ID": "PO-100254",
    "line_Number": 1,
    "Item_Description": "USB-C Charging Cable v2",
    "Delivery_Comment": null,
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/line'

Success Response

200

Does Not Exist Response

404

 

PO Receipts

At predefined intervals, query the FacilityOS API to retrieve recent PO receipts by specifying the start and end dates of the desired timeframe.  Optionally (recommended), filter out receipts already marked as processed. 

 

Get PO Receipts

Endpoint: GET /api/v1/po/receipts

For additional endpoint details, including status codes, see full specification.  Note: This reference is not your base URL and the endpoints are disconnected from a live LogisticsOS system.

Request

Fields
Field Name Required Type Descriptions/Notes
BeginDate Yes DateTime

The start of the timeframe of receipts to pull

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

EndDate Yes DateTime

The end of the timeframe of receipts to pull

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

PO_ID No Text Purchase Order Number
ReturnUnprocessed No Integer

1 = get receipts not marked as processed

0 = get receipts marked as processed; default

ReceiptSource No Text The source of the receipt transaction
profileID Yes Integer FacilityOS Profile ID.  Consult your FacilityOS implementation contact for the correct ProfileID value(s).
Curl

In the following example, unprocessed PO Receipts are being requested for a 1-hour time window.

curl -X GET \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>' \
  -d '{
    "BeginDate": "2026-10-01T00:00:00.000Z",
    "EndDate": "2026-10-01T01:00:00.000Z",
    "ReturnUnprocessed": 1,
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/receipts'

Response 

Fields
Field Name Type (Length) Description Purpose/Notes
Business_UNIT Text (50) Business Unit  
PO_ID Text (50) Purchase Order Number  
PO_LINE_NBR Integer Line Number  
RECV_ID String Receipt ID

System-assigned unique ID for the PO and Line Number receipt transaction

Use this value to mark a receipt as processed

ManifestNumber Text (50) Manifest ID FacilityOS’s manifest/transaction ID
QUANTITY_RECEIVED Numeric (11.4) Quantity Received Quantity received in manifest/transaction
PO_TYPE Text (20) PO Type  
Vendor_ItemID Text (50) Vendor Item ID  
Item_Description Text (255) Item Description  
IntraUsername Text (50) Username The FacilityOS user who received the PO
ReceivedDateTime Datetime HDate Timestamp of receipt
Unit_of_Measure Text (50) EA, PK, CT, etc.  
Price_PO Currency Cost per Unit  
Vendor_ID Text (50) Vendor ID  
Processed Integer For ERP to mark receipt as processed

For ERP to mark receipt as processed 

1 = processed by ERP

0 = not processed by ERP

ProcessedDateTime Datetime Timestamp of receipt being processed Timestamp of receipt being processed
Receipt_Source Text The source of the receipt transaction  
ItemType Text The Item Type of the PO Line  
PO_Line_Status Text The status of the PO Line  
AssetHistoryLinked Integer Whether an AssetHistory record is linked to the PO Receipt

1 = yes

2 = no

AssetHistoryId Text The AssetHistory table ID

Can be used as a logging referece

Returns the top 1 AssetHistory table ID associated with the PO receipt

This field is only intended to be used when the end user PO processing screen enforces a 1:1 relationship between assets/packages and PO receipts.  Consult your FacilityOS implementation resource before using this field.

AssetId Text The AssetID or Tracking Number

Returns the top 1 Asset ID/Tracking Number associated with the PO receipt

This field is only intended to be used when the end user PO processing screen enforces a 1:1 relationship between assets/packages and PO receipts.  Consult your FacilityOS implementation resource before using this field.

profileID Integer FacilityOS Profile ID FacilityOS Profile ID
Sample

The following is a sample response with a single receipt transaction.  Depending on the dataset, multiple receipt transactions (objects) may be returned in the array.

[
  {
    "Business_UNIT": "IT",
    "PO_ID": "PO-100254",
    "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-10-12T11:24:21.093",
    "Unit_of_Measure": "EA",
    "Price_PO": 20.00,
    "Vendor_ID": "0000000002",
    "Processed": 0,
    "ProcessedDateTime": "1900-01-01T00:00:00",
    "Receipt_Source": "",
    "ItemType": null,
    "PO_Line_Status": null,
    "AssetHistoryLinked": 1,
    "AssetHistoryId": 154,
    "AssetId": "LOS3002146",
    "profileID": 1
  }
]

 

Mark a Receipt as Processed

Endpoint: POST /api/v1/po/receiptMarkProcessed

For additional endpoint details, including status codes, see full specification.  Note: This reference is not your base URL and the endpoints are disconnected from a live LogisticsOS system.

Fields

Friendly Name Field Name Data Type Required Description
Receipt ID receiptID String (50) Yes

Primary Key

Used to track receipt transactions

Mark as Processed markProcessed Integer Yes

1 = receipt has been marked as processed

0 = receipt has been not marked as processed

Profile ID profileID Integer Yes FacilityOS Profile ID.  Consult your FacilityOS implementation contact for the correct ProfileID value(s).

Curl

curl -X POST \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <token>' \
  -d '{
    "receiptID": "SC00000034",
    "markProcessed": 1,
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/receiptMarkProcessed'

Success Response

200

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