FD1 Client Protocol
 
Library Developer Home FD1 Client Protocol Home Concepts Reading Data Writing Data Protocol Defined Servers Connect & Authenticate Proxies & Tunnels
Webhooks & Firehoses 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 Get Attribute 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 PosGreen 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

FD1 Read Concepts

A read request is implmented by sending a JSON packet. As FD1 is primarily designed for websockets, the HTTP verbs are not used as there is no HTTP verb inside websockets. If you are using HTTP mode, you can read using GET or POST verbs - POST is used when large request data is required, or you are sending sensitive data and wish to reduce the chance of it being logged somewhere. (OWASP ref)

Reading non-existent data

If you request specific data that does not exist, the endpoint will respond with an empty result set.

Example, requesting with an unknown email
{
  a: "fd1.customers.get_customers",
  q: {
    email: "spongebob@bikini.bottom"
  }
}
Response
{
  r: "fd1.customers.get_customers",
  data: {
    rows:[]
  }
}