Library
Webhooks & Firehoses
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
| Type | Read |
| HTTP | GET, 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
| Name | Description |
|
Direct Fields
These fields are considered direct attributes of a document |
|
| physkey | Unique 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 |
| entrydtu | Date/time (UTC) this document was stored. |
| sourceurl | URL to retrieve original source (may have additional security controls) |
| Index and linking fields depending on document type | |
| cid | Customer Id# |
| sid | Sale Id# |
| poid | Purchaser Order id# |
| spid | Supplier Id# |
| Following fields are valid depending on document type | |
| total | Total Price or value |
| ref | Document 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_amountpaid | Amount 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.