Confidence Scores & Coordinates
You may receive the Confidence Scores and Coordinates, for each field, in your JSON response. To do so, ensure that your URL includes the corresponding confidence and coordinates key-value pairs. The proper request URL is shown below.
### FEATURE UPDATE - Confidence Scores and Coordinates
# To retrieve confidence score and coordinates, use the following request/URL
response = requests.post('https://api.photoncommerce.com/api/v4?confidence=1&coordinates=1', headers=headers, files=files)
Here is an example response containing confidence scores and coordinates. Confidence scores are returned as integers and coordinates are returned as a list. For coordinates returned as [a, b, c, d, e], 'a' represents the page number (starts from 0) and the rest of them represent the bounding box coordinates.
{
'data': {
'Invoice_Number': 'INV-234',
'PO_Number': '',
'Date': '2021-02-03',
'Created': '2021-09-22 09:40:03',
'Order_Date': '',
'Payment_Terms': '',
'Due_Date': '2021-02-10',
'Currency_Code': 'USD',
'Vat_Number': '7010559296',
'Pages': 1,
'Is_Duplicate': 0,
'Notes': '"odwrotne obciążenie',
'Category': 'Legal & Professional Services',
'Document_Type': 'Invoice',
'Total': 22001.38,
'Shipping': 0.0,
'Subtotal': 22001.38,
'Tax': 0.0,
'Tip': 0.0,
'Cashback': 0.0,
'Discount': 0.0,
'Balance_Due': 22001.38,
'Service_Start_Date': '',
'Service_End_Date': '',
'Tracking_Number': '',
'Tax_Lines': [],
'Line_Items': [
{'Line': 1, 'SKU': '', 'Date': '', 'Order': 0, 'Reference': '', 'Description': 'TuneGO 2.0] React.JS frontend development\nN/A\nservices', 'QTY': 160.0, 'Unit': 'hrs', 'Tax': 0.0, 'Tax_Rate': 0.0, 'Type': 'service', 'Price': 42.5, 'Discount': 0.0, 'Amount': 6800.0},
{'Line': 2, 'SKU': '', 'Date': '', 'Order': 1, 'Reference': '', 'Description': 'TuneGO 2.0] React Native mobile development\nN/A\nservices', 'QTY': 146.25, 'Unit': 'hrs', 'Tax': 0.0, 'Tax_Rate': 0.0, 'Type': 'service', 'Price': 42.5, 'Discount': 0.0, 'Amount': 6215.63},
{'Line': 3, 'SKU': '', 'Date': '', 'Order': 2, 'Reference': '', 'Description': 'TuneGO 2.0] Node.JS back-end development\nN/A', 'QTY': 205.5, 'Unit': 'hrs', 'Tax': 0.0, 'Tax_Rate': 0.0, 'Type': 'service', 'Price': 42.5, 'Discount': 0.0, 'Amount': 8733.75}
],
'Account_Number': '',
'Bill_To_Name': 'Mobile Reality Sp. z o.o',
'Bill_To_Recipient': '',
'Bill_To_Address': '03-901 Warszawa, Poland',
'Bill_To_Address_Line': '03-901 Warszawa, Poland',
'Bill_To_City': '',
'Bill_To_State': '',
'Bill_To_Zipcode': '',
'Bill_To_Vat_Number': '',
'Bill_To_Email': '',
'Card_Number': '',
'Payment_Display_Name': '',
'Payment_Type': '',
'Vendor_Name': 'TUNEGO, INC.',
'Vendor_Raw_Name': 'Mobile Reality',
'Vendor_Recipient': '',
'Vendor_Email': '',
'Vendor_Address': '',
'Vendor_Address_Line': '',
'Vendor_City': '',
'Vendor_State': '',
'Vendor_Zipcode': '',
'Vendor_Country': 'United States',
'Vendor_Type': 'General Contractor',
'Vendor_Phone': '',
'Vendor_Fax': '',
'Vendor_Website': '',
'Vendor_ABN_Number': '',
'Vendor_Bank_Name': '',
'Vendor_Bank_Number': '',
'Vendor_Bank_Swift': 'CMFGUS33',
'Vendor_IBAN': '',
'Vendor_Account_Number': '9600000000220961',
'Remit_To_Name': 'TUNEGO, INC.',
'Remit_To_Address': '',
'Phone_Number': '',
'All_Email_Addresses': 'biuro@mobilereality.pl',
'Ship_To_Name': 'TUNEGO, INC',
'Ship_To_Address': '32505 Anthem Village Drive, Suite E283\nHenderson, NV 89052',
'Ship_Date': '',
'Delivery_Date': '',
'Carrier': '',
'Raw_Text': 'Invoice No. 2/02/2021\nIssue date: Warszawa, 2021-02-03\nData wykonania usługi: 2021-02-03\n\tMobile Reality\nDue date: 2021-02-10\nPayment type: Transfer\n\nSeller\t\t\t\t\t\t\tBuyer\nMOBILE REALITY sp. z o. o.\t\t\t\t\tTUNEGO, INC.\nAl. Ks. J. Poniatowskiego 1/K4\t\t\t\t32505 Anthem Village Drive, Suite E283\n03-901 Warszawa, Poland\t\t\t\t\tHenderson, NV 89052\nVAT ID 7010559296\t\t\t\t\tUnited States\nbiuro@mobilereality.pl\t\t\t\t\tFile Number: 6094078\nAccount\'s owner : Mobile Reality Sp. z o.o.\nTransferWise\n19 W 24th Street\nNew York 10010 United States\nWire/ACH: 084009519\nAccount number: 9600000000220961\nSWIFT : CMFGUS33\n\nNo. Item\t\t\t\t\t\tQty\tUnit net\tTotal net VAT % VAT amount Total gross\n\tprice\n1\t[TuneGO 2.0] React.JS frontend development\t160 hrs\t42.50\t6,800.00\tN/A\t0.00\t6,800.00\nservices\n2\t[TuneGO 2.0] React Native mobile development\t146.25 hrs\t42.50\t6,215.63\tN/A\t0.00\t6,215.63\nservices\n3 [TuneGO 2.0] Node.JS back-end development\t205.5 hrs\t42.50\t8,733.75\tN/A\t0.00\t8,733.75\n4 [TuneGO 2.0] UX/UI/graphics design support\t9 hrs\t28.00\t252.00\tN/A\t0.00\t252.00\n\tTax rate\t22,001.38\tN/A\t0.00\t22,001.38\n\tTotal\t22,001.38\t\t0.00\t22,001.38\n\tTotal net price\tUSD 22,001.38\n\tVAT amount\tUSD 0.00\n\tTotal gross price\tUSD 22,001.38\n\nNotes:\t\t"odwrotne obciążenie"\nTuneGO 2.0: development period 18.01-29.01.2021\n\nTotal due\tUSD 22,001.38\nIn words: twenty two thousand and one USD thirty eight cents\n\n\tSeller\'s signature\n\tMateusz Sadowski\n\nPage 1 of 1\t\t\t\t\t\t\t\t\t\t\t\t\tgenerated in Fakturownia.pl',
'Reference_Number': '',
'photon_key': 'data/BYPASS/2021-09-22/02-39-51_02022021__TuneGO_20.json',
'Invoice_Number_confidence': 71,
'Invoice_Number_coordinates': [0, 0.1373291015625, 0.04852294921875, 0.1910400390625, 0.057342529296875],
'PO_Number_confidence': 86,
'PO_Number_coordinates': [],
'Date_confidence': 58,
'Date_coordinates': [0, 0.2017822265625, 0.0740966796875, 0.265380859375, 0.08355712890625],
'Created_confidence': 86,
'Created_coordinates': [],
'Order_Date_confidence': 87,
'Order_Date_coordinates': [],
'Payment_Terms_confidence': 86,
'Payment_Terms_coordinates': [],
'Due_Date_confidence': 76,
'Due_Date_coordinates': [0, 0.1285400390625, 0.104736328125, 0.1922607421875, 0.113525390625],
'Currency_Code_confidence': 87,
'Currency_Code_coordinates': [],
'Vat_Number_confidence': 60,
'Vat_Number_coordinates': [0, 0.1107177734375, 0.2247314453125, 0.18017578125, 0.2332763671875],
'Pages_confidence': 89,
'Pages_coordinates': [],
'Is_Duplicate_confidence': 85,
'Is_Duplicate_coordinates': [],
'Notes_confidence': 77,
'Notes_coordinates': [],
'Category_confidence': 76,
'Category_coordinates': [],
'Document_Type_confidence': 72,
'Document_Type_coordinates': [],
'Total_confidence': 82,
'Total_coordinates': [0, 0.8720703125, 0.587890625, 0.92724609375, 0.59814453125],
'Shipping_confidence': 87,
'Shipping_coordinates': [],
'Subtotal_confidence': 35,
'Subtotal_coordinates': [0, 0.6259765625, 0.498291015625, 0.681640625, 0.50830078125],
'Tax_confidence': 58,
'Tax_coordinates': [0, 0.90380859375, 0.568359375, 0.92724609375, 0.5771484375],
'Tip_confidence': 75,
'Tip_coordinates': [],
'Cashback_confidence': 76,
'Cashback_coordinates': [],
'Discount_confidence': 77,
'Discount_coordinates': [],
'Balance_Due_confidence': 71,
'Balance_Due_coordinates': [],
'Service_Start_Date_confidence': 83,
'Service_Start_Date_coordinates': [],
'Service_End_Date_confidence': 85,
'Service_End_Date_coordinates': [],
'Tracking_Number_confidence': 74,
'Tracking_Number_coordinates': [],
'Tax_Lines_confidence': 79,
'Tax_Lines_coordinates': [],
'Line_Items_confidence': 74,
'Line_Items_coordinates': [],
'Account_Number_confidence': 73,
'Account_Number_coordinates': [],
'Bill_To_Name_confidence': 29,
'Bill_To_Name_coordinates': [0, 0.1693115234375, 0.25439453125, 0.3037109375, 0.2646484375],
'Bill_To_Recipient_confidence': 29,
'Bill_To_Recipient_coordinates': [0, 0.1693115234375, 0.25439453125, 0.3037109375, 0.2646484375],
'Bill_To_Address_confidence': 55,
'Bill_To_Address_coordinates': [0, 0.0670166015625, 0.20947265625, 0.2135009765625, 0.2188720703125],
'Bill_To_Address_Line_confidence': 55,
'Bill_To_Address_Line_coordinates': [0, 0.0670166015625, 0.20947265625, 0.2135009765625, 0.2188720703125],
'Bill_To_City_confidence': 55,
'Bill_To_City_coordinates': [0, 0.0670166015625, 0.20947265625, 0.2135009765625, 0.2188720703125],
'Bill_To_State_confidence': 55,
'Bill_To_State_coordinates': [0, 0.0670166015625, 0.20947265625, 0.2135009765625, 0.2188720703125],
'Bill_To_Zipcode_confidence': 55,
'Bill_To_Zipcode_coordinates': [0, 0.0670166015625, 0.20947265625, 0.2135009765625, 0.2188720703125],
'Bill_To_Vat_Number_confidence': 72,
'Bill_To_Vat_Number_coordinates': [],
'Bill_To_Email_confidence': 88,
'Bill_To_Email_coordinates': [],
'Card_Number_confidence': 79,
'Card_Number_coordinates': [],
'Payment_Display_Name_confidence': 80,
'Payment_Display_Name_coordinates': [],
'Payment_Type_confidence': 84,
'Payment_Type_coordinates': [],
'Vendor_Name_confidence': 49,
'Vendor_Name_coordinates': [0, 0.06744384765625, 0.1817626953125, 0.170166015625, 0.1932373046875],
'Vendor_Raw_Name_confidence': 49,
'Vendor_Raw_Name_coordinates': [0, 0.06744384765625, 0.1817626953125, 0.170166015625, 0.1932373046875],
'Vendor_Recipient_confidence': 49,
'Vendor_Recipient_coordinates': [0, 0.06744384765625, 0.1817626953125, 0.170166015625, 0.1932373046875],
'Vendor_Email_confidence': 86,
'Vendor_Email_coordinates': [],
'Vendor_Address_confidence': 31,
'Vendor_Address_coordinates': [0, 0.06744384765625, 0.27783203125, 0.2384033203125, 0.298828125],
'Vendor_Address_Line_confidence': 31,
'Vendor_Address_Line_coordinates': [0, 0.06744384765625, 0.27783203125, 0.2384033203125, 0.298828125],
'Vendor_City_confidence': 31,
'Vendor_City_coordinates': [0, 0.06744384765625, 0.27783203125, 0.2384033203125, 0.298828125],
'Vendor_State_confidence': 31,
'Vendor_State_coordinates': [0, 0.06744384765625, 0.27783203125, 0.2384033203125, 0.298828125],
'Vendor_Zipcode_confidence': 31,
'Vendor_Zipcode_coordinates': [0, 0.06744384765625, 0.27783203125, 0.2384033203125, 0.298828125],
'Vendor_Country_confidence': 31,
'Vendor_Country_coordinates': [0, 0.06744384765625, 0.27783203125, 0.2384033203125, 0.298828125],
'Vendor_Type_confidence': 84,
'Vendor_Type_coordinates': [],
'Vendor_Phone_confidence': 79,
'Vendor_Phone_coordinates': [],
'Vendor_Fax_confidence': 78,
'Vendor_Fax_coordinates': [],
'Vendor_Website_confidence': 87,
'Vendor_Website_coordinates': [],
'Vendor_ABN_Number_confidence': 79,
'Vendor_ABN_Number_coordinates': [],
'Vendor_Bank_Name_confidence': 74,
'Vendor_Bank_Name_coordinates': [],
'Vendor_Bank_Number_confidence': 89,
'Vendor_Bank_Number_coordinates': [],
'Vendor_Bank_Swift_confidence': 73,
'Vendor_Bank_Swift_coordinates': [0, 0.116943359375, 0.336181640625, 0.184326171875, 0.344970703125],
'Vendor_IBAN_confidence': 77,
'Vendor_IBAN_coordinates': [],
'Vendor_Account_Number_confidence': 67,
'Vendor_Account_Number_coordinates': [0, 0.164794921875, 0.32373046875, 0.274169921875, 0.333740234375],
'Remit_To_Name_confidence': 49,
'Remit_To_Name_coordinates': [0, 0.06744384765625, 0.1817626953125, 0.170166015625, 0.1932373046875],
'Remit_To_Address_confidence': 31,
'Remit_To_Address_coordinates': [0, 0.06744384765625, 0.27783203125, 0.2384033203125, 0.298828125],
'Phone_Number_confidence': 76,
'Phone_Number_coordinates': [],
'All_Email_Addresses_confidence': 72,
'All_Email_Addresses_coordinates': [],
'Ship_To_Name_confidence': 53,
'Ship_To_Name_coordinates': [0, 0.50634765625, 0.1826171875, 0.591796875, 0.192626953125],
'Ship_To_Address_confidence': 66,
'Ship_To_Address_coordinates': [0, 0.50634765625, 0.197998046875, 0.73095703125, 0.2191162109375],
'Ship_Date_confidence': 79,
'Ship_Date_coordinates': [],
'Delivery_Date_confidence': 77,
'Delivery_Date_coordinates': [],
'Carrier_confidence': 84,
'Carrier_coordinates': []
'Status': [
{'Created’: ‘2021-02-03 09:40:03 GMT-7, jeremy@photoncommerce.com’},
{'Routed’:‘2021-02-03 09:40:03 GMT-7, Balance Due> 2500, michael@photoncommerce.com’},
{'Received’: ‘2021-02-03 09:40:09 GMT-7, michael@photoncommerce.com’},
{'Viewed’: ’2021-02-03 10:04:09 GMT-7, michael@photoncommerce.com”},
{'Modified’: ‘2021-02-03 10:05:03 GMT-7, michael@photoncommerce.com’},
{'Modified’: ‘2021-02-03 10:05:10 GMT-7, michael@photoncommerce.com’},
{'Approved’: ‘2021-02-03 10:05:17 GMT-7, michael@photoncommerce.com’},
{'Paid’: ‘2021-02-03 10:05:38 GMT-7, michael@photoncommerce.com’},
{'Deposited’: ‘2021-02-05 05:13:00 GMT-7, michael@photoncommerce.com’}
],
},
'message': 'success',
'status': 'success'
}
Last updated