FD1 Client Protocol
 
Library Developer Home FD1 Client Protocol Home Concepts Reading Data Writing Data Protocol Defined Servers Connect & Authenticate Proxies & Tunnels
Webhooks Programming Support Logging Minor Facts State Facts Response Format How To Guides eCommerce Sites Custom Point of Sale Customer Access Bulk Downloads Major APIs / Endpoints All Endpoints Products Sales SalesBuilder Session Sale Capture General Purpose Data Capture Devices Barcode Scanners Eftpos IoT Sensors Power Outlets Printing Scales Security Cameras Purchasing / Supply Side Purchase Orders Invoices Invoice Payments Document Capture Rare APIs / Endpoints SSL Certificates API Key Management Diagnositics Server to Client Messages Overview Resources / Objects Purchase Order Invoice Payable Invoice Payment Product Supplier Location Sale Lines Sale Delivery Details Sales Price Maps Employees Carriers Payments Product Kits Department 1 Customers

Purchase Order Resource

This resource describes a single purchase order.

"K". The field physkey is expected in the "k" (key) parameter for FD1 edit functions.

The primary key to identify a single purchase order is "physkey"

Links: Purchase Order Functions

Example Record

{
        "spid": 5,
        "entrydt": "2022-10-09T09:43:59.000",
        "firstarrivedate": "2023-11-05T19:30:34.000",
        "completeddt": "2023-11-05T19:30:37.000",
        "ship_to_location": 4,
        "order_location": 4,
        "suppliercomments": "This is a Drop Shipping Order.  Please ship directly to the customers address shown",
        "cust_ponum": "4HUK2",
        "postate": 3,
        "physkey": "KEPZVEPAODVKKAKVJL8XBCIAAAEQAAAB",
        "poid": 890,
        "rve": 20230123.043818828,
        "rvel": 20230123.043818828,
        "senddate": "2023-01-23T17:38:18.000"
      }

Available Fields

NameDescriptionDatatypeResource"q"
poidLocal internal purchase order#. This is an integer key (not zero) in the local database. This key value can change if you query different serversYes
teller
spidSupplier IdNumberSupplierYes
cust_ponumStringYes
completeddtDateTime
ship_to_locationNumberLocationYes
entrydtLocal date/time the purchase order was first createdYes
expecteddt
firstarrivedt
totalvalue_extaxExpected total value (ex tax) of the items on this purchase orderMoney/Currency
totalinctax
orderinglocLocation
commentsInternal only comments. These comments are not shown to the supplierString
flags
postate
suppliercomments
keyref
senddateDateTime
ridutc
physkey
opoid
supplierref
supplierackdt
linecnt
itemcnt
supplierviewdt
asndt
asndocukey
totalcost
displaydtDateTime
autosenddtDateTime
indisputedtMost recent date this PO raised an issue or dispute over an arrivalDateTime
approvedtopaydtMost recent date this PO changed the amount approved to payDateTime
lastemaildtuDate UTC this PO was last emailed to somebodyDateTime
lastemailackdtuDate UTC the last email sent was confirmed as "left the building"DateTime
rclString
postate The overall status of the purchase order. A purchase order can only be in a single state.
1Waiting for delivery
2PreAuth. Order is being prepared, but not yet authorised for sending to supplier
3Completed. This purchase order is done/historic.
4 Queued. The order has been approved to send to the supplier but is waiting for some event before being sent. Typical use sees orders created at EOM and sent automatically on the 1st.
17Rejected. The supplier specifically rejected this purchase order
18Cancelled. The purchase order has been cancelled
45Supplier Return Pickup
46Supplier Return Paperwork
47Supplier Return Completed
48Supplier Return Restock
32768Reserved Poid. This poid number has been reserved for later use. It is not a valid PO
32769Reserved Poid. This poid number has been reserved for later use. It is not a valid PO. This state is used when a reserved id is about to be used
Number Yes
purchaseorder.indispute.count The number of invoices / packing slips / etc that have disputes open. A dispute means something about the paperwork is being queried Number
purchaseorder.approvedtopay The total value (inc all taxes) that are approved to pay should an invoice be presented. This value can differ from total value received if disputes are present.
When backorders are used, this figure can change as backordered items arrive
Complications can arise where a purchase order is partially delivered and "whole invoice" discounts are applied
Money
ship_to_location.??? Details about the location this order is shipped too. You may request any of the location fields. Common values for "???" are
  • name - Store name as entered by retailer
  • phone - Store phone number
Resource Location
supplier.??? Details about the supplier this order was issued too. You may request any of the supplier fields. Common values for "???" are
  • name - Supplier name as entered by retailer. This may not be the legal name
  • phone - Suppliers phone number
  • gst - Suppliers GST#
  • abn - Suppliers ABN
poline._count The number of lines on the purchase order. This generally indicates number of different products, although it is valid to repeat the same product on multiple lines
poline._sum(qty_ord) The number of lines on the purchase order. This generally indicates number of different products, although it is valid to repeat the same product on multiple lines
invoice_payments._count The number of payment records present that refer to this purchase order
invoice_payments._sum(amount) The total of all payment records that refer to this purchase order. At some sites, a single payment record may be for several purchase orders, and this figure is the overall total, not the amount allocated to this specifci purchase order