API Integration for Purchase Order Line Item Receiving (POLIR)

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
Set up PO receiving screen for use by end usersFacilityOS
Review data and confirm accuracyClient

 

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 data
    1. Add or update a PO Header
    2. Add or update a PO Line for an existing PO Header
  2. Get PO receipt data
    1. Request PO Receipts for a specified timeframe, optionally filtering out processed receipts
    2. Mark processed PO Receipts as processed
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 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 LOS 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
PO Revisionpo_RevisionIntegerNoReporting 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 configured to set the Recipient
Profile IDprofileIDIntegerYesThe FacilityOS profile ID.  Consult your FacilityOS implementation contact for the correct ProfileID value(s).

 

Add a PO Header

Endpoint: POST /api/v1/po/header

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'

 

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.

Curl

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

 

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 NameField NameData TypeRequiredDescription
PO IDpo_IdText (50) Yes

Composite Key (with Line_Number)

Used to track Purchase Orders entered into system

Line Numberline_NumberIntegerYes 

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
Requisition IDreq_IdText (50)NoReporting use
Schedule Line Numberschedule_Line_NumberIntegerNoReporting use
Distribution Line Numberdistribution_Line_NumberIntegerNoReporting use
Delivery Location IDdelivery_Location_IDText (50)NoReporting use and may match EmpID in Recipient table; if so, the PO Lookup automation may be configured to set the Recipient
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
Profile IDprofileIDIntegerYesThe FacilityOS profile ID.  Consult your FacilityOS implementation contact for the correct ProfileID value(s).

 

Add a PO Line

Endpoint: POST /api/v1/po/line

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",
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/line'

 

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.

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'

 

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

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)

PO_IDNoTextPurchase Order Number
returnUnprocessedNoInteger

1 = get receipts not marked as processed

0 = get receipts marked as processed; default

receiptSourceNoTextThe source of the receipt transaction
profileIDYesIntegerFacilityOS Profile ID.  Consult your FacilityOS implementation contact for the correct ProfileID value(s).
Curl
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-21T23:59:59.999Z",
    "po_ID": "PO-100254",
    "returnUnprocessed": 1,
    "receiptSource": "INTRA",
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/receipts'

Response 

Fields
Field NameType (Length)DescriptionPurpose/Notes
Business_UnitText (50)Business Unit 
PO_IDText (50)Purchase Order Number 
PO_Line_NumberIntegerLine Number 
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 Type 
Vendor_ItemIDText (50)Vendor Item ID 
Item_DescriptionText (255)Item Description 
IntraUsernameText (50)UsernameThe FacilityOS user who received the PO
ReceivedDateTimeDatetimeHDateTimestamp of receipt
Unit_of_MeasureText (50)EA, PK, CT, etc. 
Price_POCurrencyCost per Unit 
Vendor_IDText (50)Vendor ID 
Receiving_CommentsText (350)Comments from receipt activity 
ProcessedIntegerFor 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
Receipt_SourceTextThe source of the receipt transaction 
profileIDIntegerFacilityOS Profile IDFacilityOS 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_Number": 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",
    "receiving_Comments": "",
    "processed": 0,
    "processedDateTime": "1900-01-01T00:00:00",
    "receipt_Source": "",
    "profileID": 1
  }
]

 

Mark a Receipt as Processed

Endpoint: POST /api/v1/po/receiptMarkProcessed

Request

Fields
Friendly NameField NameData TypeRequiredDescription
Receipt IDreceiptIDString (50)Yes

Primary Key

Used to track receipt transactions

Mark as ProcessedmarkProcessedIntegerYes

1 = receipt has been marked as processed

0 = receipt has been not marked as processed

External Receipt Batch IDexternalReceiptBatchIDStringNoThe Receipt Batch ID from the ERP
Profile IDprofileIDIntegerYesFacilityOS 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,
    "externalReceiptBatchID": "ERP30217",
    "profileID": 1
  }' \
  '<base URL>/api/v1/po/receiptMarkProcessed'
Was this article helpful?
0 out of 0 found this helpful