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

FD1 Webhooks

Fieldpine provides webhooks for a number of events. When an event is fired, a message is sent to your endpoint containing some level of detail

You can also subscribe to a "firehose" which is delivered over websockets and used for high volume data extraction. Firehoses are able to register for some additional events that are not practical over webhooks due to potential volume. Firehoses do not buffer or retry as much as webhooks; they store a limited number of messages to handle network failure and callers are responsible for restart logic.

  • Webhook Static registered URL Fieldpine sends to when events happen
  • Firehose Receives objects over a websocket as events happen
  • Doorbell A doorbell URL is one that can be pinged, but does not explicitly require authorisation or Api Keys. Typically an external server 'rings a dorrbell' to say 'I have something for you', without passing any information of a sensitive nature. Doorbells do not respond with any data, and in fact can simply return 404 errors if they wish.

    For example, Fieldpine servers may ring a retailers doorbell when new data arrives. Fieldpine can call the retailer, but does not require any centralised Api Keys. Typically the receiver of a doorbell will schedule a poll operation.

Registering a Webhook

Registering a Firehose

A firehose instructs the server to send all events or changes to you.

Send a packet as shown over your websocket

{
    "a": "fd1.firehose.open_firehose",
    "rq": ....
    "v": {
        "event": ....,
        "scope": ...
        "from": ...
        "until": ...
        "payload": ...
        "filter": ...
    }
}

Payload Generic Format

{
    "rp": ....      // Original "rq" that requested the webhook or firehose event
    "r": "",
    "v": {
        // Event specific data
    }
}

Event Names