Fieldpine Logo Documentation Home  

Point Of Sale Web API


Each POS terminal includes a built in mini web server for maintainance purposes and there are APIs available over this interface which allow you to create web applications that interact with the dynamic state. The Web API is exclusively for interacting with selling counters and the selling process, if you are wanting to interact with the system generally, see eLink Documentation

The Web API also has an older legacy support mode, which uses a slightly different structure and is documented here

Use Web API for:

Do not use for:

URL and Security

This page assumes that the POS is running on the local machine on port 8095. All examples use http://127.0.0.1:8095 as the server address. This may not always be the correct port. If you are browsing from a different machine you will need to know that POS lanes IP address - which may be problematic as many POS lanes are using DHCP addressing

Responses will be XML by default, but you can request JSON format response by inserting a reply type in your request.

http://127.0.0.1:8095/gnap/buck?3=fieldpinepos.activestate&10=activesale
Request current sale details with response in XML

http://127.0.0.1:8095/gnap/j/buck?3=fieldpinepos.activestate&10=activesale
Request current sale details with response in JSON

Retrieving Current Sale Details

Example Output (XML)
<ARAY>
 <DATS>
  <f108>0</f108> 
  <f115>0</f115> 
  <f117>0</f117> 
  <f120>4565.000000</f120> 
  <f122>521</f122> 
  <f123>16777262</f123> 
  <f125>2</f125> 
  <f600>HTTP://MEETU4.COM/$M0...</f600> 
  <f601>0</f601> 
  <LINE>
   <f200>11</f200> 
   <f201>0</f201> 
   <f202>1</f202> 
   <f203>0</f203> 
   <f205>4565.000000</f205> 
   <f206>1</f206> 
   <f213>1</f213> 
   <f2000>Pacific Grove Suite (5)</f2000> 
  </LINE>
 </DATS>
</ARAY>
http://127.0.0.1:8095/gnap/buck?3=fieldpinepos.activestate&10=activesale

Retrieves information about the current foreground sale the operator is working with.

The number and range of fields that can be returned is large.

Sales Header /docs/elink/dt_sale.htm
May Contain:

Technical note: Sale Objects may repeat information in multiple fields. Internally sales are represented using nested structures but these can be complex to work with, requiring loops and additional code. Therefore many common fields are repeated at higher levels to make other applications easier and less error prone to create.

Major Fields

f120 - Total Sale Value
The total value of the sale including taxes, where applicable
f123 - Local Sale #
Working Sale# for this sale. This number uniquely identifies the sale on this machine, it may use a different number on servers. This value is sometimes called the "original sid"
f600 - Online Receipt
If electronic receipts are enabled, this field contains the URL of the electronic receipt that will be generated. This field is most of use to customer displays that may like to display a QR code for the customer
f601 - Print Receipt
Indicates if POS is intending to print a receipt for this sale or not. 0=no receipt, 1=yes. Customer displays can affect receipt printing by sending PosCommands to alter this value

Retrieving Current System State

Example Output (XML)
<ARAY>
 <DATS>
  <f200>644</f200> 
  <f201>662</f201> 
  <f202>662</f202> 
  <f203>2014|7|12|14|19|52||</f203> 
  <f230>0</f230> 
  <f231>send(42,kp)</f231> 
  <f240>0</f240> 
  <f241>2.10-5.1811 (2000a:50713)</f241> 
  <f242>521</f242> 
  <f243>2</f243> 
  <f244>2</f244> 
  <f245>64</f245> 
  <f246>1</f246> 
  <f247 /> 
  <f248 /> 
  <f400>0</f400> 
  <f401 /> 
  <f500>246</f500> 
  <f501>MAIN</f501> 
  <f502 /> 
  <APPD>
   <f120>Wrong password</f120> 
   <f121>2014|7|12|13|42|43||</f121> 
  </APPD>
 </DATS>
</ARAY>
http://127.0.0.1:8095/gnap/buck?3=fieldpinepos.activestate&10=activestatus

Retrieves information about the current internal state of the Point Of Sale engine

