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 Documents and Invoices

Fieldpine allows you to update, process and store documents. Most commonly this is an invoice, but can also be a packing slip, ASN, email and so on.

documents.get_document

Retrive overview details for a document

TypeRead
HTTPGET, POST
Links

Example

POST /fd1/documents/get_document
{
  "a": "documents.get_document",
  "q": {
    "type": "invoice",
    "purchaseorder": "JSIWJTHGHWBNDJ848DF"
  }
}
Or
GET /fd1/documents/get_document?type=invoice&purchaseorder=JSIWJTHGHWBNDJ848DF

Available Fields

When the active concept is a document, the following fields can be requested

NameDescription
Direct Fields
These fields are considered direct attributes of a document
physkeyUnique document key. Like a UUID/GUID
type Lowercase keyword describing the broad document type.
invoice, packingslip, asn, email, creditnote, pricebook, orderconfirmation, other
contenttype String describing the actual content type.
pdf, xlsx, png, text, csv, eml, sms, jpeg
entrydtuDate/time (UTC) this document was stored.
sourceurlURL to retrieve original source (may have additional security controls)
Index and linking fields depending on document type
cidCustomer Id#
sidSale Id#
poidPurchaser Order id#
spidSupplier Id#
Following fields are valid depending on document type
totalTotal Price or value
refDocument reference. Invoice# if invoice, packing slip# if packing slip, and so on
Following fields are contain information that are applied after the document has been processed. They aren't directly present in the source document
process_amountpaidAmount paid (for an invoice)

documents.decode_file_to_json

Upload a file such as PDF, image, photo, Excel spreadsheet and receive a JSON response describing the file and its contents

Costs Apply. This API is charged per call

documents.decode_json_to_document

Take a JSON packet describing a document and convert it to a final useable document. Where call "document.decode_file_to_json" performs a physical analysis of the file, this call takes that raw descriptions and strings and decodes to a useable format.

Costs Apply. This API is charged per call

documents.save_document

Store a decoded document into the stores workqueues or long term storage. Typically an invoice might be received and uploaded to the workqueue - the store can then save a large amount of time and effort by using the values uploaded to the workqueue.