Get Document
This API is for the customers to get the documents for their load number/stop. It should provide Base64 image string for document. The validity of image should be applicable for 1 year. If any customer is licensed for Document storage, additional years validity should be provided by API to that customer.
curl --request GET 'https://api.fourkites.com/document-data' \
--header 'Content-Type: application/json' \
--header 'apikey: REPLACE_KEY_VALUE'
import http.client
import json
conn = http.client.HTTPSConnection("api-staging.fourkites.com")
payload = ''
headers = {
'Content-Type': 'application/json',
'apikey': 'REPLACE_KEY_VALUE'
}
conn.request("GET", "/document-data", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Attributes
Name | Param Type | Format | Required | Example | Description |
|---|---|---|---|---|---|
load_identifier | Query | String | Yes | loadNumber, proNumber, trackingNumber or loadReferenceNumber | Returns results associated with the given load identifier. |
load_value | Query | String | Yes | NA | Returns results associated with the given load value. |
stop_identifier | Query | String | No | stopReferenceId, stopSequence, locationId or stopId (Defaults to last delivery stop if not provided) | Returns results associated with the given stop identifier. |
stop_value | Query | String | No | Defaults to last delivery stop if not provided | Returns results associated with the given stop value. |
all_stops | Query | Boolean | No | true or false (defaults to false) | When true , returns documents of the given document_type from all stops on the load (any stop_identifier/stop_value are ignored). When false or omitted, only the last delivery stop is searched. Use it to fetch a document attached to a non-delivery stop (e.g. a POD on the pickup stop). If matches exceeds the server limit (50), the request is rejected with 413 (see Sample 413 ) - request one stop at a time using stop_identifier/stop_value instead. |
document_type | Query | String | Yes | BLD (Bill of Lading-Driver), PSD (Packing Slip-Driver), BL (Bill of Lading), PS (Packing Slip), CD (Customs Document), DR (Delivery Receipt/Proof of Delivery), IV (Invoice), WC (Weight & Inspection Certificates), WI (Weight & Inspection), WP (Weight & Research Picture), FB (Freight Bill), PO (Purchase order), OD (Overages, Shortages and Damages), FA (Fuel Advance) or LR (Lumper Receipt) | Returns results associated with the given document type. |
Response Attributes
Shipment
Name | Format | Default | Example |
|---|---|---|---|
base64_content | String - The base 64 encoded file content | NA | AbFF7RgAAAA= |
type | String - The file extension. The following are the standardized file types: JPG, PNG, PDF, JPEG,TIFF, DOC, DOCX, XLS, XLSX | NA | jpeg, pdf |
name | String - The file name | NA | doc.pdf |