The fields returned are:
f200 - Idle Time
Number of seconds since human interaction with the application was detected.
f201 - Mouse Click
Seconds since last mouse click or touch screen interaction
f202 - Run Time
Total seconds since POS started
f203 - System Time
Current system time being reported by Windows
f230
Not documented
f231 - Last PosCommand
Last PosCommand executed. This may be obscured if it potentially includes passwords. PosCommands can be executed very quickly so this field will not be able to capture all commands executed, it is just a snapshot
f240 - Database Size
Database size, or 0 if cannot be reported at this time
f241 - Version
Version of fpos.dll in use
f242 - UniqueId
Current Unique Id of the lane
f243 - Location
f244 - Lane#
f245 - Country
f246 - TypeB
f247 - Last Disk Arrival
If USB devices are detected this contains the drive letter assigned to the last disk that was plugged in
f248 - Last Disk Arrival Time
Time that f247 was detected
f300 - DPS Last Event
f400 - Active Teller Id
f401 - Active Teller Name
f500 - UI Instance
f501 - Screen name
Name of the UI screen currently in the foreground
f502 - Variant Name
f600 - SiteVersion
Value of setting SiteVersion, which is reserved for site specific control and purpose
f601 - UIVersion
Value of setting UIVersion
f602 - Current Application
Name of current application active on Lane. This will be "(self)" if the POS is currently active, or another name if the user is currently working with a different application. This value can change from self under normal circumstances and not all platforms are capable of returning this information.

APPD child packets may be included as an array of 0...N elements.
APPD f120 - Message Text
APPD f121 - Message Time
If messages have been displayed to the teller this fields contain the message displayed and the time it was displayed


Legacy Interfaces

The following interfaces are present and can be used but are no longer being actively enhanced.

Product.xml

A request to the url http://127.0.0.1:8095/webx/product.xml?pid=NNN will return the current database information for pid NNN. This information can only be returned in XML format. This url is unlikely to be added to other Fieldpine trading applications.

Example
http://127.0.0.1:8095/webx/product.xml?pid=644

<product>
  <pid>644<pid> 
  <description>Airfare<description> 
  <unitprice>19.99<unitprice> 
  ...
</product>



Data Model 1

The data model 1 interfaces allows you to retrieve the current value of any data model value. You can only retrieve set versions of data models are not permitted. To request a Data Model value, create a URL with the following structure

http://127.0.0.1:8095/fdldm1/data-model

To be clear, the url path contains ( Fox-trot, Delta, Lima, Delta, Motel, One )

The fdldm1 interface contains a simplified HTTP return packet and may not be easily useable from all browsers.

Examples
Current Price of product 644
http://127.0.0.1:8095/fdldm1/product.644.unitprice

19.99


Sale id of active, on screen sale
http://127.0.0.1:8095/fdldm1/activesale.sid

8451665

Value of current active sale
http://127.0.0.1:8095/fdldm1/activesale.total.value

37.89


Name of customer, if a customer is connected to the sale
http://127.0.0.1:8095/fdldm1/activesale.customer.name

Ella K


Name of UI screen currently active. Only base UI level screens are returned not built in screens.
http://127.0.0.1:8095/fdldm1/activescreen.basename

main


List of tables present in the database
http://127.0.0.1:8095/fdldm1/database.tablelist

accounts,barcodes,customers,products,sales ....

Management Interface

The management interface is provided for management and support purposes only. Its operation is not guaranteed. The following URLs can be useful from a support perspective.

Use of the following URLs may not be legal in all environments. Obtain independent advice if uncertain. These URLs are not enabled by default and require additional (freely available) dlls to be installed. We do not ship these dlls by default.

http://127.0.0.1:8095/fdlmgmt/fdlmgmt_camera_0.jpg
Returns the latest photo captured by the camera

http://127.0.0.1:8095/fdlmgmt/ss_0.jpg
Takes a screenshot and returns a jpg image. The final digit (0 is shown above) controls the size and scale of the returned image. Values 0,1,2 and 3 are currently enabled (P1901)